Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 40bb5c3d
由
HZH
编写于
2019-11-07 12:50:14 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
自定义单元格
1 个父辈
3b0e296b
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
835 行增加
和
28 行删除
HZH_Controls/HZH_Controls/Controls/DataGridView/DataGridViewColumnEntity.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/IDataGridViewCustomCell.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewRow.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/FrmMain.cs
HZH_Controls/Test/Properties/Resources.Designer.cs
HZH_Controls/Test/Properties/Resources.resx
HZH_Controls/Test/Resources/rowicon.png
HZH_Controls/Test/Test.csproj
HZH_Controls/Test/UC/UCTestGridTableCustom.Designer.cs
HZH_Controls/Test/UC/UCTestGridTableCustom.cs
HZH_Controls/Test/UC/UCTestGridTableCustom.resx
HZH_Controls/Test/UC/UCTestGridTable_CustomCell.Designer.cs
HZH_Controls/Test/UC/UCTestGridTable_CustomCell.cs
HZH_Controls/Test/UC/UCTestGridTable_CustomCell.resx
HZH_Controls/Test/UC/UCTestGridTable_CustomCellIcon.Designer.cs
HZH_Controls/Test/UC/UCTestGridTable_CustomCellIcon.cs
HZH_Controls/Test/UC/UCTestGridTable_CustomCellIcon.resx
HZH_Controls/HZH_Controls/Controls/DataGridView/DataGridViewColumnEntity.cs
查看文件 @
40bb5c3
...
@@ -60,5 +60,23 @@ namespace HZH_Controls.Controls
...
@@ -60,5 +60,23 @@ namespace HZH_Controls.Controls
/// </summary>
/// </summary>
/// <value>The text align.</value>
/// <value>The text align.</value>
public
ContentAlignment
TextAlign
{
get
{
return
_TextAlign
;
}
set
{
_TextAlign
=
value
;
}
}
public
ContentAlignment
TextAlign
{
get
{
return
_TextAlign
;
}
set
{
_TextAlign
=
value
;
}
}
/// <summary>
/// 自定义的单元格控件,一个实现IDataGridViewCustomCell的Control
/// </summary>
/// <value>The custom cell.</value>
private
Type
customCellType
=
null
;
public
Type
CustomCellType
{
get
{
return
customCellType
;
}
set
{
if
(!
typeof
(
IDataGridViewCustomCell
).
IsAssignableFrom
(
value
)
||
!
value
.
IsSubclassOf
(
typeof
(
System
.
Windows
.
Forms
.
Control
)))
throw
new
Exception
(
"行控件没有实现IDataGridViewCustomCell接口"
);
customCellType
=
value
;
}
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/DataGridView/IDataGridViewCustomCell.cs
0 → 100644
查看文件 @
40bb5c3
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
HZH_Controls.Controls
{
public
interface
IDataGridViewCustomCell
{
/// <summary>
/// 绑定行关联的数据
/// </summary>
/// <param name="obj">The object.</param>
void
SetBindSource
(
object
obj
);
}
}
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewRow.cs
查看文件 @
40bb5c3
...
@@ -168,6 +168,14 @@ namespace HZH_Controls.Controls
...
@@ -168,6 +168,14 @@ namespace HZH_Controls.Controls
}
}
}
}
}
}
foreach
(
Control
item
in
this
.
panCells
.
Controls
)
{
if
(
item
is
IDataGridViewCustomCell
)
{
IDataGridViewCustomCell
cell
=
item
as
IDataGridViewCustomCell
;
cell
.
SetBindSource
(
DataSource
);
}
}
}
}
/// <summary>
/// <summary>
...
@@ -253,6 +261,8 @@ namespace HZH_Controls.Controls
...
@@ -253,6 +261,8 @@ namespace HZH_Controls.Controls
var
item
=
Columns
[
i
-
(
IsShowCheckBox
?
1
:
0
)];
var
item
=
Columns
[
i
-
(
IsShowCheckBox
?
1
:
0
)];
this
.
panCells
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
item
.
WidthType
,
item
.
Width
));
this
.
panCells
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
item
.
WidthType
,
item
.
Width
));
if
(
item
.
CustomCellType
==
null
)
{
Label
lbl
=
new
Label
();
Label
lbl
=
new
Label
();
lbl
.
Tag
=
i
-
(
IsShowCheckBox
?
1
:
0
);
lbl
.
Tag
=
i
-
(
IsShowCheckBox
?
1
:
0
);
lbl
.
Name
=
"lbl_"
+
item
.
DataField
;
lbl
.
Name
=
"lbl_"
+
item
.
DataField
;
...
@@ -267,6 +277,13 @@ namespace HZH_Controls.Controls
...
@@ -267,6 +277,13 @@ namespace HZH_Controls.Controls
};
};
c
=
lbl
;
c
=
lbl
;
}
}
else
{
Control
cc
=
(
Control
)
Activator
.
CreateInstance
(
item
.
CustomCellType
);
cc
.
Dock
=
DockStyle
.
Fill
;
c
=
cc
;
}
}
this
.
panCells
.
Controls
.
Add
(
c
,
i
,
0
);
this
.
panCells
.
Controls
.
Add
(
c
,
i
,
0
);
}
}
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
查看文件 @
40bb5c3
...
@@ -198,6 +198,14 @@ namespace HZH_Controls.Controls
...
@@ -198,6 +198,14 @@ namespace HZH_Controls.Controls
}
}
}
}
}
}
foreach
(
Control
item
in
this
.
panCells
.
Controls
)
{
if
(
item
is
IDataGridViewCustomCell
)
{
IDataGridViewCustomCell
cell
=
item
as
IDataGridViewCustomCell
;
cell
.
SetBindSource
(
DataSource
);
}
}
panLeft
.
Tag
=
0
;
panLeft
.
Tag
=
0
;
var
proChildrens
=
DataSource
.
GetType
().
GetProperty
(
"Childrens"
);
var
proChildrens
=
DataSource
.
GetType
().
GetProperty
(
"Childrens"
);
if
(
proChildrens
!=
null
)
if
(
proChildrens
!=
null
)
...
@@ -329,6 +337,8 @@ namespace HZH_Controls.Controls
...
@@ -329,6 +337,8 @@ namespace HZH_Controls.Controls
var
item
=
Columns
[
i
-
(
IsShowCheckBox
?
1
:
0
)];
var
item
=
Columns
[
i
-
(
IsShowCheckBox
?
1
:
0
)];
this
.
panCells
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
item
.
WidthType
,
item
.
Width
));
this
.
panCells
.
ColumnStyles
.
Add
(
new
System
.
Windows
.
Forms
.
ColumnStyle
(
item
.
WidthType
,
item
.
Width
));
if
(
item
.
CustomCellType
==
null
)
{
Label
lbl
=
new
Label
();
Label
lbl
=
new
Label
();
lbl
.
Tag
=
i
-
(
IsShowCheckBox
?
1
:
0
);
lbl
.
Tag
=
i
-
(
IsShowCheckBox
?
1
:
0
);
lbl
.
Name
=
"lbl_"
+
item
.
DataField
;
lbl
.
Name
=
"lbl_"
+
item
.
DataField
;
...
@@ -343,6 +353,13 @@ namespace HZH_Controls.Controls
...
@@ -343,6 +353,13 @@ namespace HZH_Controls.Controls
};
};
c
=
lbl
;
c
=
lbl
;
}
}
else
{
Control
cc
=
(
Control
)
Activator
.
CreateInstance
(
item
.
CustomCellType
);
cc
.
Dock
=
DockStyle
.
Fill
;
c
=
cc
;
}
}
this
.
panCells
.
Controls
.
Add
(
c
,
i
,
0
);
this
.
panCells
.
Controls
.
Add
(
c
,
i
,
0
);
}
}
...
...
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
40bb5c3
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
<Compile Include="Controls\Charts\RadarChart\UCRadarChart.cs">
<Compile Include="Controls\Charts\RadarChart\UCRadarChart.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\DataGridView\IDataGridViewCustomCell.cs" />
<Compile Include="Controls\GraphicalOverlay\GraphicalOverlayComponent.cs">
<Compile Include="Controls\GraphicalOverlay\GraphicalOverlayComponent.cs">
<SubType>Component</SubType>
<SubType>Component</SubType>
</Compile>
</Compile>
...
...
HZH_Controls/Test/FrmMain.cs
查看文件 @
40bb5c3
...
@@ -48,6 +48,7 @@ namespace Test
...
@@ -48,6 +48,7 @@ namespace Test
tnControl
.
Nodes
.
Add
(
"横向列表"
);
tnControl
.
Nodes
.
Add
(
"横向列表"
);
tnControl
.
Nodes
.
Add
(
"分页控件"
);
tnControl
.
Nodes
.
Add
(
"分页控件"
);
tnControl
.
Nodes
.
Add
(
"表格"
);
tnControl
.
Nodes
.
Add
(
"表格"
);
tnControl
.
Nodes
.
Add
(
"表格-自定义单元格"
);
tnControl
.
Nodes
.
Add
(
"树表格"
);
tnControl
.
Nodes
.
Add
(
"树表格"
);
tnControl
.
Nodes
.
Add
(
"进度条"
);
tnControl
.
Nodes
.
Add
(
"进度条"
);
tnControl
.
Nodes
.
Add
(
"步骤控件"
);
tnControl
.
Nodes
.
Add
(
"步骤控件"
);
...
@@ -220,6 +221,9 @@ namespace Test
...
@@ -220,6 +221,9 @@ namespace Test
case
"表格"
:
case
"表格"
:
AddControl
(
new
UC
.
UCTestGridTable
());
AddControl
(
new
UC
.
UCTestGridTable
());
break
;
break
;
case
"表格-自定义单元格"
:
AddControl
(
new
UC
.
UCTestGridTableCustom
());
break
;
case
"树表格"
:
case
"树表格"
:
AddControl
(
new
UC
.
UCTestTreeGridTable
());
AddControl
(
new
UC
.
UCTestTreeGridTable
());
break
;
break
;
...
...
HZH_Controls/Test/Properties/Resources.Designer.cs
查看文件 @
40bb5c3
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// <auto-generated>
// 此代码由工具生成。
// 此代码由工具生成。
// 运行时版本:
4.0.30319.42000
// 运行时版本:4.0.30319.42000
//
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// 重新生成代码,这些更改将
会
丢失。
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Test.Properties
namespace
Test.Properties
{
{
using
System
;
/// <summary>
/// <summary>
...
@@ -22,28 +22,23 @@ namespace Test.Properties
...
@@ -22,28 +22,23 @@ namespace Test.Properties
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"4.0.0.0"
)]
[
global
::
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"System.Resources.Tools.StronglyTypedResourceBuilder"
,
"4.0.0.0"
)]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Diagnostics
.
DebuggerNonUserCodeAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
[
global
::
System
.
Runtime
.
CompilerServices
.
CompilerGeneratedAttribute
()]
internal
class
Resources
internal
class
Resources
{
{
private
static
global
::
System
.
Resources
.
ResourceManager
resourceMan
;
private
static
global
::
System
.
Resources
.
ResourceManager
resourceMan
;
private
static
global
::
System
.
Globalization
.
CultureInfo
resourceCulture
;
private
static
global
::
System
.
Globalization
.
CultureInfo
resourceCulture
;
[
global
::
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessageAttribute
(
"Microsoft.Performance"
,
"CA1811:AvoidUncalledPrivateCode"
)]
[
global
::
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessageAttribute
(
"Microsoft.Performance"
,
"CA1811:AvoidUncalledPrivateCode"
)]
internal
Resources
()
internal
Resources
()
{
{
}
}
/// <summary>
/// <summary>
/// 返回此类使用的
、
缓存的 ResourceManager 实例。
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
internal
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
{
{
get
{
get
if
(
object
.
ReferenceEquals
(
resourceMan
,
null
))
{
{
if
((
resourceMan
==
null
))
{
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"Test.Properties.Resources"
,
typeof
(
Resources
).
Assembly
);
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"Test.Properties.Resources"
,
typeof
(
Resources
).
Assembly
);
resourceMan
=
temp
;
resourceMan
=
temp
;
}
}
...
@@ -52,20 +47,27 @@ namespace Test.Properties
...
@@ -52,20 +47,27 @@ namespace Test.Properties
}
}
/// <summary>
/// <summary>
///
为所有资源查找重写当前线程的 CurrentUICulture 属性,
///
使用此强类型资源类,为所有资源查找
///
方法是使用此强类型资源类
。
///
重写当前线程的 CurrentUICulture 属性
。
/// </summary>
/// </summary>
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
[
global
::
System
.
ComponentModel
.
EditorBrowsableAttribute
(
global
::
System
.
ComponentModel
.
EditorBrowsableState
.
Advanced
)]
internal
static
global
::
System
.
Globalization
.
CultureInfo
Culture
internal
static
global
::
System
.
Globalization
.
CultureInfo
Culture
{
{
get
{
get
{
return
resourceCulture
;
return
resourceCulture
;
}
}
set
set
{
{
resourceCulture
=
value
;
resourceCulture
=
value
;
}
}
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal
static
System
.
Drawing
.
Bitmap
rowicon
{
get
{
object
obj
=
ResourceManager
.
GetObject
(
"rowicon"
,
resourceCulture
);
return
((
System
.
Drawing
.
Bitmap
)(
obj
));
}
}
}
}
}
}
HZH_Controls/Test/Properties/Resources.resx
查看文件 @
40bb5c3
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.
Runtime.
Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
mimetype: application/x-microsoft.net.object.soap.base64
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
: 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: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:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:choice maxOccurs="unbounded">
...
@@ -68,9 +69,10 @@
...
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name"
use="required"
type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:complexType>
</xsd:element>
</xsd:element>
<xsd:element name="assembly">
<xsd:element name="assembly">
...
@@ -85,9 +87,10 @@
...
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<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:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<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="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:complexType>
</xsd:element>
</xsd:element>
<xsd:element name="resheader">
<xsd:element name="resheader">
...
@@ -109,9 +112,13 @@
...
@@ -109,9 +112,13 @@
<value>2.0</value>
<value>2.0</value>
</resheader>
</resheader>
<resheader name="reader">
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</resheader>
<resheader name="writer">
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
2
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=
4
.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="rowicon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rowicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
HZH_Controls/Test/Resources/rowicon.png
0 → 100644
查看文件 @
40bb5c3
955 字节
HZH_Controls/Test/Test.csproj
查看文件 @
40bb5c3
...
@@ -145,6 +145,24 @@
...
@@ -145,6 +145,24 @@
<Compile Include="UC\UCTestGraphicalOverlay.Designer.cs">
<Compile Include="UC\UCTestGraphicalOverlay.Designer.cs">
<DependentUpon>UCTestGraphicalOverlay.cs</DependentUpon>
<DependentUpon>UCTestGraphicalOverlay.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="UC\UCTestGridTableCustom.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestGridTableCustom.Designer.cs">
<DependentUpon>UCTestGridTableCustom.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestGridTable_CustomCell.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestGridTable_CustomCell.Designer.cs">
<DependentUpon>UCTestGridTable_CustomCell.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestGridTable_CustomCellIcon.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UCTestGridTable_CustomCellIcon.Designer.cs">
<DependentUpon>UCTestGridTable_CustomCellIcon.cs</DependentUpon>
</Compile>
<Compile Include="UC\UCTestIcon.cs">
<Compile Include="UC\UCTestIcon.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
...
@@ -642,6 +660,7 @@
...
@@ -642,6 +660,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
</Compile>
<EmbeddedResource Include="UC\UCTestArrow.resx">
<EmbeddedResource Include="UC\UCTestArrow.resx">
<DependentUpon>UCTestArrow.cs</DependentUpon>
<DependentUpon>UCTestArrow.cs</DependentUpon>
...
@@ -673,6 +692,15 @@
...
@@ -673,6 +692,15 @@
<EmbeddedResource Include="UC\UCTestGridTable.resx">
<EmbeddedResource Include="UC\UCTestGridTable.resx">
<DependentUpon>UCTestGridTable.cs</DependentUpon>
<DependentUpon>UCTestGridTable.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestGridTableCustom.resx">
<DependentUpon>UCTestGridTableCustom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestGridTable_CustomCell.resx">
<DependentUpon>UCTestGridTable_CustomCell.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestGridTable_CustomCellIcon.resx">
<DependentUpon>UCTestGridTable_CustomCellIcon.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\UCTestHorizontalList.resx">
<EmbeddedResource Include="UC\UCTestHorizontalList.resx">
<DependentUpon>UCTestHorizontalList.cs</DependentUpon>
<DependentUpon>UCTestHorizontalList.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
...
@@ -920,6 +948,7 @@
...
@@ -920,6 +948,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Content Include="log.ico" />
<Content Include="log.ico" />
<None Include="Resources\rowicon.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\fingerprint.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\fingerprint.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\user.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\user.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\view.png" />
<Content Include="UC\UCTestLiveCharts\Cartesian\FunnelChart\Resources\view.png" />
...
...
HZH_Controls/Test/UC/UCTestGridTableCustom.Designer.cs
0 → 100644
查看文件 @
40bb5c3
namespace
Test.UC
{
partial
class
UCTestGridTableCustom
{
/// <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
.
ucDataGridView1
=
new
HZH_Controls
.
Controls
.
UCDataGridView
();
this
.
SuspendLayout
();
//
// ucDataGridView1
//
this
.
ucDataGridView1
.
AutoScroll
=
true
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
this
.
ucDataGridView1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ucDataGridView1
.
HeadFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
);
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
RowHeight
=
41
;
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
831
,
609
);
this
.
ucDataGridView1
.
TabIndex
=
5
;
//
// UCTestGridTableCustom
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
Controls
.
Add
(
this
.
ucDataGridView1
);
this
.
Name
=
"UCTestGridTableCustom"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
831
,
609
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
UCTestGridTableCustom_Load
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
HZH_Controls
.
Controls
.
UCDataGridView
ucDataGridView1
;
}
}
HZH_Controls/Test/UC/UCTestGridTableCustom.cs
0 → 100644
查看文件 @
40bb5c3
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
;
using
HZH_Controls.Controls
;
namespace
Test.UC
{
public
partial
class
UCTestGridTableCustom
:
UserControl
{
public
UCTestGridTableCustom
()
{
InitializeComponent
();
}
private
void
UCTestGridTableCustom_Load
(
object
sender
,
EventArgs
e
)
{
List
<
DataGridViewColumnEntity
>
lstCulumns
=
new
List
<
DataGridViewColumnEntity
>();
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
Width
=
35
,
WidthType
=
SizeType
.
Absolute
,
CustomCellType
=
typeof
(
UCTestGridTable_CustomCellIcon
)
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"ID"
,
HeadText
=
"编号"
,
Width
=
70
,
WidthType
=
SizeType
.
Absolute
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"Name"
,
HeadText
=
"姓名"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"Age"
,
HeadText
=
"年龄"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"Birthday"
,
HeadText
=
"生日"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
,
Format
=
(
a
)
=>
{
return
((
DateTime
)
a
).
ToString
(
"yyyy-MM-dd"
);
}
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"Sex"
,
HeadText
=
"性别"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
,
Format
=
(
a
)
=>
{
return
((
int
)
a
)
==
0
?
"女"
:
"男"
;
}
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
Width
=
155
,
WidthType
=
SizeType
.
Absolute
,
CustomCellType
=
typeof
(
UCTestGridTable_CustomCell
)
});
this
.
ucDataGridView1
.
Columns
=
lstCulumns
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
true
;
List
<
object
>
lstSource
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
50
;
i
++)
{
TestGridModel
model
=
new
TestGridModel
()
{
ID
=
i
.
ToString
(),
Age
=
3
*
i
,
Name
=
"姓名——"
+
i
,
Birthday
=
DateTime
.
Now
.
AddYears
(-
10
),
Sex
=
i
%
2
};
lstSource
.
Add
(
model
);
}
this
.
ucDataGridView1
.
DataSource
=
lstSource
;
}
}
}
HZH_Controls/Test/UC/UCTestGridTableCustom.resx
0 → 100644
查看文件 @
40bb5c3
<?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/Test/UC/UCTestGridTable_CustomCell.Designer.cs
0 → 100644
查看文件 @
40bb5c3
namespace
Test.UC
{
partial
class
UCTestGridTable_CustomCell
{
/// <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
.
ucBtnExt1
=
new
HZH_Controls
.
Controls
.
UCBtnExt
();
this
.
ucBtnExt2
=
new
HZH_Controls
.
Controls
.
UCBtnExt
();
this
.
SuspendLayout
();
//
// ucBtnExt1
//
this
.
ucBtnExt1
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
ucBtnExt1
.
BtnBackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnExt1
.
BtnFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
ucBtnExt1
.
BtnForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnExt1
.
BtnText
=
"修改"
;
this
.
ucBtnExt1
.
ConerRadius
=
5
;
this
.
ucBtnExt1
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
ucBtnExt1
.
FillColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBtnExt1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucBtnExt1
.
IsRadius
=
true
;
this
.
ucBtnExt1
.
IsShowRect
=
true
;
this
.
ucBtnExt1
.
IsShowTips
=
false
;
this
.
ucBtnExt1
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
4
);
this
.
ucBtnExt1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
ucBtnExt1
.
Name
=
"ucBtnExt1"
;
this
.
ucBtnExt1
.
RectColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
58
)))));
this
.
ucBtnExt1
.
RectWidth
=
1
;
this
.
ucBtnExt1
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
25
);
this
.
ucBtnExt1
.
TabIndex
=
0
;
this
.
ucBtnExt1
.
TabStop
=
false
;
this
.
ucBtnExt1
.
TipsColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
99
)))));
this
.
ucBtnExt1
.
TipsText
=
""
;
this
.
ucBtnExt1
.
BtnClick
+=
new
System
.
EventHandler
(
this
.
ucBtnExt1_BtnClick
);
//
// ucBtnExt2
//
this
.
ucBtnExt2
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
ucBtnExt2
.
BtnBackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnExt2
.
BtnFont
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
ucBtnExt2
.
BtnForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucBtnExt2
.
BtnText
=
"删除"
;
this
.
ucBtnExt2
.
ConerRadius
=
5
;
this
.
ucBtnExt2
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
ucBtnExt2
.
FillColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
ucBtnExt2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucBtnExt2
.
IsRadius
=
true
;
this
.
ucBtnExt2
.
IsShowRect
=
true
;
this
.
ucBtnExt2
.
IsShowTips
=
false
;
this
.
ucBtnExt2
.
Location
=
new
System
.
Drawing
.
Point
(
82
,
4
);
this
.
ucBtnExt2
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
ucBtnExt2
.
Name
=
"ucBtnExt2"
;
this
.
ucBtnExt2
.
RectColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
58
)))));
this
.
ucBtnExt2
.
RectWidth
=
1
;
this
.
ucBtnExt2
.
Size
=
new
System
.
Drawing
.
Size
(
57
,
25
);
this
.
ucBtnExt2
.
TabIndex
=
0
;
this
.
ucBtnExt2
.
TabStop
=
false
;
this
.
ucBtnExt2
.
TipsColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
30
)))),
((
int
)(((
byte
)(
99
)))));
this
.
ucBtnExt2
.
TipsText
=
""
;
this
.
ucBtnExt2
.
BtnClick
+=
new
System
.
EventHandler
(
this
.
ucBtnExt2_BtnClick
);
//
// UCTestGridTable_CustomCell
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
Controls
.
Add
(
this
.
ucBtnExt2
);
this
.
Controls
.
Add
(
this
.
ucBtnExt1
);
this
.
Name
=
"UCTestGridTable_CustomCell"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
155
,
35
);
this
.
ResumeLayout
(
false
);
}
#
endregion
private
HZH_Controls
.
Controls
.
UCBtnExt
ucBtnExt1
;
private
HZH_Controls
.
Controls
.
UCBtnExt
ucBtnExt2
;
}
}
HZH_Controls/Test/UC/UCTestGridTable_CustomCell.cs
0 → 100644
查看文件 @
40bb5c3
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
UCTestGridTable_CustomCell
:
UserControl
,
HZH_Controls
.
Controls
.
IDataGridViewCustomCell
{
private
TestGridModel
m_object
=
null
;
public
UCTestGridTable_CustomCell
()
{
InitializeComponent
();
}
public
void
SetBindSource
(
object
obj
)
{
if
(
obj
is
TestGridModel
)
m_object
=
(
TestGridModel
)
obj
;
}
private
void
ucBtnExt1_BtnClick
(
object
sender
,
EventArgs
e
)
{
if
(
m_object
!=
null
)
{
HZH_Controls
.
Forms
.
FrmTips
.
ShowTipsSuccess
(
this
.
FindForm
(),
"修改:"
+
m_object
.
Name
);
}
}
private
void
ucBtnExt2_BtnClick
(
object
sender
,
EventArgs
e
)
{
if
(
m_object
!=
null
)
{
HZH_Controls
.
Forms
.
FrmTips
.
ShowTipsSuccess
(
this
.
FindForm
(),
"删除:"
+
m_object
.
Name
);
}
}
}
}
HZH_Controls/Test/UC/UCTestGridTable_CustomCell.resx
0 → 100644
查看文件 @
40bb5c3
<?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/Test/UC/UCTestGridTable_CustomCellIcon.Designer.cs
0 → 100644
查看文件 @
40bb5c3
namespace
Test.UC
{
partial
class
UCTestGridTable_CustomCellIcon
{
/// <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
();
//
// UCTestGridTable_CustomCellIcon
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Center
;
this
.
Name
=
"UCTestGridTable_CustomCellIcon"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
28
,
28
);
this
.
ResumeLayout
(
false
);
}
#
endregion
}
}
HZH_Controls/Test/UC/UCTestGridTable_CustomCellIcon.cs
0 → 100644
查看文件 @
40bb5c3
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
UCTestGridTable_CustomCellIcon
:
UserControl
,
HZH_Controls
.
Controls
.
IDataGridViewCustomCell
{
public
UCTestGridTable_CustomCellIcon
()
{
InitializeComponent
();
}
public
void
SetBindSource
(
object
obj
)
{
if
(
obj
is
TestGridModel
)
{
this
.
BackgroundImage
=
Properties
.
Resources
.
rowicon
;
}
}
}
}
HZH_Controls/Test/UC/UCTestGridTable_CustomCellIcon.resx
0 → 100644
查看文件 @
40bb5c3
<?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
请
注册
或
登录
后发表评论