mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
3a9a6e8305
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4764 21ef857c-d57f-4fe0-8362-d861dc6d29cd
32 lines
742 B
C#
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);
|
|
}
|
|
}
|
|
}
|