Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f8d47a45
由
HZH
编写于
2019-09-27 14:42:50 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
数字文本框支持小数增加
1 个父辈
bb4a54cb
全部展开
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
2 行删除
HZH_Controls/HZH_Controls/Controls/ComboBox/UCCombox.Designer.cs
HZH_Controls/HZH_Controls/Controls/Text/UCNumTextBox.cs
HZH_Controls/Test/UC/UCTestForms.Designer.cs
HZH_Controls/HZH_Controls/Controls/ComboBox/UCCombox.Designer.cs
查看文件 @
f8d47a4
...
@@ -117,6 +117,7 @@ namespace HZH_Controls.Controls
...
@@ -117,6 +117,7 @@ namespace HZH_Controls.Controls
this
.
Controls
.
Add
(
this
.
txtInput
);
this
.
Controls
.
Add
(
this
.
txtInput
);
this
.
Controls
.
Add
(
this
.
lblInput
);
this
.
Controls
.
Add
(
this
.
lblInput
);
this
.
FillColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
240
)))),
((
int
)(((
byte
)(
240
)))),
((
int
)(((
byte
)(
240
)))));
this
.
FillColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
240
)))),
((
int
)(((
byte
)(
240
)))),
((
int
)(((
byte
)(
240
)))));
this
.
IsRadius
=
true
;
this
.
IsShowRect
=
true
;
this
.
IsShowRect
=
true
;
this
.
Name
=
"UCCombox"
;
this
.
Name
=
"UCCombox"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
32
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
32
);
...
...
HZH_Controls/HZH_Controls/Controls/Text/UCNumTextBox.cs
查看文件 @
f8d47a4
...
@@ -174,6 +174,19 @@ namespace HZH_Controls.Controls
...
@@ -174,6 +174,19 @@ namespace HZH_Controls.Controls
/// </summary>
/// </summary>
[
Description
(
"减少按钮点击事件"
),
Category
(
"自定义"
)]
[
Description
(
"减少按钮点击事件"
),
Category
(
"自定义"
)]
public
event
EventHandler
MinusClick
;
public
event
EventHandler
MinusClick
;
private
decimal
increment
=
1
;
[
Description
(
"递增量,大于0的数值"
),
Category
(
"自定义"
)]
public
decimal
Increment
{
get
{
return
increment
;
}
set
{
if
(
value
<=
0
)
return
;
increment
=
value
;
}
}
/// <summary>
/// <summary>
/// Initializes a new instance of the <see cref="UCNumTextBox" /> class.
/// Initializes a new instance of the <see cref="UCNumTextBox" /> class.
/// </summary>
/// </summary>
...
@@ -286,7 +299,7 @@ namespace HZH_Controls.Controls
...
@@ -286,7 +299,7 @@ namespace HZH_Controls.Controls
AddClick
(
this
,
e
);
AddClick
(
this
,
e
);
}
}
decimal
dec
=
this
.
txtNum
.
Text
.
ToDecimal
();
decimal
dec
=
this
.
txtNum
.
Text
.
ToDecimal
();
dec
++
;
dec
+=
increment
;
txtNum
.
Text
=
dec
.
ToString
();
txtNum
.
Text
=
dec
.
ToString
();
}
}
...
@@ -303,7 +316,7 @@ namespace HZH_Controls.Controls
...
@@ -303,7 +316,7 @@ namespace HZH_Controls.Controls
MinusClick
(
this
,
e
);
MinusClick
(
this
,
e
);
}
}
decimal
dec
=
this
.
txtNum
.
Text
.
ToDecimal
();
decimal
dec
=
this
.
txtNum
.
Text
.
ToDecimal
();
dec
--
;
dec
-=
increment
;
;
txtNum
.
Text
=
dec
.
ToString
();
txtNum
.
Text
=
dec
.
ToString
();
}
}
...
...
HZH_Controls/Test/UC/UCTestForms.Designer.cs
查看文件 @
f8d47a4
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论