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.
2 using System.Collections.Generic;
5 using System.Windows.Forms;
6 using System.Reflection;
7 using System.ComponentModel;
8 using System.Drawing.Design;
10 namespace Aga.Controls.Tree.NodeControls
12 public class NodeNumericUpDown : BaseTextControl
16 private int _editorWidth = 100;
18 public int EditorWidth
20 get { return _editorWidth; }
21 set { _editorWidth = value; }
24 private int _decimalPlaces = 0;
25 [Category("Data"), DefaultValue(0)]
26 public int DecimalPlaces
30 return this._decimalPlaces;
34 this._decimalPlaces = value;
38 private decimal _increment = 1;
39 [Category("Data"), DefaultValue(1)]
40 public decimal Increment
44 return this._increment;
48 this._increment = value;
52 private decimal _minimum = 0;
53 [Category("Data"), DefaultValue(0)]
54 public decimal Minimum
66 private decimal _maximum = 100;
67 [Category("Data"), DefaultValue(100)]
68 public decimal Maximum
76 this._maximum = value;
82 public NodeNumericUpDown()
86 protected override Size CalculateEditorSize(EditorContext context)
88 if (Parent.UseColumns)
89 return context.Bounds.Size;
91 return new Size(EditorWidth, context.Bounds.Height);
94 protected override Control CreateEditor(TreeNodeAdv node)
96 NumericUpDown num = new NumericUpDown();
97 num.Increment = Increment;
98 num.DecimalPlaces = DecimalPlaces;
99 num.Minimum = Minimum;
100 num.Maximum = Maximum;
101 num.Value = (decimal)GetValue(node);
102 SetEditControlProperties(num, node);
106 protected override void DisposeEditor(Control editor)
110 protected override void DoApplyChanges(TreeNodeAdv node, Control editor)
112 SetValue(node, (editor as NumericUpDown).Value);