Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 01c099c5
由
HZH
编写于
2019-10-09 14:56:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加时间轴
1 个父辈
b5f5cb77
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
709 行增加
和
0 行删除
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.Designer.cs
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.cs
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.resx
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/FrmMain.cs
HZH_Controls/Test/Test.csproj
HZH_Controls/Test/UC/UCTestNavigationMenu.cs
HZH_Controls/Test/UC/UCTestSplitLabel.cs
HZH_Controls/Test/UC/UCTestTimeLine.Designer.cs
HZH_Controls/Test/UC/UCTestTimeLine.cs
HZH_Controls/Test/UC/UCTestTimeLine.resx
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.Designer.cs
0 → 100644
查看文件 @
01c099c
namespace
HZH_Controls.Controls
{
partial
class
UCTimeLine
{
/// <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
();
//
// UCTimeLine
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScroll
=
true
;
this
.
Name
=
"UCTimeLine"
;
this
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
30
,
0
,
0
,
0
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
673
,
377
);
this
.
ResumeLayout
(
false
);
}
#
endregion
}
}
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.cs
0 → 100644
查看文件 @
01c099c
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-10-09
//
// ***********************************************************************
// <copyright file="UCTimeLine.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.ComponentModel
;
using
System.Drawing
;
using
System.Data
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
namespace
HZH_Controls.Controls
{
/// <summary>
/// Class UCTimeLine.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public
partial
class
UCTimeLine
:
UserControl
{
/// <summary>
/// The line color
/// </summary>
private
Color
lineColor
=
TextColors
.
Light
;
/// <summary>
/// Gets or sets the color of the line.
/// </summary>
/// <value>The color of the line.</value>
[
Description
(
"连接线颜色"
),
Category
(
"自定义"
)]
public
Color
LineColor
{
get
{
return
lineColor
;
}
set
{
lineColor
=
value
;
Invalidate
();
}
}
/// <summary>
/// The title font
/// </summary>
private
Font
titleFont
=
new
Font
(
"微软雅黑"
,
14f
);
/// <summary>
/// Gets or sets the title font.
/// </summary>
/// <value>The title font.</value>
[
Description
(
"标题字体"
),
Category
(
"自定义"
)]
public
Font
TitleFont
{
get
{
return
titleFont
;
}
set
{
titleFont
=
value
;
ReloadItems
();
}
}
/// <summary>
/// The title forcolor
/// </summary>
private
Color
titleForcolor
=
TextColors
.
MoreDark
;
/// <summary>
/// Gets or sets the title forcolor.
/// </summary>
/// <value>The title forcolor.</value>
[
Description
(
"标题颜色"
),
Category
(
"自定义"
)]
public
Color
TitleForcolor
{
get
{
return
titleForcolor
;
}
set
{
titleForcolor
=
value
;
ReloadItems
();
}
}
/// <summary>
/// The details font
/// </summary>
private
Font
detailsFont
=
new
Font
(
"微软雅黑"
,
10
);
/// <summary>
/// Gets or sets the details font.
/// </summary>
/// <value>The details font.</value>
[
Description
(
"详情字体"
),
Category
(
"自定义"
)]
public
Font
DetailsFont
{
get
{
return
detailsFont
;
}
set
{
detailsFont
=
value
;
ReloadItems
();
}
}
/// <summary>
/// The details forcolor
/// </summary>
private
Color
detailsForcolor
=
TextColors
.
Light
;
/// <summary>
/// Gets or sets the details forcolor.
/// </summary>
/// <value>The details forcolor.</value>
[
Description
(
"详情颜色"
),
Category
(
"自定义"
)]
public
Color
DetailsForcolor
{
get
{
return
detailsForcolor
;
}
set
{
detailsForcolor
=
value
;
ReloadItems
();
}
}
/// <summary>
/// The items
/// </summary>
TimeLineItem
[]
items
;
/// <summary>
/// Gets or sets the items.
/// </summary>
/// <value>The items.</value>
[
Description
(
"项列表"
),
Category
(
"自定义"
)]
public
TimeLineItem
[]
Items
{
get
{
return
items
;
}
set
{
items
=
value
;
ReloadItems
();
}
}
/// <summary>
/// Initializes a new instance of the <see cref="UCTimeLine"/> class.
/// </summary>
public
UCTimeLine
()
{
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
);
InitializeComponent
();
items
=
new
TimeLineItem
[
0
];
if
(
ControlHelper
.
IsDesignMode
())
{
items
=
new
TimeLineItem
[
4
];
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
items
[
i
]
=
new
TimeLineItem
()
{
Title
=
DateTime
.
Now
.
AddMonths
(-
1
*
(
3
-
i
)).
ToString
(
"yyyy年MM月"
),
Details
=
DateTime
.
Now
.
AddMonths
(-
1
*
(
3
-
i
)).
ToString
(
"yyyy年MM月"
)
+
"发生了一件大事,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,然后王二麻子他爹王咔嚓出生了。"
};
}
ReloadItems
();
}
}
/// <summary>
/// Reloads the items.
/// </summary>
private
void
ReloadItems
()
{
try
{
ControlHelper
.
FreezeControl
(
this
,
true
);
this
.
Controls
.
Clear
();
if
(
items
!=
null
)
{
foreach
(
var
item
in
items
)
{
FlowLayoutPanel
panelTitle
=
new
FlowLayoutPanel
();
panelTitle
.
Dock
=
DockStyle
.
Top
;
panelTitle
.
AutoScroll
=
false
;
panelTitle
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
panelTitle
.
Name
=
"title_"
+
Guid
.
NewGuid
().
ToString
();
Label
lblTitle
=
new
Label
();
lblTitle
.
Dock
=
DockStyle
.
Top
;
lblTitle
.
AutoSize
=
true
;
lblTitle
.
Font
=
titleFont
;
lblTitle
.
ForeColor
=
titleForcolor
;
lblTitle
.
Text
=
item
.
Title
;
lblTitle
.
SizeChanged
+=
item_SizeChanged
;
panelTitle
.
Controls
.
Add
(
lblTitle
);
this
.
Controls
.
Add
(
panelTitle
);
panelTitle
.
BringToFront
();
FlowLayoutPanel
panelDetails
=
new
FlowLayoutPanel
();
panelDetails
.
Dock
=
DockStyle
.
Top
;
panelDetails
.
AutoScroll
=
false
;
panelDetails
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
5
);
panelDetails
.
Name
=
"details_"
+
Guid
.
NewGuid
().
ToString
();
Label
lblDetails
=
new
Label
();
lblDetails
.
AutoSize
=
true
;
lblDetails
.
Dock
=
DockStyle
.
Top
;
lblDetails
.
Font
=
detailsFont
;
lblDetails
.
ForeColor
=
detailsForcolor
;
lblDetails
.
Text
=
item
.
Details
;
lblDetails
.
SizeChanged
+=
item_SizeChanged
;
panelDetails
.
Controls
.
Add
(
lblDetails
);
this
.
Controls
.
Add
(
panelDetails
);
panelDetails
.
BringToFront
();
}
}
}
finally
{
ControlHelper
.
FreezeControl
(
this
,
false
);
}
}
/// <summary>
/// Handles the SizeChanged event of the item 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
item_SizeChanged
(
object
sender
,
EventArgs
e
)
{
Label
lbl
=
(
Label
)
sender
;
lbl
.
Parent
.
Height
=
lbl
.
Height
+
10
;
}
/// <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
();
var
lst
=
this
.
Controls
.
ToArray
().
Where
(
p
=>
p
.
Name
.
StartsWith
(
"title_"
)).
ToList
();
for
(
int
i
=
0
;
i
<
lst
.
Count
;
i
++)
{
//画圆
g
.
DrawEllipse
(
new
Pen
(
new
SolidBrush
(
lineColor
)),
new
Rectangle
(
7
,
lst
[
i
].
Location
.
Y
+
10
,
16
,
16
));
//划线
if
(
i
!=
lst
.
Count
-
1
)
{
g
.
DrawLine
(
new
Pen
(
new
SolidBrush
(
lineColor
)),
new
Point
(
7
+
8
,
lst
[
i
].
Location
.
Y
+
10
-
2
),
new
Point
(
7
+
8
,
lst
[
i
+
1
].
Location
.
Y
+
10
+
16
+
2
));
}
}
}
}
/// <summary>
/// Class TimeLineItem.
/// </summary>
public
class
TimeLineItem
{
/// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// Gets or sets the details.
/// </summary>
/// <value>The details.</value>
public
string
Details
{
get
;
set
;
}
}
}
HZH_Controls/HZH_Controls/Controls/TimeLine/UCTimeLine.resx
0 → 100644
查看文件 @
01c099c
<?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
\ No newline at end of file
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
01c099c
...
@@ -107,6 +107,12 @@
...
@@ -107,6 +107,12 @@
<Compile Include="Controls\SplitLabel\UCSplitLabel.cs">
<Compile Include="Controls\SplitLabel\UCSplitLabel.cs">
<SubType>Component</SubType>
<SubType>Component</SubType>
</Compile>
</Compile>
<Compile Include="Controls\TimeLine\UCTimeLine.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\TimeLine\UCTimeLine.Designer.cs">
<DependentUpon>UCTimeLine.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Verification\VerificationAttribute.cs" />
<Compile Include="Controls\Verification\VerificationAttribute.cs" />
<Compile Include="Controls\Verification\VerificationComponent.cs">
<Compile Include="Controls\Verification\VerificationComponent.cs">
<SubType>Component</SubType>
<SubType>Component</SubType>
...
@@ -753,6 +759,9 @@
...
@@ -753,6 +759,9 @@
<EmbeddedResource Include="Controls\Text\UCTextBoxEx.resx">
<EmbeddedResource Include="Controls\Text\UCTextBoxEx.resx">
<DependentUpon>UCTextBoxEx.cs</DependentUpon>
<DependentUpon>UCTextBoxEx.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\TimeLine\UCTimeLine.resx">
<DependentUpon>UCTimeLine.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\UCControlBase.resx">
<EmbeddedResource Include="Controls\UCControlBase.resx">
<DependentUpon>UCControlBase.cs</DependentUpon>
<DependentUpon>UCControlBase.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
HZH_Controls/Test/FrmMain.cs
查看文件 @
01c099c
...
@@ -66,6 +66,7 @@ namespace Test
...
@@ -66,6 +66,7 @@ namespace Test
tnControl
.
Nodes
.
Add
(
"内置颜色"
);
tnControl
.
Nodes
.
Add
(
"内置颜色"
);
tnControl
.
Nodes
.
Add
(
"导航菜单"
);
tnControl
.
Nodes
.
Add
(
"导航菜单"
);
tnControl
.
Nodes
.
Add
(
"分割线标签"
);
tnControl
.
Nodes
.
Add
(
"分割线标签"
);
tnControl
.
Nodes
.
Add
(
"时间轴"
);
this
.
tvMenu
.
Nodes
.
Add
(
tnControl
);
this
.
tvMenu
.
Nodes
.
Add
(
tnControl
);
TreeNode
tnCharts
=
new
TreeNode
(
" 图表"
);
TreeNode
tnCharts
=
new
TreeNode
(
" 图表"
);
...
@@ -271,6 +272,9 @@ namespace Test
...
@@ -271,6 +272,9 @@ namespace Test
case
"分割线标签"
:
case
"分割线标签"
:
AddControl
(
new
UC
.
UCTestSplitLabel
());
AddControl
(
new
UC
.
UCTestSplitLabel
());
break
;
break
;
case
"时间轴"
:
AddControl
(
new
UC
.
UCTestTimeLine
()
{
Dock
=
DockStyle
.
Fill
});
break
;
#
endregion
#
endregion
#
region
图表
English
:
Chart
#
region
图表
English
:
Chart
...
...
HZH_Controls/Test/Test.csproj
查看文件 @
01c099c
...
@@ -302,6 +302,12 @@
...
@@ -302,6 +302,12 @@
<Compile Include="UC\UCTestThermometer.Designer.cs">
<Compile Include="UC\UCTestThermometer.Designer.cs">
<DependentUpon>UCTestThermometer.cs</DependentUpon>
<DependentUpon>UCTestThermometer.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\UCTestTimeLine.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestTimeLine.Designer.cs">
<DependentUpon>UCTestTimeLine.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestTips.cs">
<Compile Include="UC\UCTestTips.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
...
@@ -485,6 +491,9 @@
...
@@ -485,6 +491,9 @@
<EmbeddedResource Include="UC\UCTestThermometer.resx">
<EmbeddedResource Include="UC\UCTestThermometer.resx">
<DependentUpon>UCTestThermometer.cs</DependentUpon>
<DependentUpon>UCTestThermometer.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestTimeLine.resx">
<DependentUpon>UCTestTimeLine.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestTips.resx">
<EmbeddedResource Include="UC\UCTestTips.resx">
<DependentUpon>UCTestTips.cs</DependentUpon>
<DependentUpon>UCTestTips.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
...
HZH_Controls/Test/UC/UCTestNavigationMenu.cs
查看文件 @
01c099c
...
@@ -9,6 +9,7 @@ using System.Windows.Forms;
...
@@ -9,6 +9,7 @@ using System.Windows.Forms;
namespace
Test.UC
namespace
Test.UC
{
{
[
ToolboxItem
(
false
)]
public
partial
class
UCTestNavigationMenu
:
UserControl
public
partial
class
UCTestNavigationMenu
:
UserControl
{
{
public
UCTestNavigationMenu
()
public
UCTestNavigationMenu
()
...
...
HZH_Controls/Test/UC/UCTestSplitLabel.cs
查看文件 @
01c099c
...
@@ -9,6 +9,7 @@ using System.Windows.Forms;
...
@@ -9,6 +9,7 @@ using System.Windows.Forms;
namespace
Test.UC
namespace
Test.UC
{
{
[
ToolboxItem
(
false
)]
public
partial
class
UCTestSplitLabel
:
UserControl
public
partial
class
UCTestSplitLabel
:
UserControl
{
{
public
UCTestSplitLabel
()
public
UCTestSplitLabel
()
...
...
HZH_Controls/Test/UC/UCTestTimeLine.Designer.cs
0 → 100644
查看文件 @
01c099c
namespace
Test.UC
{
partial
class
UCTestTimeLine
{
/// <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
()
{
HZH_Controls
.
Controls
.
TimeLineItem
timeLineItem5
=
new
HZH_Controls
.
Controls
.
TimeLineItem
();
HZH_Controls
.
Controls
.
TimeLineItem
timeLineItem6
=
new
HZH_Controls
.
Controls
.
TimeLineItem
();
HZH_Controls
.
Controls
.
TimeLineItem
timeLineItem7
=
new
HZH_Controls
.
Controls
.
TimeLineItem
();
HZH_Controls
.
Controls
.
TimeLineItem
timeLineItem8
=
new
HZH_Controls
.
Controls
.
TimeLineItem
();
this
.
ucTimeLine1
=
new
HZH_Controls
.
Controls
.
UCTimeLine
();
this
.
SuspendLayout
();
//
// ucTimeLine1
//
this
.
ucTimeLine1
.
AutoScroll
=
true
;
this
.
ucTimeLine1
.
DetailsFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10F
);
this
.
ucTimeLine1
.
DetailsForcolor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
144
)))),
((
int
)(((
byte
)(
147
)))),
((
int
)(((
byte
)(
153
)))));
this
.
ucTimeLine1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
timeLineItem5
.
Details
=
"2019年07月发生了一件大事,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷"
+
",咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,然后王二麻子他爹王咔嚓出生了。"
;
timeLineItem5
.
Title
=
"2019年07月"
;
timeLineItem6
.
Details
=
"2019年08月发生了一件大事,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷"
+
",咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,然后王二麻子他爹王咔嚓出生了。"
;
timeLineItem6
.
Title
=
"2019年08月"
;
timeLineItem7
.
Details
=
"2019年09月发生了一件大事,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷"
+
",咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,然后王二麻子他爹王咔嚓出生了。"
;
timeLineItem7
.
Title
=
"2019年09月"
;
timeLineItem8
.
Details
=
"2019年10月发生了一件大事,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷"
+
",咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,咔嚓一声打了一个炸雷,然后王二麻子他爹王咔嚓出生了。"
;
timeLineItem8
.
Title
=
"2019年10月"
;
this
.
ucTimeLine1
.
Items
=
new
HZH_Controls
.
Controls
.
TimeLineItem
[]
{
timeLineItem5
,
timeLineItem6
,
timeLineItem7
,
timeLineItem8
};
this
.
ucTimeLine1
.
LineColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
144
)))),
((
int
)(((
byte
)(
147
)))),
((
int
)(((
byte
)(
153
)))));
this
.
ucTimeLine1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucTimeLine1
.
Name
=
"ucTimeLine1"
;
this
.
ucTimeLine1
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
30
,
0
,
0
,
0
);
this
.
ucTimeLine1
.
Size
=
new
System
.
Drawing
.
Size
(
768
,
542
);
this
.
ucTimeLine1
.
TabIndex
=
0
;
this
.
ucTimeLine1
.
TitleFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
14F
);
this
.
ucTimeLine1
.
TitleForcolor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
48
)))),
((
int
)(((
byte
)(
49
)))),
((
int
)(((
byte
)(
51
)))));
//
// UCTestTimeLine
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
Controls
.
Add
(
this
.
ucTimeLine1
);
this
.
Name
=
"UCTestTimeLine"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
768
,
542
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
HZH_Controls
.
Controls
.
UCTimeLine
ucTimeLine1
;
}
}
HZH_Controls/Test/UC/UCTestTimeLine.cs
0 → 100644
查看文件 @
01c099c
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
Test.UC
{
public
partial
class
UCTestTimeLine
:
UserControl
{
public
UCTestTimeLine
()
{
InitializeComponent
();
}
}
}
HZH_Controls/Test/UC/UCTestTimeLine.resx
0 → 100644
查看文件 @
01c099c
<?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
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论