Little Registry Cleaner/Common Tools/TreeViewAdv/Tree/NodeControls/NodeDecimalTextBox.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
using System.ComponentModel;
namespace Common_Tools.TreeViewAdv.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);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。