diff -r 3145aadca3d2 -r 0c551e8818e0 External/Aga.Controls/Tree/NodeControls/NodeDecimalTextBox.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/External/Aga.Controls/Tree/NodeControls/NodeDecimalTextBox.cs Sun May 27 15:16:19 2012 +0000 @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Drawing; +using System.Windows.Forms; +using System.Reflection; +using System.ComponentModel; + +namespace Aga.Controls.Tree.NodeControls +{ + public class NodeDecimalTextBox : NodeTextBox + { + private bool _allowDecimalSeparator = true; + [DefaultValue(true)] + public bool AllowDecimalSeparator + { + get { return _allowDecimalSeparator; } + set { _allowDecimalSeparator = value; } + } + + private bool _allowNegativeSign = true; + [DefaultValue(true)] + public bool AllowNegativeSign + { + get { return _allowNegativeSign; } + set { _allowNegativeSign = value; } + } + + protected NodeDecimalTextBox() + { + } + + protected override TextBox CreateTextBox() + { + NumericTextBox textBox = new NumericTextBox(); + textBox.AllowDecimalSeparator = AllowDecimalSeparator; + textBox.AllowNegativeSign = AllowNegativeSign; + return textBox; + } + + protected override void DoApplyChanges(TreeNodeAdv node, Control editor) + { + SetValue(node, (editor as NumericTextBox).DecimalValue); + } + } +}