Files
mirror-processhacker/1.x/trunk/ProcessHacker/Components/TreeViewAdv/Tree/NodeControls/NodeIntegerTextBox.cs
T
dmex 3a9a6e8305 PH1.x: Marshal cache rewrite, TreeViewAdv & ListView control fixes.
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4764 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2011-10-28 00:19:55 +00:00

32 lines
742 B
C#

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; }
}
protected override TextBox CreateTextBox()
{
return new NumericTextBox
{
AllowDecimalSeperator = false,
AllowNegativeSign = this.AllowNegativeSign
};
}
protected override void DoApplyChanges(TreeNodeAdv node, Control editor)
{
SetValue(node, (editor as NumericTextBox).IntValue);
}
}
}