Added mainboard specific configurations for the following Gigabyte mainboards: EX58-UD3R, G41M-Combo, G41MT-S2, G41MT-S2P, GA-MA770T-UD3P, GA-MA785GM-US2H, GA-MA78LM-S2H, GA-MA790X-UD3P, H55-USB3, H55N-USB3, H61M-DS2 REV 1.2, H61M-USB3-B3 REV 2.0, H67A-USB3-B3, P55A-UD3, P67A-UD3-B3, P67A-UD3R-B3, Z68A-D3H-B3, Z68AP-D3, Z68X-UD3H-B3.
3 This Source Code Form is subject to the terms of the Mozilla Public
4 License, v. 2.0. If a copy of the MPL was not distributed with this
5 file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 Copyright (C) 2010-2011 Michael Möller <mmoeller@openhardwaremonitor.org>
13 using System.Windows.Forms;
15 namespace OpenHardwareMonitor.GUI {
16 public abstract class Gadget : IDisposable {
18 private GadgetWindow window;
21 this.window = new GadgetWindow();
22 this.window.Paint += delegate(object sender, PaintEventArgs e) {
27 public virtual void Dispose() {
31 public Point Location {
33 return window.Location;
36 window.Location = value;
40 public event EventHandler LocationChanged {
42 window.LocationChanged += value;
45 window.LocationChanged -= value;
49 public virtual Size Size {
54 this.window.Size = value;
58 public event EventHandler SizeChanged {
60 window.SizeChanged += value;
63 window.SizeChanged -= value;
69 return window.Opacity;
72 window.Opacity = value;
76 public bool LockPositionAndSize {
78 return window.LockPositionAndSize;
81 window.LockPositionAndSize = value;
85 public bool AlwaysOnTop {
87 return window.AlwaysOnTop;
90 window.AlwaysOnTop = value;
94 public ContextMenu ContextMenu {
96 return window.ContextMenu;
99 window.ContextMenu = value;
103 public event HitTestEventHandler HitTest {
105 window.HitTest += value;
108 window.HitTest -= value;
112 public event MouseEventHandler MouseDoubleClick {
114 window.MouseDoubleClick += value;
117 window.MouseDoubleClick -= value;
121 public bool Visible {
123 return window.Visible;
126 if (value != window.Visible) {
127 window.Visible = value;
128 if (VisibleChanged != null)
129 VisibleChanged(this, EventArgs.Empty);
136 public event EventHandler VisibleChanged;
138 public void Redraw() {
142 protected abstract void OnPaint(PaintEventArgs e);