Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 80c65399
由
HZH
编写于
2019-09-09 13:37:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
新增鼓风机
1 个父辈
ef1d9a97
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
441 行增加
和
49 行删除
HZH_Controls/HZH_Controls/Controls/FactoryControls/Blower/UCBlower.cs
HZH_Controls/HZH_Controls/Controls/FactoryControls/Valve/UCValve.cs
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/Form4.Designer.cs
HZH_Controls/HZH_Controls/Controls/FactoryControls/Blower/UCBlower.cs
0 → 100644
查看文件 @
80c6539
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-09-09
//
// ***********************************************************************
// <copyright file="UCBlower.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Drawing
;
using
System.Drawing.Drawing2D
;
using
System.ComponentModel
;
namespace
HZH_Controls.Controls
{
/// <summary>
/// Class UCBlower.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public
class
UCBlower
:
UserControl
{
/// <summary>
/// The entrance direction
/// </summary>
private
BlowerEntranceDirection
entranceDirection
=
BlowerEntranceDirection
.
None
;
/// <summary>
/// Gets or sets the entrance direction.
/// </summary>
/// <value>The entrance direction.</value>
[
Description
(
"入口方向"
),
Category
(
"自定义"
)]
public
BlowerEntranceDirection
EntranceDirection
{
get
{
return
entranceDirection
;
}
set
{
entranceDirection
=
value
;
Refresh
();
}
}
/// <summary>
/// The exit direction
/// </summary>
private
BlowerExitDirection
exitDirection
=
BlowerExitDirection
.
Right
;
/// <summary>
/// Gets or sets the exit direction.
/// </summary>
/// <value>The exit direction.</value>
[
Description
(
"出口方向"
),
Category
(
"自定义"
)]
public
BlowerExitDirection
ExitDirection
{
get
{
return
exitDirection
;
}
set
{
exitDirection
=
value
;
Refresh
();
}
}
/// <summary>
/// The blower color
/// </summary>
private
Color
blowerColor
=
Color
.
FromArgb
(
255
,
77
,
59
);
/// <summary>
/// Gets or sets the color of the blower.
/// </summary>
/// <value>The color of the blower.</value>
[
Description
(
"风机颜色"
),
Category
(
"自定义"
)]
public
Color
BlowerColor
{
get
{
return
blowerColor
;
}
set
{
blowerColor
=
value
;
Refresh
();
}
}
/// <summary>
/// The fan color
/// </summary>
private
Color
fanColor
=
Color
.
FromArgb
(
3
,
169
,
243
);
/// <summary>
/// Gets or sets the color of the fan.
/// </summary>
/// <value>The color of the fan.</value>
[
Description
(
"风叶颜色"
),
Category
(
"自定义"
)]
public
Color
FanColor
{
get
{
return
fanColor
;
}
set
{
fanColor
=
value
;
Refresh
();
}
}
/// <summary>
/// The m rect working
/// </summary>
Rectangle
m_rectWorking
;
/// <summary>
/// Initializes a new instance of the <see cref="UCBlower"/> class.
/// </summary>
public
UCBlower
()
{
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
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
SizeChanged
+=
UCBlower_SizeChanged
;
this
.
Size
=
new
Size
(
120
,
120
);
}
/// <summary>
/// Handles the SizeChanged event of the UCBlower control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
void
UCBlower_SizeChanged
(
object
sender
,
EventArgs
e
)
{
int
intMin
=
Math
.
Min
(
this
.
Width
,
this
.
Height
);
m_rectWorking
=
new
Rectangle
((
this
.
Width
-
(
intMin
/
3
*
2
))
/
2
,
(
this
.
Height
-
(
intMin
/
3
*
2
))
/
2
,
(
intMin
/
3
*
2
),
(
intMin
/
3
*
2
));
}
/// <summary>
/// 引发 <see cref="E:System.Windows.Forms.Control.Paint" /> 事件。
/// </summary>
/// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
base
.
OnPaint
(
e
);
var
g
=
e
.
Graphics
;
g
.
SetGDIHigh
();
GraphicsPath
pathLineIn
=
new
GraphicsPath
();
GraphicsPath
pathLineOut
=
new
GraphicsPath
();
int
intLinePenWidth
=
0
;
switch
(
exitDirection
)
{
case
BlowerExitDirection
.
Left
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
0
,
m_rectWorking
.
Top
,
this
.
Width
/
2
,
m_rectWorking
.
Height
/
2
-
5
));
intLinePenWidth
=
m_rectWorking
.
Height
/
2
-
5
;
pathLineOut
.
AddLine
(
new
Point
(-
10
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
),
new
Point
(
m_rectWorking
.
Left
+
m_rectWorking
.
Width
/
2
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
1
,
m_rectWorking
.
Top
-
2
),
new
Point
(
1
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
+
2
));
break
;
case
BlowerExitDirection
.
Right
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
this
.
Width
/
2
,
m_rectWorking
.
Top
,
this
.
Width
/
2
,
m_rectWorking
.
Height
/
2
-
5
));
intLinePenWidth
=
m_rectWorking
.
Height
/
2
-
5
;
pathLineOut
.
AddLine
(
new
Point
(
this
.
Width
+
10
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
),
new
Point
(
m_rectWorking
.
Left
+
m_rectWorking
.
Width
/
2
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
this
.
Width
-
2
,
m_rectWorking
.
Top
-
2
),
new
Point
(
this
.
Width
-
2
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
/
2
-
5
)
+
2
));
break
;
case
BlowerExitDirection
.
Up
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
m_rectWorking
.
Right
-
(
m_rectWorking
.
Width
/
2
-
5
),
0
,
m_rectWorking
.
Width
/
2
-
5
,
this
.
Height
/
2
));
intLinePenWidth
=
m_rectWorking
.
Width
/
2
-
5
;
pathLineOut
.
AddLine
(
new
Point
(
m_rectWorking
.
Right
-
(
m_rectWorking
.
Width
/
2
-
5
)
/
2
,
-
10
),
new
Point
(
m_rectWorking
.
Right
-
(
m_rectWorking
.
Width
/
2
-
5
)
/
2
,
m_rectWorking
.
Top
+
m_rectWorking
.
Height
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
m_rectWorking
.
Right
+
2
,
1
),
new
Point
(
m_rectWorking
.
Right
-
(
m_rectWorking
.
Width
/
2
-
5
)
-
2
,
1
));
break
;
}
switch
(
entranceDirection
)
{
case
BlowerEntranceDirection
.
Left
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
0
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
,
this
.
Width
/
2
,
m_rectWorking
.
Height
/
2
-
5
));
pathLineIn
.
AddLine
(
new
Point
(-
10
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
),
new
Point
(
m_rectWorking
.
Left
+
m_rectWorking
.
Width
/
2
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
1
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
-
2
),
new
Point
(
1
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
+
2
));
break
;
case
BlowerEntranceDirection
.
Right
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
this
.
Width
/
2
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
,
this
.
Width
/
2
,
m_rectWorking
.
Height
/
2
-
5
));
pathLineIn
.
AddLine
(
new
Point
(
this
.
Width
+
10
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
),
new
Point
(
m_rectWorking
.
Left
+
m_rectWorking
.
Width
/
2
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
this
.
Width
-
2
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
-
2
),
new
Point
(
this
.
Width
-
2
,
m_rectWorking
.
Bottom
-
m_rectWorking
.
Height
/
2
+
5
+
(
m_rectWorking
.
Height
/
2
-
5
)
+
2
));
break
;
case
BlowerEntranceDirection
.
Up
:
g
.
FillRectangle
(
new
SolidBrush
(
blowerColor
),
new
Rectangle
(
m_rectWorking
.
Left
,
0
,
m_rectWorking
.
Width
/
2
-
5
,
this
.
Height
/
2
));
pathLineIn
.
AddLine
(
new
Point
(
m_rectWorking
.
Left
+
(
m_rectWorking
.
Width
/
2
-
5
)
/
2
,
-
10
),
new
Point
(
m_rectWorking
.
Left
+
(
m_rectWorking
.
Width
/
2
-
5
)
/
2
,
m_rectWorking
.
Top
+
m_rectWorking
.
Height
/
2
));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
m_rectWorking
.
Left
-
2
,
1
),
new
Point
(
m_rectWorking
.
Left
+
(
m_rectWorking
.
Width
/
2
-
5
)
+
2
,
1
));
break
;
}
//渐变色
int
_intPenWidth
=
intLinePenWidth
;
int
intCount
=
_intPenWidth
/
2
/
4
;
for
(
int
i
=
0
;
i
<
intCount
;
i
++)
{
int
_penWidth
=
_intPenWidth
/
2
-
4
*
i
;
if
(
_penWidth
<=
0
)
_penWidth
=
1
;
if
(
entranceDirection
!=
BlowerEntranceDirection
.
None
)
g
.
DrawPath
(
new
Pen
(
new
SolidBrush
(
Color
.
FromArgb
(
40
,
Color
.
White
.
R
,
Color
.
White
.
G
,
Color
.
White
.
B
)),
_penWidth
),
pathLineIn
);
g
.
DrawPath
(
new
Pen
(
new
SolidBrush
(
Color
.
FromArgb
(
40
,
Color
.
White
.
R
,
Color
.
White
.
G
,
Color
.
White
.
B
)),
_penWidth
),
pathLineOut
);
if
(
_penWidth
==
1
)
break
;
}
//底座
GraphicsPath
gpDZ
=
new
GraphicsPath
();
gpDZ
.
AddLines
(
new
Point
[]
{
new
Point
(
m_rectWorking
.
Left
+
m_rectWorking
.
Width
/
2
,
m_rectWorking
.
Top
+
m_rectWorking
.
Height
/
2
),
new
Point
(
m_rectWorking
.
Left
+
2
,
this
.
Height
),
new
Point
(
m_rectWorking
.
Right
-
2
,
this
.
Height
)
});
gpDZ
.
CloseAllFigures
();
g
.
FillPath
(
new
SolidBrush
(
blowerColor
),
gpDZ
);
g
.
FillPath
(
new
SolidBrush
(
Color
.
FromArgb
(
50
,
Color
.
White
)),
gpDZ
);
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
blowerColor
),
3
),
new
Point
(
m_rectWorking
.
Left
,
this
.
Height
-
2
),
new
Point
(
m_rectWorking
.
Right
,
this
.
Height
-
2
));
//中心
g
.
FillEllipse
(
new
SolidBrush
(
blowerColor
),
m_rectWorking
);
g
.
FillEllipse
(
new
SolidBrush
(
Color
.
FromArgb
(
20
,
Color
.
White
)),
m_rectWorking
);
//扇叶
Rectangle
_rect
=
new
Rectangle
(
m_rectWorking
.
Left
+
(
m_rectWorking
.
Width
-
(
m_rectWorking
.
Width
/
3
*
2
))
/
2
,
m_rectWorking
.
Top
+
(
m_rectWorking
.
Height
-
(
m_rectWorking
.
Width
/
3
*
2
))
/
2
,
(
m_rectWorking
.
Width
/
3
*
2
),
(
m_rectWorking
.
Width
/
3
*
2
));
int
_splitCount
=
8
;
float
fltSplitValue
=
360F
/
(
float
)
_splitCount
;
for
(
int
i
=
0
;
i
<=
_splitCount
;
i
++)
{
float
fltAngle
=
(
fltSplitValue
*
i
-
180
)
%
360
;
float
fltY1
=
(
float
)(
_rect
.
Top
+
_rect
.
Width
/
2
-
((
_rect
.
Width
/
2
)
*
Math
.
Sin
(
Math
.
PI
*
(
fltAngle
/
180.00F
))));
float
fltX1
=
(
float
)(
_rect
.
Left
+
(
_rect
.
Width
/
2
-
((
_rect
.
Width
/
2
)
*
Math
.
Cos
(
Math
.
PI
*
(
fltAngle
/
180.00F
)))));
float
fltY2
=
0
;
float
fltX2
=
0
;
fltY2
=
(
float
)(
_rect
.
Top
+
_rect
.
Width
/
2
-
((
_rect
.
Width
/
4
)
*
Math
.
Sin
(
Math
.
PI
*
(
fltAngle
/
180.00F
))));
fltX2
=
(
float
)(
_rect
.
Left
+
(
_rect
.
Width
/
2
-
((
_rect
.
Width
/
4
)
*
Math
.
Cos
(
Math
.
PI
*
(
fltAngle
/
180.00F
)))));
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
fanColor
),
2
),
new
PointF
(
fltX1
,
fltY1
),
new
PointF
(
fltX2
,
fltY2
));
}
g
.
FillEllipse
(
new
SolidBrush
(
fanColor
),
new
Rectangle
(
_rect
.
Left
+
_rect
.
Width
/
2
-
_rect
.
Width
/
4
+
2
,
_rect
.
Top
+
_rect
.
Width
/
2
-
_rect
.
Width
/
4
+
2
,
_rect
.
Width
/
2
-
4
,
_rect
.
Width
/
2
-
4
));
g
.
FillEllipse
(
new
SolidBrush
(
Color
.
FromArgb
(
50
,
Color
.
White
)),
new
Rectangle
(
_rect
.
Left
-
5
,
_rect
.
Top
-
5
,
_rect
.
Width
+
10
,
_rect
.
Height
+
10
));
}
}
/// <summary>
/// Enum BlowerEntranceDirection
/// </summary>
public
enum
BlowerEntranceDirection
{
/// <summary>
/// The none
/// </summary>
None
,
/// <summary>
/// The left
/// </summary>
Left
,
/// <summary>
/// The right
/// </summary>
Right
,
/// <summary>
/// Up
/// </summary>
Up
}
/// <summary>
/// Enum BlowerExitDirection
/// </summary>
public
enum
BlowerExitDirection
{
/// <summary>
/// The left
/// </summary>
Left
,
/// <summary>
/// The right
/// </summary>
Right
,
/// <summary>
/// Up
/// </summary>
Up
}
}
HZH_Controls/HZH_Controls/Controls/FactoryControls/Valve/UCValve.cs
查看文件 @
80c6539
...
...
@@ -32,6 +32,8 @@ namespace HZH_Controls.Controls
/// <seealso cref="System.Windows.Forms.UserControl" />
public
class
UCValve
:
UserControl
{
[
Description
(
"打开状态改变事件"
),
Category
(
"自定义"
)]
public
event
EventHandler
OpenChecked
;
/// <summary>
/// The valve style
/// </summary>
...
...
@@ -145,6 +147,10 @@ namespace HZH_Controls.Controls
{
opened
=
value
;
Refresh
();
if
(
OpenChecked
!=
null
)
{
OpenChecked
(
this
,
null
);
}
}
}
...
...
@@ -350,7 +356,7 @@ namespace HZH_Controls.Controls
rectJK1
=
new
Rectangle
(
this
.
Width
-
(
rectGuan
.
Width
+
this
.
Width
/
4
),
this
.
Width
/
8
,
rectGuan
.
Width
+
this
.
Width
/
4
,
rectGuan
.
Width
/
2
);
rectJK2
=
new
Rectangle
(
this
.
Width
-
(
rectGuan
.
Width
+
this
.
Width
/
4
),
this
.
Height
-
this
.
Width
/
8
-
rectGuan
.
Width
/
2
,
rectGuan
.
Width
+
this
.
Width
/
4
,
rectGuan
.
Width
/
2
);
linePath
.
AddLine
(
new
Point
(
rectGuan
.
Left
+
rectGuan
.
Width
/
2
,
rectGuan
.
Top
-
10
),
new
Point
(
rectGuan
.
Left
+
rectGuan
.
Width
/
2
,
rectGuan
.
Bottom
+
10
));
rectZ
=
new
Rectangle
(
10
,
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
/
4
)
/
2
,
rectGuan
.
Left
-
10
,
rectGuan
.
Width
/
4
);
rectZ
=
new
Rectangle
(
10
,
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
/
4
)
/
2
,
rectGuan
.
Left
-
10
,
rectGuan
.
Width
/
4
);
Point
[]
psRight
=
new
Point
[]
{
new
Point
(
rectGuan
.
Left
-
(
this
.
Width
/
8
+
5
)
,
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
/
2
)
/
2
),
...
...
@@ -363,11 +369,11 @@ namespace HZH_Controls.Controls
if
(
opened
)
{
bsPath
.
AddLine
(
(
10
+
(
rectGuan
.
Width
/
3
)
/
2
),
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
-
10
)
/
2
,
(
10
+
(
rectGuan
.
Width
/
3
)
/
2
),
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
-
10
)
/
2
+
rectGuan
.
Width
+
10
);
bsPath
.
AddLine
((
10
+
(
rectGuan
.
Width
/
3
)
/
2
),
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
-
10
)
/
2
,
(
10
+
(
rectGuan
.
Width
/
3
)
/
2
),
rectGuan
.
Top
+
(
rectGuan
.
Height
-
rectGuan
.
Width
-
10
)
/
2
+
rectGuan
.
Width
+
10
);
}
else
{
bsPath
.
AddLine
(
new
Point
(
1
,
rectGuan
.
Top
+
rectGuan
.
Height
/
2
-
3
),
new
Point
(
(
rectGuan
.
Width
+
10
),
rectGuan
.
Top
+
rectGuan
.
Height
/
2
+
4
));
bsPath
.
AddLine
(
new
Point
(
1
,
rectGuan
.
Top
+
rectGuan
.
Height
/
2
-
3
),
new
Point
(
(
rectGuan
.
Width
+
10
),
rectGuan
.
Top
+
rectGuan
.
Height
/
2
+
4
));
}
break
;
}
...
...
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
80c6539
...
...
@@ -43,6 +43,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\FactoryControls\Blower\UCBlower.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\FactoryControls\Bottle\UCBottle.cs">
<SubType>UserControl</SubType>
</Compile>
...
...
HZH_Controls/Test/Form4.Designer.cs
查看文件 @
80c6539
...
...
@@ -28,9 +28,11 @@
/// </summary>
private
void
InitializeComponent
()
{
this
.
ucBlower1
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
ucValve2
=
new
HZH_Controls
.
Controls
.
UCValve
();
this
.
ucPond1
=
new
HZH_Controls
.
Controls
.
UCPond
();
this
.
ucValve4
=
new
HZH_Controls
.
Controls
.
UCValve
();
this
.
ucValve1
=
new
HZH_Controls
.
Controls
.
UCValve
();
this
.
ucValve2
=
new
HZH_Controls
.
Controls
.
UCValve
();
this
.
ucValve3
=
new
HZH_Controls
.
Controls
.
UCValve
();
this
.
ucConveyor2
=
new
HZH_Controls
.
Controls
.
UCConveyor
();
this
.
ucConveyor6
=
new
HZH_Controls
.
Controls
.
UCConveyor
();
...
...
@@ -68,9 +70,60 @@
this
.
ucConduit10
=
new
HZH_Controls
.
Controls
.
Conduit
.
UCConduit
();
this
.
ucConduit1
=
new
HZH_Controls
.
Controls
.
Conduit
.
UCConduit
();
this
.
ucBottle1
=
new
HZH_Controls
.
Controls
.
UCBottle
();
this
.
ucPond1
=
new
HZH_Controls
.
Controls
.
UCPond
();
this
.
ucBlower2
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
ucBlower3
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
ucBlower4
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
ucBlower5
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
ucBlower6
=
new
HZH_Controls
.
Controls
.
UCBlower
();
this
.
SuspendLayout
();
//
// ucBlower1
//
this
.
ucBlower1
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower1
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Left
;
this
.
ucBlower1
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Left
;
this
.
ucBlower1
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower1
.
Location
=
new
System
.
Drawing
.
Point
(
657
,
366
);
this
.
ucBlower1
.
Name
=
"ucBlower1"
;
this
.
ucBlower1
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower1
.
TabIndex
=
24
;
//
// ucValve2
//
this
.
ucValve2
.
AsisBottomColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
AxisColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
LiquidColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
LiquidDirection
=
HZH_Controls
.
Controls
.
Conduit
.
LiquidDirection
.
Forward
;
this
.
ucValve2
.
LiquidSpeed
=
100
;
this
.
ucValve2
.
Location
=
new
System
.
Drawing
.
Point
(
1222
,
279
);
this
.
ucValve2
.
Name
=
"ucValve2"
;
this
.
ucValve2
.
Opened
=
true
;
this
.
ucValve2
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
131
);
this
.
ucValve2
.
SwitchColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
99
)))));
this
.
ucValve2
.
TabIndex
=
22
;
this
.
ucValve2
.
ValveColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucValve2
.
ValveStyle
=
HZH_Controls
.
Controls
.
ValveStyle
.
Vertical_Right
;
//
// ucPond1
//
this
.
ucPond1
.
LiquidColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucPond1
.
Location
=
new
System
.
Drawing
.
Point
(
1206
,
384
);
this
.
ucPond1
.
MaxValue
=
new
decimal
(
new
int
[]
{
100
,
0
,
0
,
0
});
this
.
ucPond1
.
Name
=
"ucPond1"
;
this
.
ucPond1
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
71
);
this
.
ucPond1
.
TabIndex
=
23
;
this
.
ucPond1
.
Value
=
new
decimal
(
new
int
[]
{
50
,
0
,
0
,
0
});
this
.
ucPond1
.
WallColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucPond1
.
WallWidth
=
2
;
//
// ucValve4
//
this
.
ucValve4
.
AsisBottomColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
...
...
@@ -103,22 +156,6 @@
this
.
ucValve1
.
ValveColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucValve1
.
ValveStyle
=
HZH_Controls
.
Controls
.
ValveStyle
.
Horizontal_Top
;
//
// ucValve2
//
this
.
ucValve2
.
AsisBottomColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
AxisColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
LiquidColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucValve2
.
LiquidDirection
=
HZH_Controls
.
Controls
.
Conduit
.
LiquidDirection
.
Forward
;
this
.
ucValve2
.
LiquidSpeed
=
100
;
this
.
ucValve2
.
Location
=
new
System
.
Drawing
.
Point
(
1222
,
279
);
this
.
ucValve2
.
Name
=
"ucValve2"
;
this
.
ucValve2
.
Opened
=
true
;
this
.
ucValve2
.
Size
=
new
System
.
Drawing
.
Size
(
97
,
131
);
this
.
ucValve2
.
SwitchColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
99
)))));
this
.
ucValve2
.
TabIndex
=
22
;
this
.
ucValve2
.
ValveColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucValve2
.
ValveStyle
=
HZH_Controls
.
Controls
.
ValveStyle
.
Vertical_Right
;
//
// ucValve3
//
this
.
ucValve3
.
AsisBottomColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
...
...
@@ -143,9 +180,9 @@
this
.
ucConveyor2
.
ConveyorHeight
=
30
;
this
.
ucConveyor2
.
ConveyorSpeed
=
100
;
this
.
ucConveyor2
.
Inclination
=
30D
;
this
.
ucConveyor2
.
Location
=
new
System
.
Drawing
.
Point
(
753
,
515
);
this
.
ucConveyor2
.
Location
=
new
System
.
Drawing
.
Point
(
604
,
549
);
this
.
ucConveyor2
.
Name
=
"ucConveyor2"
;
this
.
ucConveyor2
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
1
54
);
this
.
ucConveyor2
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
1
12
);
this
.
ucConveyor2
.
TabIndex
=
21
;
//
// ucConveyor6
...
...
@@ -156,9 +193,9 @@
this
.
ucConveyor6
.
ConveyorHeight
=
30
;
this
.
ucConveyor6
.
ConveyorSpeed
=
100
;
this
.
ucConveyor6
.
Inclination
=
90D
;
this
.
ucConveyor6
.
Location
=
new
System
.
Drawing
.
Point
(
1
161
,
472
);
this
.
ucConveyor6
.
Location
=
new
System
.
Drawing
.
Point
(
1
048
,
495
);
this
.
ucConveyor6
.
Name
=
"ucConveyor6"
;
this
.
ucConveyor6
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
1
97
);
this
.
ucConveyor6
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
1
73
);
this
.
ucConveyor6
.
TabIndex
=
21
;
//
// ucConveyor4
...
...
@@ -169,9 +206,9 @@
this
.
ucConveyor4
.
ConveyorHeight
=
30
;
this
.
ucConveyor4
.
ConveyorSpeed
=
100
;
this
.
ucConveyor4
.
Inclination
=
90D
;
this
.
ucConveyor4
.
Location
=
new
System
.
Drawing
.
Point
(
645
,
472
);
this
.
ucConveyor4
.
Location
=
new
System
.
Drawing
.
Point
(
529
,
503
);
this
.
ucConveyor4
.
Name
=
"ucConveyor4"
;
this
.
ucConveyor4
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
1
97
);
this
.
ucConveyor4
.
Size
=
new
System
.
Drawing
.
Size
(
72
,
1
65
);
this
.
ucConveyor4
.
TabIndex
=
21
;
//
// ucConveyor5
...
...
@@ -182,7 +219,7 @@
this
.
ucConveyor5
.
ConveyorHeight
=
30
;
this
.
ucConveyor5
.
ConveyorSpeed
=
100
;
this
.
ucConveyor5
.
Inclination
=
0D
;
this
.
ucConveyor5
.
Location
=
new
System
.
Drawing
.
Point
(
942
,
456
);
this
.
ucConveyor5
.
Location
=
new
System
.
Drawing
.
Point
(
823
,
489
);
this
.
ucConveyor5
.
Name
=
"ucConveyor5"
;
this
.
ucConveyor5
.
Size
=
new
System
.
Drawing
.
Size
(
213
,
53
);
this
.
ucConveyor5
.
TabIndex
=
21
;
...
...
@@ -195,7 +232,7 @@
this
.
ucConveyor3
.
ConveyorHeight
=
30
;
this
.
ucConveyor3
.
ConveyorSpeed
=
100
;
this
.
ucConveyor3
.
Inclination
=
0D
;
this
.
ucConveyor3
.
Location
=
new
System
.
Drawing
.
Point
(
723
,
456
);
this
.
ucConveyor3
.
Location
=
new
System
.
Drawing
.
Point
(
604
,
495
);
this
.
ucConveyor3
.
Name
=
"ucConveyor3"
;
this
.
ucConveyor3
.
Size
=
new
System
.
Drawing
.
Size
(
213
,
53
);
this
.
ucConveyor3
.
TabIndex
=
21
;
...
...
@@ -208,9 +245,9 @@
this
.
ucConveyor1
.
ConveyorHeight
=
30
;
this
.
ucConveyor1
.
ConveyorSpeed
=
100
;
this
.
ucConveyor1
.
Inclination
=
-
30D
;
this
.
ucConveyor1
.
Location
=
new
System
.
Drawing
.
Point
(
942
,
504
);
this
.
ucConveyor1
.
Location
=
new
System
.
Drawing
.
Point
(
802
,
548
);
this
.
ucConveyor1
.
Name
=
"ucConveyor1"
;
this
.
ucConveyor1
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
1
57
);
this
.
ucConveyor1
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
1
20
);
this
.
ucConveyor1
.
TabIndex
=
21
;
//
// ucConduit9
...
...
@@ -612,30 +649,72 @@
0
,
0
});
//
// ucPond1
//
this
.
ucPond1
.
Location
=
new
System
.
Drawing
.
Point
(
1206
,
384
);
this
.
ucPond1
.
MaxValue
=
new
decimal
(
new
int
[]
{
100
,
0
,
0
,
0
});
this
.
ucPond1
.
Name
=
"ucPond1"
;
this
.
ucPond1
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
71
);
this
.
ucPond1
.
TabIndex
=
23
;
this
.
ucPond1
.
Value
=
new
decimal
(
new
int
[]
{
50
,
0
,
0
,
0
});
this
.
ucPond1
.
WallColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucPond1
.
WallWidth
=
2
;
// ucBlower2
//
this
.
ucBlower2
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower2
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Left
;
this
.
ucBlower2
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Right
;
this
.
ucBlower2
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower2
.
Location
=
new
System
.
Drawing
.
Point
(
741
,
367
);
this
.
ucBlower2
.
Name
=
"ucBlower2"
;
this
.
ucBlower2
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower2
.
TabIndex
=
24
;
//
// ucBlower3
//
this
.
ucBlower3
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower3
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Left
;
this
.
ucBlower3
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Up
;
this
.
ucBlower3
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower3
.
Location
=
new
System
.
Drawing
.
Point
(
834
,
366
);
this
.
ucBlower3
.
Name
=
"ucBlower3"
;
this
.
ucBlower3
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower3
.
TabIndex
=
24
;
//
// ucBlower4
//
this
.
ucBlower4
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower4
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Right
;
this
.
ucBlower4
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Left
;
this
.
ucBlower4
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower4
.
Location
=
new
System
.
Drawing
.
Point
(
918
,
366
);
this
.
ucBlower4
.
Name
=
"ucBlower4"
;
this
.
ucBlower4
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower4
.
TabIndex
=
24
;
//
// ucBlower5
//
this
.
ucBlower5
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower5
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Right
;
this
.
ucBlower5
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Right
;
this
.
ucBlower5
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower5
.
Location
=
new
System
.
Drawing
.
Point
(
1001
,
366
);
this
.
ucBlower5
.
Name
=
"ucBlower5"
;
this
.
ucBlower5
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower5
.
TabIndex
=
24
;
//
// ucBlower6
//
this
.
ucBlower6
.
BlowerColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBlower6
.
EntranceDirection
=
HZH_Controls
.
Controls
.
BlowerEntranceDirection
.
Up
;
this
.
ucBlower6
.
ExitDirection
=
HZH_Controls
.
Controls
.
BlowerExitDirection
.
Up
;
this
.
ucBlower6
.
FanColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
3
)))),
((
int
)(((
byte
)(
169
)))),
((
int
)(((
byte
)(
243
)))));
this
.
ucBlower6
.
Location
=
new
System
.
Drawing
.
Point
(
1085
,
366
);
this
.
ucBlower6
.
Name
=
"ucBlower6"
;
this
.
ucBlower6
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
89
);
this
.
ucBlower6
.
TabIndex
=
24
;
//
// Form4
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1368
,
680
);
this
.
Controls
.
Add
(
this
.
ucBlower6
);
this
.
Controls
.
Add
(
this
.
ucBlower5
);
this
.
Controls
.
Add
(
this
.
ucBlower4
);
this
.
Controls
.
Add
(
this
.
ucBlower3
);
this
.
Controls
.
Add
(
this
.
ucBlower2
);
this
.
Controls
.
Add
(
this
.
ucBlower1
);
this
.
Controls
.
Add
(
this
.
ucValve2
);
this
.
Controls
.
Add
(
this
.
ucPond1
);
this
.
Controls
.
Add
(
this
.
ucValve4
);
...
...
@@ -726,5 +805,11 @@
private
HZH_Controls
.
Controls
.
UCValve
ucValve2
;
private
HZH_Controls
.
Controls
.
UCValve
ucValve4
;
private
HZH_Controls
.
Controls
.
UCPond
ucPond1
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower1
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower2
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower3
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower4
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower5
;
private
HZH_Controls
.
Controls
.
UCBlower
ucBlower6
;
}
}
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论