Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 2b38a600
由
HZH
编写于
2019-08-29 10:01:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
折叠面板
1 个父辈
a8baef6b
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
142 行增加
和
48 行删除
HZH_Controls/HZH_Controls/Controls/Panel/UCPanelTitle.Designer.cs
HZH_Controls/HZH_Controls/Controls/Panel/UCPanelTitle.cs
HZH_Controls/HZH_Controls/Forms/FrmBack.Designer.cs
HZH_Controls/HZH_Controls/Forms/FrmBack.resx
HZH_Controls/Test/Form2.Designer.cs
HZH_Controls/Test/Form2.resx
HZH_Controls/HZH_Controls/Controls/Panel/UCPanelTitle.Designer.cs
查看文件 @
2b38a60
...
...
@@ -36,12 +36,14 @@
this
.
lblTitle
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
73
)))),
((
int
)(((
byte
)(
119
)))),
((
int
)(((
byte
)(
232
)))));
this
.
lblTitle
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
lblTitle
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
lblTitle
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblTitle
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
lblTitle
.
Name
=
"lblTitle"
;
this
.
lblTitle
.
Size
=
new
System
.
Drawing
.
Size
(
253
,
34
);
this
.
lblTitle
.
TabIndex
=
0
;
this
.
lblTitle
.
Text
=
"面板"
;
this
.
lblTitle
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
this
.
lblTitle
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
lblTitle_MouseDown
);
//
// UCPanelTitle
//
...
...
@@ -55,6 +57,7 @@
this
.
Name
=
"UCPanelTitle"
;
this
.
RectColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
73
)))),
((
int
)(((
byte
)(
119
)))),
((
int
)(((
byte
)(
232
)))));
this
.
Size
=
new
System
.
Drawing
.
Size
(
253
,
171
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
UCPanelTitle_SizeChanged
);
this
.
ResumeLayout
(
false
);
}
...
...
HZH_Controls/HZH_Controls/Controls/Panel/UCPanelTitle.cs
查看文件 @
2b38a60
...
...
@@ -6,11 +6,55 @@ using System.Data;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Drawing.Drawing2D
;
namespace
HZH_Controls.Controls
{
public
partial
class
UCPanelTitle
:
UCControlBase
{
private
int
m_intMaxHeight
=
0
;
private
bool
isCanExpand
=
true
;
[
Description
(
"是否可折叠"
),
Category
(
"自定义"
)]
public
bool
IsCanExpand
{
get
{
return
isCanExpand
;
}
set
{
isCanExpand
=
value
;
if
(
value
)
{
lblTitle
.
Image
=
GetImg
();
}
else
{
lblTitle
.
Image
=
null
;
}
}
}
private
bool
isExpand
=
false
;
[
Description
(
"是否已折叠"
),
Category
(
"自定义"
)]
public
bool
IsExpand
{
get
{
return
isExpand
;
}
set
{
isExpand
=
value
;
if
(
value
)
{
m_intMaxHeight
=
this
.
Height
;
this
.
Height
=
lblTitle
.
Height
;
}
else
{
this
.
Height
=
m_intMaxHeight
;
}
lblTitle
.
Image
=
GetImg
();
}
}
[
Description
(
"边框颜色"
),
Category
(
"自定义"
)]
public
Color
BorderColor
{
...
...
@@ -28,9 +72,93 @@ namespace HZH_Controls.Controls
get
{
return
lblTitle
.
Text
;
}
set
{
lblTitle
.
Text
=
value
;
}
}
public
override
Color
ForeColor
{
get
{
return
this
.
lblTitle
.
ForeColor
;
}
set
{
this
.
lblTitle
.
ForeColor
=
value
;
GetImg
(
true
);
if
(
isCanExpand
)
{
lblTitle
.
Image
=
GetImg
();
}
else
{
lblTitle
.
Image
=
null
;
}
}
}
public
UCPanelTitle
()
{
InitializeComponent
();
if
(
isCanExpand
)
{
lblTitle
.
Image
=
GetImg
();
}
else
{
lblTitle
.
Image
=
null
;
}
}
Bitmap
bitDown
=
null
;
Bitmap
bitUp
=
null
;
private
Bitmap
GetImg
(
bool
blnRefresh
=
false
)
{
if
(
isExpand
)
{
if
(
bitDown
==
null
||
blnRefresh
)
{
bitDown
=
new
Bitmap
(
24
,
24
);
Graphics
g
=
Graphics
.
FromImage
(
bitDown
);
g
.
SetGDIHigh
();
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLine
(
3
,
5
,
21
,
5
);
path
.
AddLine
(
21
,
5
,
12
,
19
);
path
.
AddLine
(
12
,
19
,
3
,
5
);
g
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
g
.
Dispose
();
}
return
bitDown
;
}
else
{
if
(
bitUp
==
null
||
blnRefresh
)
{
bitUp
=
new
Bitmap
(
24
,
24
);
Graphics
g
=
Graphics
.
FromImage
(
bitUp
);
g
.
SetGDIHigh
();
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLine
(
3
,
19
,
21
,
19
);
path
.
AddLine
(
21
,
19
,
12
,
5
);
path
.
AddLine
(
12
,
5
,
3
,
19
);
g
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
g
.
Dispose
();
}
return
bitUp
;
}
}
private
void
lblTitle_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(
isCanExpand
)
{
IsExpand
=
!
IsExpand
;
}
}
private
void
UCPanelTitle_SizeChanged
(
object
sender
,
EventArgs
e
)
{
if
(
this
.
Height
!=
lblTitle
.
Height
)
{
m_intMaxHeight
=
this
.
Height
;
}
}
}
}
HZH_Controls/HZH_Controls/Forms/FrmBack.Designer.cs
查看文件 @
2b38a60
...
...
@@ -69,7 +69,7 @@
this
.
btnBack1
.
BtnBackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
btnBack1
.
BtnFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
17F
);
this
.
btnBack1
.
BtnForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
102
)))),
((
int
)(((
byte
)(
102
)))),
((
int
)(((
byte
)(
102
)))));
this
.
btnBack1
.
BtnText
=
"自定义按钮"
;
this
.
btnBack1
.
BtnText
=
"
自定义按钮"
;
this
.
btnBack1
.
ConerRadius
=
5
;
this
.
btnBack1
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
btnBack1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Left
;
...
...
@@ -77,6 +77,7 @@
this
.
btnBack1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
btnBack1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
102
)))),
((
int
)(((
byte
)(
102
)))),
((
int
)(((
byte
)(
102
)))));
this
.
btnBack1
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"btnBack1.Image"
)));
this
.
btnBack1
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnBack1
.
IsRadius
=
true
;
this
.
btnBack1
.
IsShowRect
=
true
;
this
.
btnBack1
.
IsShowTips
=
false
;
...
...
@@ -88,6 +89,7 @@
this
.
btnBack1
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
60
);
this
.
btnBack1
.
TabIndex
=
0
;
this
.
btnBack1
.
TabStop
=
false
;
this
.
btnBack1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleLeft
;
this
.
btnBack1
.
TipsText
=
""
;
this
.
btnBack1
.
BtnClick
+=
new
System
.
EventHandler
(
this
.
btnBack1_btnClick
);
//
...
...
@@ -108,7 +110,7 @@
this
.
ucSplitLine_H1
.
TabIndex
=
0
;
this
.
ucSplitLine_H1
.
TabStop
=
false
;
//
// Frm
Temp1
// Frm
Back
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
247
)))),
((
int
)(((
byte
)(
247
)))),
((
int
)(((
byte
)(
247
)))));
...
...
@@ -116,7 +118,7 @@
this
.
Controls
.
Add
(
this
.
ucSplitLine_H1
);
this
.
Controls
.
Add
(
this
.
panTop
);
this
.
Icon
=
((
System
.
Drawing
.
Icon
)(
resources
.
GetObject
(
"$this.Icon"
)));
this
.
Name
=
"Frm
Temp1
"
;
this
.
Name
=
"Frm
Back
"
;
this
.
ShowIcon
=
false
;
this
.
ShowInTaskbar
=
false
;
this
.
Text
=
"FrmTemp1"
;
...
...
HZH_Controls/HZH_Controls/Forms/FrmBack.resx
查看文件 @
2b38a60
...
...
@@ -121,7 +121,7 @@
<data name="btnBack1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADs
MAAA7DAcdvqGQ
AAABnSURBVDhPYyAV/IcCKJc48Pz5tf//AwLAGCpEGPw/cwau
YQUAAAAJcEhZcwAADs
IAAA7CARUoSoA
AAABnSURBVDhPYyAV/IcCKJc48Pz5tf//AwLAGCpEGPw/cwau
iWiN6Jr+p6UR1jjYNc2cSQVNQD5UCjcY5JpAgCxNIICiEYRJScSDRzMoK0GlCINRzUAMzHJQKcIAlLWQ
NUOFiQMIzQH/AUt/OaDjNm1jAAAAAElFTkSuQmCC
</value>
...
...
@@ -134,7 +134,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAE
CgAAAk1TRnQBSQFMAwEBAAH
AAQABw
AEAAR4BAAEeAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
CgAAAk1TRnQBSQFMAwEBAAH
IAQABy
AEAAR4BAAEeAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AXgDAAEeAwABAQEAAQgFAAEQAQ4YAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
...
...
HZH_Controls/Test/Form2.Designer.cs
查看文件 @
2b38a60
...
...
@@ -59,7 +59,6 @@
this
.
ucPanelTitle1
=
new
HZH_Controls
.
Controls
.
UCPanelTitle
();
this
.
ucStep2
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
ucStep1
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
ucBtnImg1
=
new
HZH_Controls
.
Controls
.
UCBtnImg
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar2
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar3
)).
BeginInit
();
...
...
@@ -142,7 +141,7 @@
this
.
ucProcessWave2
.
ConerRadius
=
0
;
this
.
ucProcessWave2
.
FillColor
=
System
.
Drawing
.
Color
.
Empty
;
this
.
ucProcessWave2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
30F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucProcessWave2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
this
.
ucProcessWave2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucProcessWave2
.
IsRadius
=
false
;
this
.
ucProcessWave2
.
IsRectangle
=
false
;
this
.
ucProcessWave2
.
IsShowRect
=
true
;
...
...
@@ -163,7 +162,7 @@
this
.
ucProcessWave1
.
ConerRadius
=
0
;
this
.
ucProcessWave1
.
FillColor
=
System
.
Drawing
.
Color
.
Empty
;
this
.
ucProcessWave1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
30F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucProcessWave1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))),
((
int
)(((
byte
)(
64
)))));
this
.
ucProcessWave1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucProcessWave1
.
IsRadius
=
false
;
this
.
ucProcessWave1
.
IsRectangle
=
true
;
this
.
ucProcessWave1
.
IsShowRect
=
true
;
...
...
@@ -436,6 +435,8 @@
this
.
ucPanelTitle1
.
ConerRadius
=
10
;
this
.
ucPanelTitle1
.
FillColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucPanelTitle1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucPanelTitle1
.
IsCanExpand
=
true
;
this
.
ucPanelTitle1
.
IsExpand
=
false
;
this
.
ucPanelTitle1
.
IsRadius
=
true
;
this
.
ucPanelTitle1
.
IsShowRect
=
true
;
this
.
ucPanelTitle1
.
Location
=
new
System
.
Drawing
.
Point
(
406
,
14
);
...
...
@@ -491,40 +492,11 @@
this
.
ucStep1
.
StepWidth
=
35
;
this
.
ucStep1
.
TabIndex
=
0
;
//
// ucBtnImg1
//
this
.
ucBtnImg1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnImg1
.
BtnBackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnImg1
.
BtnFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
17F
);
this
.
ucBtnImg1
.
BtnForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnImg1
.
BtnText
=
"自定义按钮"
;
this
.
ucBtnImg1
.
ConerRadius
=
5
;
this
.
ucBtnImg1
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
ucBtnImg1
.
FillColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
58
)))));
this
.
ucBtnImg1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucBtnImg1
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnImg1
.
Image
=
((
System
.
Drawing
.
Image
)(
resources
.
GetObject
(
"ucBtnImg1.Image"
)));
this
.
ucBtnImg1
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
TopCenter
;
this
.
ucBtnImg1
.
IsRadius
=
true
;
this
.
ucBtnImg1
.
IsShowRect
=
true
;
this
.
ucBtnImg1
.
IsShowTips
=
false
;
this
.
ucBtnImg1
.
Location
=
new
System
.
Drawing
.
Point
(
1016
,
263
);
this
.
ucBtnImg1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
ucBtnImg1
.
Name
=
"ucBtnImg1"
;
this
.
ucBtnImg1
.
RectColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
58
)))));
this
.
ucBtnImg1
.
RectWidth
=
1
;
this
.
ucBtnImg1
.
Size
=
new
System
.
Drawing
.
Size
(
184
,
108
);
this
.
ucBtnImg1
.
TabIndex
=
12
;
this
.
ucBtnImg1
.
TabStop
=
false
;
this
.
ucBtnImg1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
BottomCenter
;
this
.
ucBtnImg1
.
TipsText
=
""
;
//
// Form2
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1438
,
594
);
this
.
Controls
.
Add
(
this
.
ucBtnImg1
);
this
.
Controls
.
Add
(
this
.
ucProcessWave2
);
this
.
Controls
.
Add
(
this
.
ucProcessWave1
);
this
.
Controls
.
Add
(
this
.
ucWaveWithSource1
);
...
...
@@ -595,7 +567,6 @@
private
HZH_Controls
.
Controls
.
UCWaveWithSource
ucWaveWithSource1
;
private
HZH_Controls
.
Controls
.
UCProcessWave
ucProcessWave1
;
private
HZH_Controls
.
Controls
.
UCProcessWave
ucProcessWave2
;
private
HZH_Controls
.
Controls
.
UCBtnImg
ucBtnImg1
;
}
}
\ No newline at end of file
HZH_Controls/Test/Form2.resx
查看文件 @
2b38a60
...
...
@@ -130,14 +130,4 @@
b1p1tZEYIvwEAAAAAElFTkSuQmCC
</value>
</data>
<data name="ucBtnImg1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAYCAYAAADKx8xXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADKSURBVDhPxZSxDcMgEEWZlhXYgB2uc5FBqNJA7RUs0URM
QPyJCWATfI4i5UtfQqd7B9/YFllxFUkZo6Oht/YiQBxwWeYW5oKP+V5A732EOaAxpoDI54jYYAihwNyj
skClVHJdO82otU7QNN0auAGh/Y5oRhNcg6dHZYFYoMAFoQT2MqJZrku4BjEoQVn7o8IZJHLvGnbckJd6
IKZba5vaIeOVV+4rkJWx59+Avev45Aa88ln9OSMECNcyMp7DAcQ0/MFGBoQBQgjxBE7XkBduYXLWAAAA
AElFTkSuQmCC
</value>
</data>
</root>
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论