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