Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0d07e236
由
HZH
编写于
2019-09-02 16:05:54 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
add LEDControl
1 个父辈
abbe9a3e
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
2054 行增加
和
4 行删除
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.Designer.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.resx
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.Designer.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.resx
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNum.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.Designer.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.resx
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.Designer.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.resx
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/Form2.Designer.cs
HZH_Controls/Test/Form2.cs
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.Designer.cs
0 → 100644
查看文件 @
0d07e23
namespace
HZH_Controls.Controls
{
partial
class
UCLEDData
{
/// <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
()
{
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
D1
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D2
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D3
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D4
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D5
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D6
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D7
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D8
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D9
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D10
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
tableLayoutPanel1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
ColumnCount
=
10
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
10F
));
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D1
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D2
,
1
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D3
,
2
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D4
,
3
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D5
,
4
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D6
,
5
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D7
,
6
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D8
,
7
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D9
,
8
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D10
,
9
,
0
);
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Absolute
,
20F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
360
,
58
);
this
.
tableLayoutPanel1
.
TabIndex
=
0
;
//
// D1
//
this
.
D1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D1
.
LineWidth
=
8
;
this
.
D1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
D1
.
Name
=
"D1"
;
this
.
D1
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D1
.
TabIndex
=
0
;
this
.
D1
.
Value
=
'2'
;
//
// D2
//
this
.
D2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D2
.
LineWidth
=
8
;
this
.
D2
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
3
);
this
.
D2
.
Name
=
"D2"
;
this
.
D2
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D2
.
TabIndex
=
1
;
this
.
D2
.
Value
=
'0'
;
//
// D3
//
this
.
D3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D3
.
LineWidth
=
8
;
this
.
D3
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
3
);
this
.
D3
.
Name
=
"D3"
;
this
.
D3
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D3
.
TabIndex
=
2
;
this
.
D3
.
Value
=
'1'
;
//
// D4
//
this
.
D4
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D4
.
LineWidth
=
8
;
this
.
D4
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
3
);
this
.
D4
.
Name
=
"D4"
;
this
.
D4
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D4
.
TabIndex
=
3
;
this
.
D4
.
Value
=
'9'
;
//
// D5
//
this
.
D5
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D5
.
LineWidth
=
8
;
this
.
D5
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
3
);
this
.
D5
.
Name
=
"D5"
;
this
.
D5
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D5
.
TabIndex
=
4
;
this
.
D5
.
Value
=
'-'
;
//
// D6
//
this
.
D6
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D6
.
LineWidth
=
8
;
this
.
D6
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
3
);
this
.
D6
.
Name
=
"D6"
;
this
.
D6
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D6
.
TabIndex
=
5
;
this
.
D6
.
Value
=
'0'
;
//
// D7
//
this
.
D7
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D7
.
LineWidth
=
8
;
this
.
D7
.
Location
=
new
System
.
Drawing
.
Point
(
219
,
3
);
this
.
D7
.
Name
=
"D7"
;
this
.
D7
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D7
.
TabIndex
=
6
;
this
.
D7
.
Value
=
'8'
;
//
// D8
//
this
.
D8
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D8
.
LineWidth
=
8
;
this
.
D8
.
Location
=
new
System
.
Drawing
.
Point
(
255
,
3
);
this
.
D8
.
Name
=
"D8"
;
this
.
D8
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D8
.
TabIndex
=
7
;
this
.
D8
.
Value
=
'-'
;
//
// D9
//
this
.
D9
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D9
.
LineWidth
=
8
;
this
.
D9
.
Location
=
new
System
.
Drawing
.
Point
(
291
,
3
);
this
.
D9
.
Name
=
"D9"
;
this
.
D9
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D9
.
TabIndex
=
8
;
this
.
D9
.
Value
=
'0'
;
//
// D10
//
this
.
D10
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D10
.
LineWidth
=
8
;
this
.
D10
.
Location
=
new
System
.
Drawing
.
Point
(
327
,
3
);
this
.
D10
.
Name
=
"D10"
;
this
.
D10
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D10
.
TabIndex
=
9
;
this
.
D10
.
Value
=
'1'
;
//
// UCLEDData
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
Name
=
"UCLEDData"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
360
,
58
);
this
.
tableLayoutPanel1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
UCLEDNum
D1
;
private
UCLEDNum
D2
;
private
UCLEDNum
D3
;
private
UCLEDNum
D4
;
private
UCLEDNum
D5
;
private
UCLEDNum
D6
;
private
UCLEDNum
D7
;
private
UCLEDNum
D8
;
private
UCLEDNum
D9
;
private
UCLEDNum
D10
;
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.cs
0 → 100644
查看文件 @
0d07e23
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
;
namespace
HZH_Controls.Controls
{
public
partial
class
UCLEDData
:
UserControl
{
private
DateTime
m_value
;
[
Description
(
"值"
),
Category
(
"自定义"
)]
public
DateTime
Value
{
get
{
return
m_value
;
}
set
{
m_value
=
value
;
string
str
=
value
.
ToString
(
"yyyy-MM-dd"
);
for
(
int
i
=
0
;
i
<
str
.
Length
;
i
++)
{
((
UCLEDNum
)
this
.
tableLayoutPanel1
.
Controls
.
Find
(
"D"
+
(
i
+
1
),
false
)[
0
]).
Value
=
str
[
i
];
}
}
}
private
int
m_lineWidth
=
8
;
[
Description
(
"线宽度,为了更好的显示效果,请使用偶数"
),
Category
(
"自定义"
)]
public
int
LineWidth
{
get
{
return
m_lineWidth
;
}
set
{
m_lineWidth
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
LineWidth
=
value
;
}
}
}
[
Description
(
"颜色"
),
Category
(
"自定义"
)]
public
override
System
.
Drawing
.
Color
ForeColor
{
get
{
return
base
.
ForeColor
;
}
set
{
base
.
ForeColor
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
ForeColor
=
value
;
}
}
}
public
UCLEDData
()
{
InitializeComponent
();
Value
=
DateTime
.
Now
;
}
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDData.resx
0 → 100644
查看文件 @
0d07e23
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.Designer.cs
0 → 100644
查看文件 @
0d07e23
namespace
HZH_Controls.Controls
{
partial
class
UCLEDDataTime
{
/// <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
()
{
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
D1
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D2
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D3
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D4
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D5
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D6
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D7
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D8
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D9
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D10
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D12
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D13
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D14
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D15
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D16
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D17
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D18
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D19
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
tableLayoutPanel1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
ColumnCount
=
19
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
5.263158F
));
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D1
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D2
,
1
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D3
,
2
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D4
,
3
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D5
,
4
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D6
,
5
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D7
,
6
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D8
,
7
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D9
,
8
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D10
,
9
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D12
,
11
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D13
,
12
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D14
,
13
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D15
,
14
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D16
,
15
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D17
,
16
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D18
,
17
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D19
,
18
,
0
);
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
650
,
58
);
this
.
tableLayoutPanel1
.
TabIndex
=
1
;
//
// D1
//
this
.
D1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D1
.
LineWidth
=
8
;
this
.
D1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
D1
.
Name
=
"D1"
;
this
.
D1
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D1
.
TabIndex
=
0
;
this
.
D1
.
Value
=
'2'
;
//
// D2
//
this
.
D2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D2
.
LineWidth
=
8
;
this
.
D2
.
Location
=
new
System
.
Drawing
.
Point
(
37
,
3
);
this
.
D2
.
Name
=
"D2"
;
this
.
D2
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D2
.
TabIndex
=
1
;
this
.
D2
.
Value
=
'0'
;
//
// D3
//
this
.
D3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D3
.
LineWidth
=
8
;
this
.
D3
.
Location
=
new
System
.
Drawing
.
Point
(
71
,
3
);
this
.
D3
.
Name
=
"D3"
;
this
.
D3
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D3
.
TabIndex
=
2
;
this
.
D3
.
Value
=
'1'
;
//
// D4
//
this
.
D4
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D4
.
LineWidth
=
8
;
this
.
D4
.
Location
=
new
System
.
Drawing
.
Point
(
105
,
3
);
this
.
D4
.
Name
=
"D4"
;
this
.
D4
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D4
.
TabIndex
=
3
;
this
.
D4
.
Value
=
'9'
;
//
// D5
//
this
.
D5
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D5
.
LineWidth
=
8
;
this
.
D5
.
Location
=
new
System
.
Drawing
.
Point
(
139
,
3
);
this
.
D5
.
Name
=
"D5"
;
this
.
D5
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D5
.
TabIndex
=
4
;
this
.
D5
.
Value
=
'-'
;
//
// D6
//
this
.
D6
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D6
.
LineWidth
=
8
;
this
.
D6
.
Location
=
new
System
.
Drawing
.
Point
(
173
,
3
);
this
.
D6
.
Name
=
"D6"
;
this
.
D6
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D6
.
TabIndex
=
5
;
this
.
D6
.
Value
=
'0'
;
//
// D7
//
this
.
D7
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D7
.
LineWidth
=
8
;
this
.
D7
.
Location
=
new
System
.
Drawing
.
Point
(
207
,
3
);
this
.
D7
.
Name
=
"D7"
;
this
.
D7
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D7
.
TabIndex
=
6
;
this
.
D7
.
Value
=
'8'
;
//
// D8
//
this
.
D8
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D8
.
LineWidth
=
8
;
this
.
D8
.
Location
=
new
System
.
Drawing
.
Point
(
241
,
3
);
this
.
D8
.
Name
=
"D8"
;
this
.
D8
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D8
.
TabIndex
=
7
;
this
.
D8
.
Value
=
'-'
;
//
// D9
//
this
.
D9
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D9
.
LineWidth
=
8
;
this
.
D9
.
Location
=
new
System
.
Drawing
.
Point
(
275
,
3
);
this
.
D9
.
Name
=
"D9"
;
this
.
D9
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D9
.
TabIndex
=
8
;
this
.
D9
.
Value
=
'0'
;
//
// D10
//
this
.
D10
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D10
.
LineWidth
=
8
;
this
.
D10
.
Location
=
new
System
.
Drawing
.
Point
(
309
,
3
);
this
.
D10
.
Name
=
"D10"
;
this
.
D10
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D10
.
TabIndex
=
9
;
this
.
D10
.
Value
=
'1'
;
//
// D12
//
this
.
D12
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D12
.
LineWidth
=
8
;
this
.
D12
.
Location
=
new
System
.
Drawing
.
Point
(
377
,
3
);
this
.
D12
.
Name
=
"D12"
;
this
.
D12
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D12
.
TabIndex
=
10
;
this
.
D12
.
Value
=
'2'
;
//
// D13
//
this
.
D13
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D13
.
LineWidth
=
8
;
this
.
D13
.
Location
=
new
System
.
Drawing
.
Point
(
411
,
3
);
this
.
D13
.
Name
=
"D13"
;
this
.
D13
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D13
.
TabIndex
=
11
;
this
.
D13
.
Value
=
'3'
;
//
// D14
//
this
.
D14
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D14
.
LineWidth
=
8
;
this
.
D14
.
Location
=
new
System
.
Drawing
.
Point
(
445
,
3
);
this
.
D14
.
Name
=
"D14"
;
this
.
D14
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D14
.
TabIndex
=
12
;
this
.
D14
.
Value
=
':'
;
//
// D15
//
this
.
D15
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D15
.
LineWidth
=
8
;
this
.
D15
.
Location
=
new
System
.
Drawing
.
Point
(
479
,
3
);
this
.
D15
.
Name
=
"D15"
;
this
.
D15
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D15
.
TabIndex
=
13
;
this
.
D15
.
Value
=
'0'
;
//
// D16
//
this
.
D16
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D16
.
LineWidth
=
8
;
this
.
D16
.
Location
=
new
System
.
Drawing
.
Point
(
513
,
3
);
this
.
D16
.
Name
=
"D16"
;
this
.
D16
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D16
.
TabIndex
=
14
;
this
.
D16
.
Value
=
'1'
;
//
// D17
//
this
.
D17
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D17
.
LineWidth
=
8
;
this
.
D17
.
Location
=
new
System
.
Drawing
.
Point
(
547
,
3
);
this
.
D17
.
Name
=
"D17"
;
this
.
D17
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D17
.
TabIndex
=
15
;
this
.
D17
.
Value
=
':'
;
//
// D18
//
this
.
D18
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D18
.
LineWidth
=
8
;
this
.
D18
.
Location
=
new
System
.
Drawing
.
Point
(
581
,
3
);
this
.
D18
.
Name
=
"D18"
;
this
.
D18
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
52
);
this
.
D18
.
TabIndex
=
16
;
this
.
D18
.
Value
=
'5'
;
//
// D19
//
this
.
D19
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D19
.
LineWidth
=
8
;
this
.
D19
.
Location
=
new
System
.
Drawing
.
Point
(
615
,
3
);
this
.
D19
.
Name
=
"D19"
;
this
.
D19
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
52
);
this
.
D19
.
TabIndex
=
17
;
this
.
D19
.
Value
=
'3'
;
//
// UCLEDDataTime
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Name
=
"UCLEDDataTime"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
650
,
58
);
this
.
tableLayoutPanel1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
UCLEDNum
D1
;
private
UCLEDNum
D2
;
private
UCLEDNum
D3
;
private
UCLEDNum
D4
;
private
UCLEDNum
D5
;
private
UCLEDNum
D6
;
private
UCLEDNum
D7
;
private
UCLEDNum
D8
;
private
UCLEDNum
D9
;
private
UCLEDNum
D10
;
private
UCLEDNum
D12
;
private
UCLEDNum
D13
;
private
UCLEDNum
D14
;
private
UCLEDNum
D15
;
private
UCLEDNum
D16
;
private
UCLEDNum
D17
;
private
UCLEDNum
D18
;
private
UCLEDNum
D19
;
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.cs
0 → 100644
查看文件 @
0d07e23
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
;
namespace
HZH_Controls.Controls
{
public
partial
class
UCLEDDataTime
:
UserControl
{
private
DateTime
m_value
;
[
Description
(
"值"
),
Category
(
"自定义"
)]
public
DateTime
Value
{
get
{
return
m_value
;
}
set
{
m_value
=
value
;
string
str
=
value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
for
(
int
i
=
0
;
i
<
str
.
Length
;
i
++)
{
if
(
i
==
10
)
continue
;
((
UCLEDNum
)
this
.
tableLayoutPanel1
.
Controls
.
Find
(
"D"
+
(
i
+
1
),
false
)[
0
]).
Value
=
str
[
i
];
}
}
}
private
int
m_lineWidth
=
8
;
[
Description
(
"线宽度,为了更好的显示效果,请使用偶数"
),
Category
(
"自定义"
)]
public
int
LineWidth
{
get
{
return
m_lineWidth
;
}
set
{
m_lineWidth
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
LineWidth
=
value
;
}
}
}
[
Description
(
"颜色"
),
Category
(
"自定义"
)]
public
override
System
.
Drawing
.
Color
ForeColor
{
get
{
return
base
.
ForeColor
;
}
set
{
base
.
ForeColor
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
ForeColor
=
value
;
}
}
}
public
UCLEDDataTime
()
{
InitializeComponent
();
Value
=
DateTime
.
Now
;
}
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDDataTime.resx
0 → 100644
查看文件 @
0d07e23
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNum.cs
0 → 100644
查看文件 @
0d07e23
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
{
/* 显示位置序号
* ****1***
* * *
* 6 2
* * *
* ****7***
* * *
* 5 3
* * *
* ****4***
*/
public
class
UCLEDNum
:
UserControl
{
Rectangle
m_drawRect
=
Rectangle
.
Empty
;
private
static
Dictionary
<
char
,
int
[
]>
m_nums
=
new
Dictionary
<
char
,
int
[
]>
();
static
UCLEDNum
()
{
m_nums
[
'0'
]
=
new
int
[]
{
1
,
2
,
3
,
4
,
5
,
6
};
m_nums
[
'1'
]
=
new
int
[]
{
2
,
3
};
m_nums
[
'2'
]
=
new
int
[]
{
1
,
2
,
5
,
4
,
7
};
m_nums
[
'3'
]
=
new
int
[]
{
1
,
2
,
7
,
3
,
4
};
m_nums
[
'4'
]
=
new
int
[]
{
2
,
3
,
6
,
7
};
m_nums
[
'5'
]
=
new
int
[]
{
1
,
6
,
7
,
3
,
4
};
m_nums
[
'6'
]
=
new
int
[]
{
1
,
6
,
5
,
4
,
3
,
7
};
m_nums
[
'7'
]
=
new
int
[]
{
1
,
2
,
3
};
m_nums
[
'8'
]
=
new
int
[]
{
1
,
2
,
3
,
4
,
5
,
6
,
7
};
m_nums
[
'9'
]
=
new
int
[]
{
1
,
2
,
3
,
4
,
7
,
6
};
m_nums
[
'-'
]
=
new
int
[]
{
7
};
m_nums
[
':'
]
=
new
int
[
0
];
m_nums
[
'.'
]
=
new
int
[
0
];
}
public
UCLEDNum
()
{
SizeChanged
+=
LEDNum_SizeChanged
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
if
(
m_drawRect
==
Rectangle
.
Empty
)
m_drawRect
=
new
Rectangle
(
1
,
1
,
this
.
Width
-
2
,
this
.
Height
-
2
);
}
void
LEDNum_SizeChanged
(
object
sender
,
EventArgs
e
)
{
m_drawRect
=
new
Rectangle
(
1
,
1
,
this
.
Width
-
2
,
this
.
Height
-
2
);
}
private
char
m_value
=
'0'
;
[
Description
(
"值"
),
Category
(
"自定义"
)]
public
char
Value
{
get
{
return
m_value
;
}
set
{
if
(!
m_nums
.
ContainsKey
(
value
))
{
return
;
}
if
(
m_value
!=
value
)
{
m_value
=
value
;
Refresh
();
}
}
}
private
int
m_lineWidth
=
8
;
[
Description
(
"线宽度,为了更好的显示效果,请使用偶数"
),
Category
(
"自定义"
)]
public
int
LineWidth
{
get
{
return
m_lineWidth
;
}
set
{
m_lineWidth
=
value
;
Refresh
();
}
}
[
Description
(
"颜色"
),
Category
(
"自定义"
)]
public
override
System
.
Drawing
.
Color
ForeColor
{
get
{
return
base
.
ForeColor
;
}
set
{
base
.
ForeColor
=
value
;
}
}
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
base
.
OnPaint
(
e
);
e
.
Graphics
.
SetGDIHigh
();
if
(
m_value
==
'.'
)
{
Rectangle
r2
=
new
Rectangle
(
m_drawRect
.
Left
+
(
m_drawRect
.
Width
-
m_lineWidth
)
/
2
,
m_drawRect
.
Bottom
-
m_lineWidth
*
2
,
m_lineWidth
,
m_lineWidth
);
e
.
Graphics
.
FillRectangle
(
new
SolidBrush
(
ForeColor
),
r2
);
}
else
if
(
m_value
==
':'
)
{
Rectangle
r1
=
new
Rectangle
(
m_drawRect
.
Left
+
(
m_drawRect
.
Width
-
m_lineWidth
)
/
2
,
m_drawRect
.
Top
+
(
m_drawRect
.
Height
/
2
-
m_lineWidth
)
/
2
,
m_lineWidth
,
m_lineWidth
);
e
.
Graphics
.
FillRectangle
(
new
SolidBrush
(
ForeColor
),
r1
);
Rectangle
r2
=
new
Rectangle
(
m_drawRect
.
Left
+
(
m_drawRect
.
Width
-
m_lineWidth
)
/
2
,
m_drawRect
.
Top
+
(
m_drawRect
.
Height
/
2
-
m_lineWidth
)
/
2
+
m_drawRect
.
Height
/
2
,
m_lineWidth
,
m_lineWidth
);
e
.
Graphics
.
FillRectangle
(
new
SolidBrush
(
ForeColor
),
r2
);
}
else
{
int
[]
vs
=
m_nums
[
m_value
];
if
(
vs
.
Contains
(
1
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Left
+
2
,
m_drawRect
.
Top
),
new
Point
(
m_drawRect
.
Right
-
2
,
m_drawRect
.
Top
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
-
2
,
m_drawRect
.
Top
+
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
+
2
,
m_drawRect
.
Top
+
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
+
2
,
m_drawRect
.
Top
)
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
2
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Top
),
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
/
2
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
+
m_lineWidth
/
2
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Top
+
m_lineWidth
),
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Top
)
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
3
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Bottom
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Bottom
-
m_lineWidth
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
/
2
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
-
m_lineWidth
/
2
),
new
Point
(
m_drawRect
.
Right
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
4
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Left
+
2
,
m_drawRect
.
Bottom
),
new
Point
(
m_drawRect
.
Right
-
2
,
m_drawRect
.
Bottom
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
-
2
,
m_drawRect
.
Bottom
-
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
+
2
,
m_drawRect
.
Bottom
-
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
+
2
,
m_drawRect
.
Bottom
)
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
5
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Bottom
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Bottom
-
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
/
2
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
-
m_lineWidth
/
2
),
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Bottom
-(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
6
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Top
),
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
/
2
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
+
m_lineWidth
/
2
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Top
+(
m_drawRect
.
Height
-
m_lineWidth
-
4
)/
2
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Top
+
m_lineWidth
),
new
Point
(
m_drawRect
.
Left
,
m_drawRect
.
Top
)
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
if
(
vs
.
Contains
(
7
))
{
GraphicsPath
path
=
new
GraphicsPath
();
path
.
AddLines
(
new
Point
[]
{
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
/
2
,
m_drawRect
.
Height
/
2
+
1
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Height
/
2
-
m_lineWidth
/
2
+
1
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Height
/
2
-
m_lineWidth
/
2
+
1
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
/
2
,
m_drawRect
.
Height
/
2
+
1
),
new
Point
(
m_drawRect
.
Right
-
m_lineWidth
,
m_drawRect
.
Height
/
2
+
m_lineWidth
/
2
+
1
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
,
m_drawRect
.
Height
/
2
+
m_lineWidth
/
2
+
1
),
new
Point
(
m_drawRect
.
Left
+
m_lineWidth
/
2
,
m_drawRect
.
Height
/
2
+
1
)
});
path
.
CloseAllFigures
();
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
ForeColor
),
path
);
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.Designer.cs
0 → 100644
查看文件 @
0d07e23
namespace
HZH_Controls.Controls.LED
{
partial
class
UCLEDNums
{
/// <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
()
{
this
.
SuspendLayout
();
//
// UCLEDNums
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
Name
=
"UCLEDNums"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
150
,
58
);
this
.
ResumeLayout
(
false
);
}
#
endregion
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.cs
0 → 100644
查看文件 @
0d07e23
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
;
namespace
HZH_Controls.Controls.LED
{
public
partial
class
UCLEDNums
:
UserControl
{
private
string
m_value
;
[
Description
(
"值"
),
Category
(
"自定义"
)]
public
string
Value
{
get
{
return
m_value
;
}
set
{
m_value
=
value
;
ReloadValue
();
}
}
private
int
m_lineWidth
=
8
;
[
Description
(
"线宽度,为了更好的显示效果,请使用偶数"
),
Category
(
"自定义"
)]
public
int
LineWidth
{
get
{
return
m_lineWidth
;
}
set
{
m_lineWidth
=
value
;
foreach
(
UCLEDNum
c
in
this
.
Controls
)
{
c
.
LineWidth
=
value
;
}
}
}
[
Description
(
"颜色"
),
Category
(
"自定义"
)]
public
override
System
.
Drawing
.
Color
ForeColor
{
get
{
return
base
.
ForeColor
;
}
set
{
base
.
ForeColor
=
value
;
foreach
(
UCLEDNum
c
in
this
.
Controls
)
{
c
.
ForeColor
=
value
;
}
}
}
public
override
RightToLeft
RightToLeft
{
get
{
return
base
.
RightToLeft
;
}
set
{
base
.
RightToLeft
=
value
;
ReloadValue
();
}
}
private
void
ReloadValue
()
{
try
{
ControlHelper
.
FreezeControl
(
this
,
true
);
this
.
Controls
.
Clear
();
foreach
(
var
item
in
m_value
)
{
UCLEDNum
uc
=
new
UCLEDNum
();
if
(
RightToLeft
==
System
.
Windows
.
Forms
.
RightToLeft
.
Yes
)
uc
.
Dock
=
DockStyle
.
Right
;
else
uc
.
Dock
=
DockStyle
.
Left
;
uc
.
Value
=
item
;
uc
.
ForeColor
=
ForeColor
;
uc
.
LineWidth
=
m_lineWidth
;
this
.
Controls
.
Add
(
uc
);
if
(
RightToLeft
==
System
.
Windows
.
Forms
.
RightToLeft
.
Yes
)
uc
.
SendToBack
();
else
uc
.
BringToFront
();
}
}
finally
{
ControlHelper
.
FreezeControl
(
this
,
false
);
}
}
public
UCLEDNums
()
{
InitializeComponent
();
Value
=
"0.00"
;
}
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDNums.resx
0 → 100644
查看文件 @
0d07e23
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.Designer.cs
0 → 100644
查看文件 @
0d07e23
namespace
HZH_Controls.Controls
{
partial
class
UCLEDTime
{
/// <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
()
{
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
D1
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D2
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D3
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D4
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D5
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D6
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D7
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
D8
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
tableLayoutPanel1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// tableLayoutPanel1
//
this
.
tableLayoutPanel1
.
ColumnCount
=
8
;
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
12.5F
));
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D1
,
0
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D2
,
1
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D3
,
2
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D4
,
3
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D5
,
4
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D6
,
5
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D7
,
6
,
0
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
this
.
D8
,
7
,
0
);
this
.
tableLayoutPanel1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tableLayoutPanel1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tableLayoutPanel1
.
Name
=
"tableLayoutPanel1"
;
this
.
tableLayoutPanel1
.
RowCount
=
1
;
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
System
.
Windows
.
Forms
.
RowStyle
(
System
.
Windows
.
Forms
.
SizeType
.
Percent
,
100F
));
this
.
tableLayoutPanel1
.
Size
=
new
System
.
Drawing
.
Size
(
290
,
58
);
this
.
tableLayoutPanel1
.
TabIndex
=
0
;
//
// D1
//
this
.
D1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D1
.
LineWidth
=
8
;
this
.
D1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
3
);
this
.
D1
.
Name
=
"D1"
;
this
.
D1
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D1
.
TabIndex
=
0
;
this
.
D1
.
Value
=
'2'
;
//
// D2
//
this
.
D2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D2
.
LineWidth
=
8
;
this
.
D2
.
Location
=
new
System
.
Drawing
.
Point
(
39
,
3
);
this
.
D2
.
Name
=
"D2"
;
this
.
D2
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D2
.
TabIndex
=
1
;
this
.
D2
.
Value
=
'3'
;
//
// D3
//
this
.
D3
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D3
.
LineWidth
=
8
;
this
.
D3
.
Location
=
new
System
.
Drawing
.
Point
(
75
,
3
);
this
.
D3
.
Name
=
"D3"
;
this
.
D3
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D3
.
TabIndex
=
2
;
this
.
D3
.
Value
=
':'
;
//
// D4
//
this
.
D4
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D4
.
LineWidth
=
8
;
this
.
D4
.
Location
=
new
System
.
Drawing
.
Point
(
111
,
3
);
this
.
D4
.
Name
=
"D4"
;
this
.
D4
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D4
.
TabIndex
=
3
;
this
.
D4
.
Value
=
'1'
;
//
// D5
//
this
.
D5
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D5
.
LineWidth
=
8
;
this
.
D5
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
3
);
this
.
D5
.
Name
=
"D5"
;
this
.
D5
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D5
.
TabIndex
=
4
;
this
.
D5
.
Value
=
'0'
;
//
// D6
//
this
.
D6
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D6
.
LineWidth
=
8
;
this
.
D6
.
Location
=
new
System
.
Drawing
.
Point
(
183
,
3
);
this
.
D6
.
Name
=
"D6"
;
this
.
D6
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D6
.
TabIndex
=
5
;
this
.
D6
.
Value
=
':'
;
//
// D7
//
this
.
D7
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D7
.
LineWidth
=
8
;
this
.
D7
.
Location
=
new
System
.
Drawing
.
Point
(
219
,
3
);
this
.
D7
.
Name
=
"D7"
;
this
.
D7
.
Size
=
new
System
.
Drawing
.
Size
(
30
,
52
);
this
.
D7
.
TabIndex
=
6
;
this
.
D7
.
Value
=
'1'
;
//
// D8
//
this
.
D8
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
D8
.
LineWidth
=
8
;
this
.
D8
.
Location
=
new
System
.
Drawing
.
Point
(
255
,
3
);
this
.
D8
.
Name
=
"D8"
;
this
.
D8
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
52
);
this
.
D8
.
TabIndex
=
7
;
this
.
D8
.
Value
=
'0'
;
//
// UCLEDTime
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
Name
=
"UCLEDTime"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
290
,
58
);
this
.
tableLayoutPanel1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
TableLayoutPanel
tableLayoutPanel1
;
private
UCLEDNum
D1
;
private
UCLEDNum
D2
;
private
UCLEDNum
D3
;
private
UCLEDNum
D4
;
private
UCLEDNum
D5
;
private
UCLEDNum
D6
;
private
UCLEDNum
D7
;
private
UCLEDNum
D8
;
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.cs
0 → 100644
查看文件 @
0d07e23
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
;
namespace
HZH_Controls.Controls
{
public
partial
class
UCLEDTime
:
UserControl
{
private
DateTime
m_value
;
[
Description
(
"值"
),
Category
(
"自定义"
)]
public
DateTime
Value
{
get
{
return
m_value
;
}
set
{
m_value
=
value
;
string
str
=
value
.
ToString
(
"HH:mm:ss"
);
for
(
int
i
=
0
;
i
<
str
.
Length
;
i
++)
{
((
UCLEDNum
)
this
.
tableLayoutPanel1
.
Controls
.
Find
(
"D"
+
(
i
+
1
),
false
)[
0
]).
Value
=
str
[
i
];
}
}
}
private
int
m_lineWidth
=
8
;
[
Description
(
"线宽度,为了更好的显示效果,请使用偶数"
),
Category
(
"自定义"
)]
public
int
LineWidth
{
get
{
return
m_lineWidth
;
}
set
{
m_lineWidth
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
LineWidth
=
value
;
}
}
}
[
Description
(
"颜色"
),
Category
(
"自定义"
)]
public
override
System
.
Drawing
.
Color
ForeColor
{
get
{
return
base
.
ForeColor
;
}
set
{
base
.
ForeColor
=
value
;
foreach
(
UCLEDNum
c
in
this
.
tableLayoutPanel1
.
Controls
)
{
c
.
ForeColor
=
value
;
}
}
}
public
UCLEDTime
()
{
InitializeComponent
();
Value
=
DateTime
.
Now
;
}
}
}
HZH_Controls/HZH_Controls/Controls/LED/UCLEDTime.resx
0 → 100644
查看文件 @
0d07e23
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
0d07e23
...
...
@@ -90,6 +90,33 @@
<Compile Include="Controls\DataGridView\UCDataGridViewTreeRow.Designer.cs">
<DependentUpon>UCDataGridViewTreeRow.cs</DependentUpon>
</Compile>
<Compile Include="Controls\LED\UCLEDDataTime.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDDataTime.Designer.cs">
<DependentUpon>UCLEDDataTime.cs</DependentUpon>
</Compile>
<Compile Include="Controls\LED\UCLEDNum.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDData.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDData.Designer.cs">
<DependentUpon>UCLEDData.cs</DependentUpon>
</Compile>
<Compile Include="Controls\LED\UCLEDNums.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDNums.Designer.cs">
<DependentUpon>UCLEDNums.cs</DependentUpon>
</Compile>
<Compile Include="Controls\LED\UCLEDTime.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\LED\UCLEDTime.Designer.cs">
<DependentUpon>UCLEDTime.cs</DependentUpon>
</Compile>
<Compile Include="Controls\List\IListViewItem.cs" />
<Compile Include="Controls\List\IPageControl.cs" />
<Compile Include="Controls\List\PageControlEventHandler.cs" />
...
...
@@ -486,6 +513,18 @@
<EmbeddedResource Include="Controls\KeyBord\UCKeyBorderPay.resx">
<DependentUpon>UCKeyBorderPay.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\LED\UCLEDData.resx">
<DependentUpon>UCLEDData.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\LED\UCLEDDataTime.resx">
<DependentUpon>UCLEDDataTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\LED\UCLEDNums.resx">
<DependentUpon>UCLEDNums.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\LED\UCLEDTime.resx">
<DependentUpon>UCLEDTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\List\UCHorizontalList.resx">
<DependentUpon>UCHorizontalList.cs</DependentUpon>
</EmbeddedResource>
...
...
HZH_Controls/Test/Form2.Designer.cs
查看文件 @
0d07e23
...
...
@@ -38,6 +38,23 @@
this
.
trackBar3
=
new
System
.
Windows
.
Forms
.
TrackBar
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
ucledNums1
=
new
HZH_Controls
.
Controls
.
LED
.
UCLEDNums
();
this
.
ucledDataTime1
=
new
HZH_Controls
.
Controls
.
UCLEDDataTime
();
this
.
ucledTime2
=
new
HZH_Controls
.
Controls
.
UCLEDTime
();
this
.
ucledDate1
=
new
HZH_Controls
.
Controls
.
UCLEDData
();
this
.
ucledNum12
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum11
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum10
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum9
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum8
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum7
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum6
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum5
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum4
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum3
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum2
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucledNum1
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ledNum1
=
new
HZH_Controls
.
Controls
.
UCLEDNum
();
this
.
ucTrackBar1
=
new
HZH_Controls
.
Controls
.
UCTrackBar
();
this
.
ucProcessWave2
=
new
HZH_Controls
.
Controls
.
UCProcessWave
();
this
.
ucProcessWave1
=
new
HZH_Controls
.
Controls
.
UCProcessWave
();
...
...
@@ -61,6 +78,7 @@
this
.
ucPanelTitle1
=
new
HZH_Controls
.
Controls
.
UCPanelTitle
();
this
.
ucStep2
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
ucStep1
=
new
HZH_Controls
.
Controls
.
UCStep
();
this
.
ucledNums2
=
new
HZH_Controls
.
Controls
.
LED
.
UCLEDNums
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar1
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar2
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
trackBar3
)).
BeginInit
();
...
...
@@ -139,7 +157,7 @@
//
// button1
//
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
1
087
,
412
);
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
1
187
,
19
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
106
,
56
);
this
.
button1
.
TabIndex
=
13
;
...
...
@@ -147,13 +165,185 @@
this
.
button1
.
UseVisualStyleBackColor
=
true
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click_1
);
//
// ucledNums1
//
this
.
ucledNums1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNums1
.
LineWidth
=
8
;
this
.
ucledNums1
.
Location
=
new
System
.
Drawing
.
Point
(
856
,
296
);
this
.
ucledNums1
.
Name
=
"ucledNums1"
;
this
.
ucledNums1
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
No
;
this
.
ucledNums1
.
Size
=
new
System
.
Drawing
.
Size
(
253
,
58
);
this
.
ucledNums1
.
TabIndex
=
18
;
this
.
ucledNums1
.
Value
=
"1.234"
;
//
// ucledDataTime1
//
this
.
ucledDataTime1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledDataTime1
.
LineWidth
=
8
;
this
.
ucledDataTime1
.
Location
=
new
System
.
Drawing
.
Point
(
839
,
474
);
this
.
ucledDataTime1
.
Name
=
"ucledDataTime1"
;
this
.
ucledDataTime1
.
Size
=
new
System
.
Drawing
.
Size
(
587
,
74
);
this
.
ucledDataTime1
.
TabIndex
=
17
;
this
.
ucledDataTime1
.
Value
=
new
System
.
DateTime
(
2019
,
9
,
2
,
15
,
52
,
45
,
485
);
//
// ucledTime2
//
this
.
ucledTime2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledTime2
.
LineWidth
=
8
;
this
.
ucledTime2
.
Location
=
new
System
.
Drawing
.
Point
(
1187
,
383
);
this
.
ucledTime2
.
Name
=
"ucledTime2"
;
this
.
ucledTime2
.
Size
=
new
System
.
Drawing
.
Size
(
239
,
74
);
this
.
ucledTime2
.
TabIndex
=
16
;
this
.
ucledTime2
.
Value
=
new
System
.
DateTime
(
2019
,
9
,
2
,
15
,
46
,
56
,
286
);
//
// ucledDate1
//
this
.
ucledDate1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledDate1
.
LineWidth
=
8
;
this
.
ucledDate1
.
Location
=
new
System
.
Drawing
.
Point
(
839
,
383
);
this
.
ucledDate1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
ucledDate1
.
Name
=
"ucledDate1"
;
this
.
ucledDate1
.
Size
=
new
System
.
Drawing
.
Size
(
302
,
74
);
this
.
ucledDate1
.
TabIndex
=
15
;
this
.
ucledDate1
.
Value
=
new
System
.
DateTime
(
2019
,
9
,
2
,
15
,
31
,
34
,
633
);
//
// ucledNum12
//
this
.
ucledNum12
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum12
.
LineWidth
=
8
;
this
.
ucledNum12
.
Location
=
new
System
.
Drawing
.
Point
(
1391
,
204
);
this
.
ucledNum12
.
Name
=
"ucledNum12"
;
this
.
ucledNum12
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum12
.
TabIndex
=
14
;
this
.
ucledNum12
.
Value
=
'-'
;
//
// ucledNum11
//
this
.
ucledNum11
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum11
.
LineWidth
=
8
;
this
.
ucledNum11
.
Location
=
new
System
.
Drawing
.
Point
(
1345
,
204
);
this
.
ucledNum11
.
Name
=
"ucledNum11"
;
this
.
ucledNum11
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum11
.
TabIndex
=
14
;
this
.
ucledNum11
.
Value
=
'.'
;
//
// ucledNum10
//
this
.
ucledNum10
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum10
.
LineWidth
=
8
;
this
.
ucledNum10
.
Location
=
new
System
.
Drawing
.
Point
(
1299
,
204
);
this
.
ucledNum10
.
Name
=
"ucledNum10"
;
this
.
ucledNum10
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum10
.
TabIndex
=
14
;
this
.
ucledNum10
.
Value
=
':'
;
//
// ucledNum9
//
this
.
ucledNum9
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum9
.
LineWidth
=
8
;
this
.
ucledNum9
.
Location
=
new
System
.
Drawing
.
Point
(
1253
,
204
);
this
.
ucledNum9
.
Name
=
"ucledNum9"
;
this
.
ucledNum9
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum9
.
TabIndex
=
14
;
this
.
ucledNum9
.
Value
=
'0'
;
//
// ucledNum8
//
this
.
ucledNum8
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum8
.
LineWidth
=
8
;
this
.
ucledNum8
.
Location
=
new
System
.
Drawing
.
Point
(
1207
,
204
);
this
.
ucledNum8
.
Name
=
"ucledNum8"
;
this
.
ucledNum8
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum8
.
TabIndex
=
14
;
this
.
ucledNum8
.
Value
=
'9'
;
//
// ucledNum7
//
this
.
ucledNum7
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum7
.
LineWidth
=
8
;
this
.
ucledNum7
.
Location
=
new
System
.
Drawing
.
Point
(
1161
,
204
);
this
.
ucledNum7
.
Name
=
"ucledNum7"
;
this
.
ucledNum7
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum7
.
TabIndex
=
14
;
this
.
ucledNum7
.
Value
=
'8'
;
//
// ucledNum6
//
this
.
ucledNum6
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum6
.
LineWidth
=
8
;
this
.
ucledNum6
.
Location
=
new
System
.
Drawing
.
Point
(
1115
,
204
);
this
.
ucledNum6
.
Name
=
"ucledNum6"
;
this
.
ucledNum6
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum6
.
TabIndex
=
14
;
this
.
ucledNum6
.
Value
=
'7'
;
//
// ucledNum5
//
this
.
ucledNum5
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum5
.
LineWidth
=
8
;
this
.
ucledNum5
.
Location
=
new
System
.
Drawing
.
Point
(
1069
,
204
);
this
.
ucledNum5
.
Name
=
"ucledNum5"
;
this
.
ucledNum5
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum5
.
TabIndex
=
14
;
this
.
ucledNum5
.
Value
=
'6'
;
//
// ucledNum4
//
this
.
ucledNum4
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum4
.
LineWidth
=
8
;
this
.
ucledNum4
.
Location
=
new
System
.
Drawing
.
Point
(
1023
,
204
);
this
.
ucledNum4
.
Name
=
"ucledNum4"
;
this
.
ucledNum4
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum4
.
TabIndex
=
14
;
this
.
ucledNum4
.
Value
=
'5'
;
//
// ucledNum3
//
this
.
ucledNum3
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum3
.
LineWidth
=
8
;
this
.
ucledNum3
.
Location
=
new
System
.
Drawing
.
Point
(
977
,
204
);
this
.
ucledNum3
.
Name
=
"ucledNum3"
;
this
.
ucledNum3
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum3
.
TabIndex
=
14
;
this
.
ucledNum3
.
Value
=
'4'
;
//
// ucledNum2
//
this
.
ucledNum2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum2
.
LineWidth
=
8
;
this
.
ucledNum2
.
Location
=
new
System
.
Drawing
.
Point
(
931
,
204
);
this
.
ucledNum2
.
Name
=
"ucledNum2"
;
this
.
ucledNum2
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum2
.
TabIndex
=
14
;
this
.
ucledNum2
.
Value
=
'3'
;
//
// ucledNum1
//
this
.
ucledNum1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNum1
.
LineWidth
=
8
;
this
.
ucledNum1
.
Location
=
new
System
.
Drawing
.
Point
(
885
,
204
);
this
.
ucledNum1
.
Name
=
"ucledNum1"
;
this
.
ucledNum1
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ucledNum1
.
TabIndex
=
14
;
this
.
ucledNum1
.
Value
=
'2'
;
//
// ledNum1
//
this
.
ledNum1
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ledNum1
.
LineWidth
=
8
;
this
.
ledNum1
.
Location
=
new
System
.
Drawing
.
Point
(
839
,
204
);
this
.
ledNum1
.
Name
=
"ledNum1"
;
this
.
ledNum1
.
Size
=
new
System
.
Drawing
.
Size
(
40
,
70
);
this
.
ledNum1
.
TabIndex
=
14
;
this
.
ledNum1
.
Value
=
'1'
;
//
// ucTrackBar1
//
this
.
ucTrackBar1
.
DcimalDigits
=
1
;
this
.
ucTrackBar1
.
IsShowTips
=
true
;
this
.
ucTrackBar1
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
228
)))),
((
int
)(((
byte
)(
231
)))),
((
int
)(((
byte
)(
237
)))));
this
.
ucTrackBar1
.
LineWidth
=
10F
;
this
.
ucTrackBar1
.
Location
=
new
System
.
Drawing
.
Point
(
905
,
273
);
this
.
ucTrackBar1
.
Location
=
new
System
.
Drawing
.
Point
(
1161
,
137
);
this
.
ucTrackBar1
.
MaxValue
=
100F
;
this
.
ucTrackBar1
.
MinValue
=
0F
;
this
.
ucTrackBar1
.
Name
=
"ucTrackBar1"
;
...
...
@@ -174,7 +364,7 @@
this
.
ucProcessWave2
.
IsRadius
=
false
;
this
.
ucProcessWave2
.
IsRectangle
=
false
;
this
.
ucProcessWave2
.
IsShowRect
=
true
;
this
.
ucProcessWave2
.
Location
=
new
System
.
Drawing
.
Point
(
702
,
206
);
this
.
ucProcessWave2
.
Location
=
new
System
.
Drawing
.
Point
(
682
,
204
);
this
.
ucProcessWave2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
5
,
4
,
5
);
this
.
ucProcessWave2
.
MaxValue
=
100
;
this
.
ucProcessWave2
.
Name
=
"ucProcessWave2"
;
...
...
@@ -222,7 +412,7 @@
this
.
ucWaveWithSource1
.
Name
=
"ucWaveWithSource1"
;
this
.
ucWaveWithSource1
.
RectColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))));
this
.
ucWaveWithSource1
.
RectWidth
=
1
;
this
.
ucWaveWithSource1
.
Size
=
new
System
.
Drawing
.
Size
(
586
,
182
);
this
.
ucWaveWithSource1
.
Size
=
new
System
.
Drawing
.
Size
(
385
,
182
);
this
.
ucWaveWithSource1
.
SleepTime
=
1000
;
this
.
ucWaveWithSource1
.
TabIndex
=
10
;
this
.
ucWaveWithSource1
.
WaveWidth
=
50
;
...
...
@@ -521,11 +711,40 @@
this
.
ucStep1
.
StepWidth
=
35
;
this
.
ucStep1
.
TabIndex
=
0
;
//
// ucledNums2
//
this
.
ucledNums2
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucledNums2
.
LineWidth
=
8
;
this
.
ucledNums2
.
Location
=
new
System
.
Drawing
.
Point
(
1158
,
296
);
this
.
ucledNums2
.
Name
=
"ucledNums2"
;
this
.
ucledNums2
.
RightToLeft
=
System
.
Windows
.
Forms
.
RightToLeft
.
Yes
;
this
.
ucledNums2
.
Size
=
new
System
.
Drawing
.
Size
(
253
,
58
);
this
.
ucledNums2
.
TabIndex
=
18
;
this
.
ucledNums2
.
Value
=
"1.234"
;
//
// 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
.
ucledNums2
);
this
.
Controls
.
Add
(
this
.
ucledNums1
);
this
.
Controls
.
Add
(
this
.
ucledDataTime1
);
this
.
Controls
.
Add
(
this
.
ucledTime2
);
this
.
Controls
.
Add
(
this
.
ucledDate1
);
this
.
Controls
.
Add
(
this
.
ucledNum12
);
this
.
Controls
.
Add
(
this
.
ucledNum11
);
this
.
Controls
.
Add
(
this
.
ucledNum10
);
this
.
Controls
.
Add
(
this
.
ucledNum9
);
this
.
Controls
.
Add
(
this
.
ucledNum8
);
this
.
Controls
.
Add
(
this
.
ucledNum7
);
this
.
Controls
.
Add
(
this
.
ucledNum6
);
this
.
Controls
.
Add
(
this
.
ucledNum5
);
this
.
Controls
.
Add
(
this
.
ucledNum4
);
this
.
Controls
.
Add
(
this
.
ucledNum3
);
this
.
Controls
.
Add
(
this
.
ucledNum2
);
this
.
Controls
.
Add
(
this
.
ucledNum1
);
this
.
Controls
.
Add
(
this
.
ledNum1
);
this
.
Controls
.
Add
(
this
.
button1
);
this
.
Controls
.
Add
(
this
.
ucTrackBar1
);
this
.
Controls
.
Add
(
this
.
ucProcessWave2
);
...
...
@@ -600,6 +819,24 @@
private
HZH_Controls
.
Controls
.
UCProcessWave
ucProcessWave2
;
private
HZH_Controls
.
Controls
.
UCTrackBar
ucTrackBar1
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ledNum1
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum1
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum2
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum3
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum4
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum5
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum6
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum7
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum8
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum9
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum10
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum11
;
private
HZH_Controls
.
Controls
.
UCLEDNum
ucledNum12
;
private
HZH_Controls
.
Controls
.
UCLEDData
ucledDate1
;
private
HZH_Controls
.
Controls
.
UCLEDTime
ucledTime2
;
private
HZH_Controls
.
Controls
.
UCLEDDataTime
ucledDataTime1
;
private
HZH_Controls
.
Controls
.
LED
.
UCLEDNums
ucledNums1
;
private
HZH_Controls
.
Controls
.
LED
.
UCLEDNums
ucledNums2
;
}
}
\ No newline at end of file
HZH_Controls/Test/Form2.cs
查看文件 @
0d07e23
...
...
@@ -48,6 +48,9 @@ namespace Test
Random
r
=
new
Random
();
int
i
=
r
.
Next
(
100
,
1000
);
this
.
ucWaveWithSource1
.
AddSource
(
i
.
ToString
(),
i
);
ucledDataTime1
.
Value
=
DateTime
.
Now
;
ucledTime2
.
Value
=
DateTime
.
Now
;
}
private
void
trackBar1_Scroll
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论