Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6761bffb
由
HZH
编写于
2019-09-06 13:37:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加倾斜管道
1 个父辈
6df48b22
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
71 行增加
和
3 行删除
HZH_Controls/HZH_Controls/Controls/FactoryControls/Conduit/UCConduit.cs
HZH_Controls/HZH_Controls/Controls/FactoryControls/Conveyor/UCConveyor.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/Conduit/UCConduit.cs
查看文件 @
6761bff
此文件的差异被折叠,
点击展开。
HZH_Controls/HZH_Controls/Controls/FactoryControls/Conveyor/UCConveyor.cs
查看文件 @
6761bff
...
...
@@ -225,7 +225,6 @@ namespace HZH_Controls.Controls
intHeight
=
this
.
Height
;
m_workingRect
=
new
Rectangle
((
this
.
Width
-
intWidth
)
/
2
+
1
,
(
this
.
Height
-
intHeight
)
/
2
+
1
,
intWidth
-
2
,
intHeight
-
2
);
}
}
/// <summary>
...
...
@@ -248,8 +247,7 @@ namespace HZH_Controls.Controls
var
rectRight
=
new
Rectangle
(
m_workingRect
.
Right
-
conveyorHeight
+
5
,
(
inclination
>=
0
?
(
m_workingRect
.
Top
)
:
(
m_workingRect
.
Bottom
-
conveyorHeight
))
+
5
,
conveyorHeight
-
10
,
conveyorHeight
-
10
);
g
.
FillEllipse
(
new
SolidBrush
(
conveyorColor
),
rectRight
);
g
.
FillEllipse
(
new
SolidBrush
(
Color
.
White
),
new
Rectangle
(
rectRight
.
Left
+
(
rectRight
.
Width
-
6
)
/
2
,
rectRight
.
Top
+
(
rectRight
.
Height
-
6
)
/
2
,
6
,
6
));
//传送带
//左端
GraphicsPath
path
=
new
GraphicsPath
();
...
...
HZH_Controls/HZH_Controls/Controls/FactoryControls/Valve/UCValve.cs
0 → 100644
查看文件 @
6761bff
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Drawing
;
using
System.Drawing.Drawing2D
;
namespace
HZH_Controls.Controls
{
public
class
UCValve
:
UserControl
{
private
ValveDirection
valveDirection
=
ValveDirection
.
Horizontal
;
public
ValveDirection
ValveDirection
{
get
{
return
valveDirection
;
}
set
{
valveDirection
=
value
;
}
}
public
UCValve
()
{
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
.
Size
=
new
Size
(
120
,
100
);
}
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
base
.
OnPaint
(
e
);
var
g
=
e
.
Graphics
;
g
.
SetGDIHigh
();
Rectangle
rectGuan
=
new
Rectangle
(
0
,
this
.
Height
/
2
-
this
.
Height
/
8
,
this
.
Width
,
this
.
Height
/
2
+
this
.
Height
/
4
);
//管道
g
.
FillRectangle
(
new
SolidBrush
(
Color
.
Red
),
new
Rectangle
(
rectGuan
.
Left
,
rectGuan
.
Top
+
this
.
Height
/
8
,
rectGuan
.
Width
,
this
.
Height
/
2
-
this
.
Height
/
8
));
//接口
g
.
FillRectangle
(
new
SolidBrush
(
Color
.
Red
),
new
Rectangle
(
this
.
Height
/
8
,
rectGuan
.
Top
,
rectGuan
.
Height
/
3
,
rectGuan
.
Height
));
g
.
FillRectangle
(
new
SolidBrush
(
Color
.
Red
),
new
Rectangle
(
rectGuan
.
Right
-
this
.
Height
/
8
-
rectGuan
.
Height
/
3
,
rectGuan
.
Top
,
rectGuan
.
Height
/
3
,
rectGuan
.
Height
));
//高亮
int
intCount
=
rectGuan
.
Height
/
2
/
4
;
int
intSplit
=
(
255
-
100
)
/
intCount
;
for
(
int
i
=
0
;
i
<
intCount
;
i
++)
{
int
_penWidth
=
rectGuan
.
Height
/
2
-
4
*
i
;
if
(
_penWidth
<=
0
)
_penWidth
=
1
;
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
Color
.
FromArgb
(
10
,
Color
.
White
)),
_penWidth
),
new
Point
(
rectGuan
.
Left
,
rectGuan
.
Height
/
2
+
rectGuan
.
Top
),
new
Point
(
rectGuan
.
Right
,
rectGuan
.
Height
/
2
+
rectGuan
.
Top
));
if
(
_penWidth
==
1
)
break
;
}
//阀门底座
}
}
public
enum
ValveDirection
{
Horizontal
,
Vertical
}
}
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
6761bff
...
...
@@ -99,6 +99,9 @@
<Compile Include="Controls\FactoryControls\Conveyor\UCConveyor.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\FactoryControls\Valve\UCValve.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDDataTime.cs">
<SubType>UserControl</SubType>
</Compile>
...
...
HZH_Controls/Test/Form4.Designer.cs
查看文件 @
6761bff
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论