moel@345: using System; moel@345: using System.Collections.Generic; moel@345: using System.Text; moel@345: using System.Drawing; moel@345: using System.Windows.Forms; moel@345: using System.Reflection; moel@345: using System.ComponentModel; moel@345: moel@345: namespace Aga.Controls.Tree.NodeControls moel@345: { moel@345: public class NodeDecimalTextBox : NodeTextBox moel@345: { moel@345: private bool _allowDecimalSeparator = true; moel@345: [DefaultValue(true)] moel@345: public bool AllowDecimalSeparator moel@345: { moel@345: get { return _allowDecimalSeparator; } moel@345: set { _allowDecimalSeparator = value; } moel@345: } moel@345: moel@345: private bool _allowNegativeSign = true; moel@345: [DefaultValue(true)] moel@345: public bool AllowNegativeSign moel@345: { moel@345: get { return _allowNegativeSign; } moel@345: set { _allowNegativeSign = value; } moel@345: } moel@345: moel@345: protected NodeDecimalTextBox() moel@345: { moel@345: } moel@345: moel@345: protected override TextBox CreateTextBox() moel@345: { moel@345: NumericTextBox textBox = new NumericTextBox(); moel@345: textBox.AllowDecimalSeparator = AllowDecimalSeparator; moel@345: textBox.AllowNegativeSign = AllowNegativeSign; moel@345: return textBox; moel@345: } moel@345: moel@345: protected override void DoApplyChanges(TreeNodeAdv node, Control editor) moel@345: { moel@345: SetValue(node, (editor as NumericTextBox).DecimalValue); moel@345: } moel@345: } moel@345: }