Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 33a4024f
由
HZH
编写于
2019-08-19 08:33:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
圆形进度条
1 个父辈
b9e4603b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
513 行增加
和
136 行删除
HZH_Controls/HZH_Controls/Controls/Process/UCProcessEllipse.Designer.cs
HZH_Controls/HZH_Controls/Controls/Process/UCProcessEllipse.cs
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.Designer.cs → HZH_Controls/HZH_Controls/Controls/Process/UCProcessExt.Designer.cs
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.cs → HZH_Controls/HZH_Controls/Controls/Process/UCProcessExt.cs
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.resx → HZH_Controls/HZH_Controls/Controls/Process/UCProcessExt.resx
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/Form1.Designer.cs
HZH_Controls/Test/Form2.Designer.cs
HZH_Controls/Test/Form2.cs
HZH_Controls/Test/Form2.resx
HZH_Controls/HZH_Controls/Controls/Process/UCProcessEllipse.Designer.cs
0 → 100644
查看文件 @
33a4024
namespace
HZH_Controls.Controls
{
partial
class
UCProcessEllipse
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
components
=
new
System
.
ComponentModel
.
Container
();
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
}
#
endregion
}
}
HZH_Controls/HZH_Controls/Controls/Process/UCProcessEllipse.cs
0 → 100644
查看文件 @
33a4024
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Drawing
;
using
System.Data
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Drawing.Drawing2D
;
namespace
HZH_Controls.Controls
{
public
partial
class
UCProcessEllipse
:
UserControl
{
[
Description
(
"值改变事件"
),
Category
(
"自定义"
)]
public
event
EventHandler
ValueChanged
;
private
Color
m_backEllipseColor
=
Color
.
FromArgb
(
22
,
160
,
133
);
/// <summary>
/// 圆背景色
/// </summary>
[
Description
(
"圆背景色"
),
Category
(
"自定义"
)]
public
Color
BackEllipseColor
{
get
{
return
m_backEllipseColor
;
}
set
{
m_backEllipseColor
=
value
;
Refresh
();
}
}
private
Color
m_coreEllipseColor
=
Color
.
FromArgb
(
180
,
180
,
180
);
/// <summary>
/// 内圆颜色,ShowType=Ring 有效
/// </summary>
[
Description
(
"内圆颜色,ShowType=Ring 有效"
),
Category
(
"自定义"
)]
public
Color
CoreEllipseColor
{
get
{
return
m_coreEllipseColor
;
}
set
{
m_coreEllipseColor
=
value
;
Refresh
();
}
}
private
Color
m_valueColor
=
Color
.
FromArgb
(
255
,
77
,
59
);
[
Description
(
"值圆颜色"
),
Category
(
"自定义"
)]
public
Color
ValueColor
{
get
{
return
m_valueColor
;
}
set
{
m_valueColor
=
value
;
Refresh
();
}
}
private
bool
m_isShowCoreEllipseBorder
=
true
;
/// <summary>
/// 内圆是否显示边框,ShowType=Ring 有效
/// </summary>
[
Description
(
"内圆是否显示边框,ShowType=Ring 有效"
),
Category
(
"自定义"
)]
public
bool
IsShowCoreEllipseBorder
{
get
{
return
m_isShowCoreEllipseBorder
;
}
set
{
m_isShowCoreEllipseBorder
=
value
;
Refresh
();
}
}
private
ValueType
m_valueType
=
ValueType
.
Percent
;
/// <summary>
/// 值文字类型
/// </summary>
[
Description
(
"值文字类型"
),
Category
(
"自定义"
)]
public
ValueType
ValueType
{
get
{
return
m_valueType
;
}
set
{
m_valueType
=
value
;
Refresh
();
}
}
private
int
m_valueWidth
=
30
;
/// <summary>
/// 外圆值宽度
/// </summary>
[
Description
(
"外圆值宽度,ShowType=Ring 有效"
),
Category
(
"自定义"
)]
public
int
ValueWidth
{
get
{
return
m_valueWidth
;
}
set
{
if
(
value
<=
0
||
value
>
Math
.
Min
(
this
.
Width
,
this
.
Height
))
return
;
m_valueWidth
=
value
;
Refresh
();
}
}
private
int
m_valueMargin
=
5
;
/// <summary>
/// 外圆值间距
/// </summary>
[
Description
(
"外圆值间距"
),
Category
(
"自定义"
)]
public
int
ValueMargin
{
get
{
return
m_valueMargin
;
}
set
{
if
(
value
<
0
||
m_valueMargin
>=
m_valueWidth
)
return
;
m_valueMargin
=
value
;
Refresh
();
}
}
private
int
m_maxValue
=
100
;
/// <summary>
/// 最大值
/// </summary>
[
Description
(
"最大值"
),
Category
(
"自定义"
)]
public
int
MaxValue
{
get
{
return
m_maxValue
;
}
set
{
if
(
value
>
m_value
||
value
<=
0
)
return
;
m_maxValue
=
value
;
Refresh
();
}
}
private
int
m_value
=
0
;
/// <summary>
/// 当前值
/// </summary>
[
Description
(
"当前值"
),
Category
(
"自定义"
)]
public
int
Value
{
get
{
return
m_value
;
}
set
{
if
(
m_maxValue
<
value
||
value
<=
0
)
return
;
m_value
=
value
;
if
(
ValueChanged
!=
null
)
{
ValueChanged
(
this
,
null
);
}
Refresh
();
}
}
private
Font
m_font
=
new
Font
(
"Arial Unicode MS"
,
20
);
[
Description
(
"文字字体"
),
Category
(
"自定义"
)]
public
override
Font
Font
{
get
{
return
m_font
;
}
set
{
m_font
=
value
;
Refresh
();
}
}
Color
m_foreColor
=
Color
.
White
;
[
Description
(
"文字颜色"
),
Category
(
"自定义"
)]
public
override
Color
ForeColor
{
get
{
return
m_foreColor
;
}
set
{
m_foreColor
=
value
;
Refresh
();
}
}
private
ShowType
m_showType
=
ShowType
.
Ring
;
[
Description
(
"显示类型"
),
Category
(
"自定义"
)]
public
ShowType
ShowType
{
get
{
return
m_showType
;
}
set
{
m_showType
=
value
;
Refresh
();
}
}
public
UCProcessEllipse
()
{
InitializeComponent
();
this
.
SetStyle
(
ControlStyles
.
AllPaintingInWmPaint
,
true
);
this
.
SetStyle
(
ControlStyles
.
DoubleBuffer
,
true
);
this
.
SetStyle
(
ControlStyles
.
ResizeRedraw
,
true
);
this
.
SetStyle
(
ControlStyles
.
Selectable
,
true
);
this
.
SetStyle
(
ControlStyles
.
SupportsTransparentBackColor
,
true
);
this
.
SetStyle
(
ControlStyles
.
UserPaint
,
true
);
}
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
base
.
OnPaint
(
e
);
var
g
=
e
.
Graphics
;
g
.
SmoothingMode
=
SmoothingMode
.
AntiAlias
;
//使绘图质量最高,即消除锯齿
g
.
InterpolationMode
=
InterpolationMode
.
HighQualityBicubic
;
g
.
CompositingQuality
=
CompositingQuality
.
HighQuality
;
int
intWidth
=
Math
.
Min
(
this
.
Size
.
Width
,
this
.
Size
.
Height
);
//底圆
g
.
FillEllipse
(
new
SolidBrush
(
m_backEllipseColor
),
new
Rectangle
(
new
Point
(
0
,
0
),
new
Size
(
intWidth
,
intWidth
)));
if
(
m_showType
==
HZH_Controls
.
Controls
.
ShowType
.
Ring
)
{
//中心圆
int
intCore
=
intWidth
-
m_valueWidth
*
2
;
g
.
FillEllipse
(
new
SolidBrush
(
m_coreEllipseColor
),
new
Rectangle
(
new
Point
(
m_valueWidth
,
m_valueWidth
),
new
Size
(
intCore
,
intCore
)));
//中心圆边框
if
(
m_isShowCoreEllipseBorder
)
{
g
.
DrawEllipse
(
new
Pen
(
m_valueColor
,
2
),
new
Rectangle
(
new
Point
(
m_valueWidth
+
1
,
m_valueWidth
+
1
),
new
Size
(
intCore
-
1
,
intCore
-
1
)));
}
if
(
m_value
>
0
&&
m_maxValue
>
0
)
{
float
fltPercent
=
(
float
)
m_value
/
(
float
)
m_maxValue
;
if
(
fltPercent
>
1
)
{
fltPercent
=
1
;
}
g
.
DrawArc
(
new
Pen
(
m_valueColor
,
m_valueWidth
-
m_valueMargin
*
2
),
new
RectangleF
(
new
Point
(
m_valueWidth
/
2
+
m_valueMargin
/
4
,
m_valueWidth
/
2
+
m_valueMargin
/
4
),
new
SizeF
(
intWidth
-
m_valueWidth
-
m_valueMargin
/
2
+
(
m_valueMargin
==
0
?
0
:
1
),
intWidth
-
m_valueWidth
-
m_valueMargin
/
2
+
(
m_valueMargin
==
0
?
0
:
1
))),
-
90
,
fltPercent
*
360
);
string
strValueText
=
m_valueType
==
HZH_Controls
.
Controls
.
ValueType
.
Percent
?
fltPercent
.
ToString
(
"0%"
)
:
m_value
.
ToString
();
System
.
Drawing
.
SizeF
_txtSize
=
g
.
MeasureString
(
strValueText
,
this
.
Font
);
g
.
DrawString
(
strValueText
,
this
.
Font
,
new
SolidBrush
(
this
.
ForeColor
),
new
PointF
((
intWidth
-
_txtSize
.
Width
)
/
2
+
1
,
(
intWidth
-
_txtSize
.
Height
)
/
2
+
1
));
}
}
else
{
if
(
m_value
>
0
&&
m_maxValue
>
0
)
{
float
fltPercent
=
(
float
)
m_value
/
(
float
)
m_maxValue
;
if
(
fltPercent
>
1
)
{
fltPercent
=
1
;
}
g
.
FillPie
(
new
SolidBrush
(
m_valueColor
),
new
Rectangle
(
m_valueMargin
,
m_valueMargin
,
intWidth
-
m_valueMargin
*
2
,
intWidth
-
m_valueMargin
*
2
),
-
90
,
fltPercent
*
360
);
string
strValueText
=
m_valueType
==
HZH_Controls
.
Controls
.
ValueType
.
Percent
?
fltPercent
.
ToString
(
"0%"
)
:
m_value
.
ToString
();
System
.
Drawing
.
SizeF
_txtSize
=
g
.
MeasureString
(
strValueText
,
this
.
Font
);
g
.
DrawString
(
strValueText
,
this
.
Font
,
new
SolidBrush
(
this
.
ForeColor
),
new
PointF
((
intWidth
-
_txtSize
.
Width
)
/
2
+
1
,
(
intWidth
-
_txtSize
.
Height
)
/
2
+
1
));
}
}
}
}
public
enum
ValueType
{
/// <summary>
/// 百分比
/// </summary>
Percent
,
/// <summary>
/// 数值
/// </summary>
Absolute
}
public
enum
ShowType
{
/// <summary>
/// 圆环
/// </summary>
Ring
,
/// <summary>
/// 扇形
/// </summary>
Sector
}
}
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.Designer.cs
→
HZH_Controls/HZH_Controls/Controls/Process/
UC
ProcessExt.Designer.cs
查看文件 @
33a4024
namespace
HZH_Controls.Controls
namespace
HZH_Controls.Controls
{
{
partial
class
ProcessExt
partial
class
UCProcessExt
{
{
/// <summary>
/// <summary>
/// 必需的设计器变量。
/// 必需的设计器变量。
/// </summary>
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// <summary>
/// 清理所有正在使用的资源。
/// 清理所有正在使用的资源。
/// </summary>
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
protected
override
void
Dispose
(
bool
disposing
)
{
{
if
(
disposing
&&
(
components
!=
null
))
if
(
disposing
&&
(
components
!=
null
))
{
{
components
.
Dispose
();
components
.
Dispose
();
}
}
base
.
Dispose
(
disposing
);
base
.
Dispose
(
disposing
);
}
}
#
region
组件设计器生成的代码
#
region
组件设计器生成的代码
/// <summary>
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// 使用代码编辑器修改此方法的内容。
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// panel1
// panel1
//
//
this
.
panel1
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
23
)))),
((
int
)(((
byte
)(
127
)))),
((
int
)(((
byte
)(
203
)))));
this
.
panel1
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
23
)))),
((
int
)(((
byte
)(
127
)))),
((
int
)(((
byte
)(
203
)))));
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Left
;
this
.
panel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Left
;
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
22
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
22
);
this
.
panel1
.
TabIndex
=
0
;
this
.
panel1
.
TabIndex
=
0
;
//
//
// ProcessExt
// ProcessExt
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ConerRadius
=
5
;
this
.
ConerRadius
=
5
;
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
IsRadius
=
true
;
this
.
IsRadius
=
true
;
this
.
Name
=
"ProcessExt"
;
this
.
Name
=
"ProcessExt"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
291
,
22
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
291
,
22
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
ProcessExt_SizeChanged
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
ProcessExt_SizeChanged
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
#
endregion
#
endregion
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
}
}
}
}
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.cs
→
HZH_Controls/HZH_Controls/Controls/Process/
UC
ProcessExt.cs
查看文件 @
33a4024
// 版权所有 黄正辉 交流群:568015492 QQ:623128629
// 版权所有 黄正辉 交流群:568015492 QQ:623128629
// 文件名称:ProcessExt.cs
// 文件名称:ProcessExt.cs
// 创建日期:2019-08-15 16:02:44
// 创建日期:2019-08-15 16:02:44
// 功能描述:Process
// 功能描述:Process
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Data
;
using
System.Data
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
namespace
HZH_Controls.Controls
namespace
HZH_Controls.Controls
{
{
public
partial
class
ProcessExt
:
UCControlBase
public
partial
class
UCProcessExt
:
UCControlBase
{
{
private
int
_value
=
0
;
private
int
_value
=
0
;
public
int
Value
public
int
Value
{
{
get
{
return
this
.
_value
;
}
get
{
return
this
.
_value
;
}
set
set
{
{
if
(
value
<
0
)
if
(
value
<
0
)
return
;
return
;
this
.
_value
=
value
;
this
.
_value
=
value
;
SetValue
();
SetValue
();
}
}
}
}
private
int
maxValue
=
100
;
private
int
maxValue
=
100
;
public
int
MaxValue
public
int
MaxValue
{
{
get
{
return
maxValue
;
}
get
{
return
maxValue
;
}
set
set
{
{
if
(
value
<=
0
)
if
(
value
<=
0
)
return
;
return
;
maxValue
=
value
;
maxValue
=
value
;
SetValue
();
SetValue
();
}
}
}
}
private
void
SetValue
()
private
void
SetValue
()
{
{
double
dbl
=
(
double
)
_value
/
(
double
)
maxValue
;
double
dbl
=
(
double
)
_value
/
(
double
)
maxValue
;
this
.
panel1
.
Width
=
(
int
)(
this
.
Width
*
dbl
);
this
.
panel1
.
Width
=
(
int
)(
this
.
Width
*
dbl
);
}
}
public
ProcessExt
()
public
UCProcessExt
()
{
{
InitializeComponent
();
InitializeComponent
();
}
}
private
void
ProcessExt_SizeChanged
(
object
sender
,
EventArgs
e
)
private
void
ProcessExt_SizeChanged
(
object
sender
,
EventArgs
e
)
{
{
SetValue
();
SetValue
();
}
}
public
void
Step
()
public
void
Step
()
{
{
Value
++;
Value
++;
}
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/Process/ProcessExt.resx
→
HZH_Controls/HZH_Controls/Controls/Process/
UC
ProcessExt.resx
查看文件 @
33a4024
此文件的差异被折叠,
点击展开。
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
33a4024
...
@@ -104,6 +104,12 @@
...
@@ -104,6 +104,12 @@
<Compile Include="Controls\Panel\UCPanelTitle.Designer.cs">
<Compile Include="Controls\Panel\UCPanelTitle.Designer.cs">
<DependentUpon>UCPanelTitle.cs</DependentUpon>
<DependentUpon>UCPanelTitle.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\Process\UCProcessEllipse.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Process\UCProcessEllipse.Designer.cs">
<DependentUpon>UCProcessEllipse.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Step\UCStep.cs">
<Compile Include="Controls\Step\UCStep.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
...
@@ -211,11 +217,11 @@
...
@@ -211,11 +217,11 @@
<Compile Include="Controls\List\UCPagerControlBase.cs">
<Compile Include="Controls\List\UCPagerControlBase.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\Process\ProcessExt.cs">
<Compile Include="Controls\Process\
UC
ProcessExt.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\Process\ProcessExt.Designer.cs">
<Compile Include="Controls\Process\
UC
ProcessExt.Designer.cs">
<DependentUpon>ProcessExt.cs</DependentUpon>
<DependentUpon>
UC
ProcessExt.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\RadioButton\UCRadioButton.cs">
<Compile Include="Controls\RadioButton\UCRadioButton.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
...
@@ -417,8 +423,8 @@
...
@@ -417,8 +423,8 @@
<EmbeddedResource Include="Controls\Panel\UCPanelTitle.resx">
<EmbeddedResource Include="Controls\Panel\UCPanelTitle.resx">
<DependentUpon>UCPanelTitle.cs</DependentUpon>
<DependentUpon>UCPanelTitle.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Process\ProcessExt.resx">
<EmbeddedResource Include="Controls\Process\
UC
ProcessExt.resx">
<DependentUpon>ProcessExt.cs</DependentUpon>
<DependentUpon>
UC
ProcessExt.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\RadioButton\UCRadioButton.resx">
<EmbeddedResource Include="Controls\RadioButton\UCRadioButton.resx">
<DependentUpon>UCRadioButton.cs</DependentUpon>
<DependentUpon>UCRadioButton.cs</DependentUpon>
...
...
HZH_Controls/Test/Form1.Designer.cs
查看文件 @
33a4024
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
this
.
ucBtnsGroup1
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
ucBtnsGroup1
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
groupBox13
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox13
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ucBtnsGroup2
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
ucBtnsGroup2
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
processExt1
=
new
HZH_Controls
.
Controls
.
ProcessExt
();
this
.
processExt1
=
new
HZH_Controls
.
Controls
.
UC
ProcessExt
();
this
.
ucSplitLine_H1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
this
.
ucSplitLine_H1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
this
.
ucSplitLine_V1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
ucSplitLine_V1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
@@ -1102,7 +1102,7 @@
...
@@ -1102,7 +1102,7 @@
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup1
;
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox13
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox13
;
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup2
;
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup2
;
private
HZH_Controls
.
Controls
.
ProcessExt
processExt1
;
private
HZH_Controls
.
Controls
.
UC
ProcessExt
processExt1
;
private
HZH_Controls
.
Controls
.
UCSplitLine_H
ucSplitLine_H1
;
private
HZH_Controls
.
Controls
.
UCSplitLine_H
ucSplitLine_H1
;
private
HZH_Controls
.
Controls
.
UCSplitLine_V
ucSplitLine_V1
;
private
HZH_Controls
.
Controls
.
UCSplitLine_V
ucSplitLine_V1
;
}
}
...
...
HZH_Controls/Test/Form2.Designer.cs
查看文件 @
33a4024
...
@@ -28,10 +28,35 @@
...
@@ -28,10 +28,35 @@
/// </summary>
/// </summary>
private
void
InitializeComponent
()
private
void
InitializeComponent
()
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
ucProcessEllipse1
=
new
HZH_Controls
.
Controls
.
UCProcessEllipse
();
this
.
ucPanelTitle1
=
new
HZH_Controls
.
Controls
.
UCPanelTitle
();
this
.
ucPanelTitle1
=
new
HZH_Controls
.
Controls
.
UCPanelTitle
();
this
.
ucStep1
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
ucStep1
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// timer1
//
this
.
timer1
.
Enabled
=
true
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// ucProcessEllipse1
//
this
.
ucProcessEllipse1
.
BackEllipseColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
22
)))),
((
int
)(((
byte
)(
160
)))),
((
int
)(((
byte
)(
133
)))));
this
.
ucProcessEllipse1
.
CoreEllipseColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
180
)))),
((
int
)(((
byte
)(
180
)))),
((
int
)(((
byte
)(
180
)))));
this
.
ucProcessEllipse1
.
IsShowCoreEllipseBorder
=
true
;
this
.
ucProcessEllipse1
.
Location
=
new
System
.
Drawing
.
Point
(
78
,
117
);
this
.
ucProcessEllipse1
.
MaxValue
=
100
;
this
.
ucProcessEllipse1
.
Name
=
"ucProcessEllipse1"
;
this
.
ucProcessEllipse1
.
ShowType
=
HZH_Controls
.
Controls
.
ShowType
.
Sector
;
this
.
ucProcessEllipse1
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
150
);
this
.
ucProcessEllipse1
.
TabIndex
=
2
;
this
.
ucProcessEllipse1
.
Value
=
45
;
this
.
ucProcessEllipse1
.
ValueColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucProcessEllipse1
.
ValueMargin
=
0
;
this
.
ucProcessEllipse1
.
ValueType
=
HZH_Controls
.
Controls
.
ValueType
.
Percent
;
this
.
ucProcessEllipse1
.
ValueWidth
=
30
;
//
// ucPanelTitle1
// ucPanelTitle1
//
//
this
.
ucPanelTitle1
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
ucPanelTitle1
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
...
@@ -74,6 +99,7 @@
...
@@ -74,6 +99,7 @@
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
825
,
594
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
825
,
594
);
this
.
Controls
.
Add
(
this
.
ucProcessEllipse1
);
this
.
Controls
.
Add
(
this
.
ucPanelTitle1
);
this
.
Controls
.
Add
(
this
.
ucPanelTitle1
);
this
.
Controls
.
Add
(
this
.
ucStep1
);
this
.
Controls
.
Add
(
this
.
ucStep1
);
this
.
Name
=
"Form2"
;
this
.
Name
=
"Form2"
;
...
@@ -86,5 +112,7 @@
...
@@ -86,5 +112,7 @@
private
HZH_Controls
.
Controls
.
UCStep
ucStep1
;
private
HZH_Controls
.
Controls
.
UCStep
ucStep1
;
private
HZH_Controls
.
Controls
.
UCPanelTitle
ucPanelTitle1
;
private
HZH_Controls
.
Controls
.
UCPanelTitle
ucPanelTitle1
;
private
HZH_Controls
.
Controls
.
UCProcessEllipse
ucProcessEllipse1
;
private
System
.
Windows
.
Forms
.
Timer
timer1
;
}
}
}
}
\ No newline at end of file
\ No newline at end of file
HZH_Controls/Test/Form2.cs
查看文件 @
33a4024
...
@@ -20,5 +20,12 @@ namespace Test
...
@@ -20,5 +20,12 @@ namespace Test
{
{
this
.
ucStep1
.
StepIndex
=
3
;
this
.
ucStep1
.
StepIndex
=
3
;
}
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
this
.
ucProcessEllipse1
.
Value
++;
if
(
this
.
ucProcessEllipse1
.
Value
==
100
)
timer1
.
Enabled
=
false
;
}
}
}
}
}
HZH_Controls/Test/Form2.resx
查看文件 @
33a4024
...
@@ -117,4 +117,7 @@
...
@@ -117,4 +117,7 @@
<resheader name="writer">
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论