Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b60631b4
由
leo
编写于
2019-11-08 15:58:57 +0800
由
GitHub
提交于
2019-11-08 15:58:57 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge pull request #4 from kwwwvagaa/master
同步
2 个父辈
1b7ef398
8b7440ef
全部展开
显示空白字符变更
内嵌
并排
正在显示
47 个修改的文件
包含
1272 行增加
和
143 行删除
HZH_Controls/HZH_Controls/Controls/Checkbox/UCCheckBox.cs
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.Designer.cs
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/DataGridViewColumnEntity.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/IDataGridViewCustomCell.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.Designer.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewRow.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.Designer.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
HZH_Controls/HZH_Controls/Controls/List/IPageControl.cs → HZH_Controls/HZH_Controls/Controls/Page/IPageControl.cs
HZH_Controls/HZH_Controls/Controls/List/PageControlEventHandler.cs → HZH_Controls/HZH_Controls/Controls/Page/PageControlEventHandler.cs
HZH_Controls/HZH_Controls/Controls/Page/PageModel.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl.Designer.cs → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl.Designer.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl.cs → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl.resx → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl.resx
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.Designer.cs → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl2.Designer.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.cs → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl2.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.resx → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControl2.resx
HZH_Controls/HZH_Controls/Controls/List/UCPagerControlBase.cs → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControlBase.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControlBase.resx → HZH_Controls/HZH_Controls/Controls/Page/UCPagerControlBase.resx
HZH_Controls/HZH_Controls/Controls/Transfer/UCTransfer.Designer.cs
HZH_Controls/HZH_Controls/Controls/Transfer/UCTransfer.cs
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.Designer.cs
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.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/UCTestGridTable.Designer.cs
HZH_Controls/Test/UC/UCTestGridTable.cs
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/Test/UC/UCTestPage.Designer.cs
HZH_Controls/Test/UC/UCTestPage.cs
HZH_Controls/Test/UC/UCTestPage.resx
HZH_Controls/Test/UC/UCTestTreeGridTable.Designer.cs
HZH_Controls/Test/UC/UCTestTreeGridTable.cs
HZH_Controls/HZH_Controls/Controls/Checkbox/UCCheckBox.cs
查看文件 @
b60631b
...
@@ -78,6 +78,7 @@ namespace HZH_Controls.Controls
...
@@ -78,6 +78,7 @@ namespace HZH_Controls.Controls
get
{
return
_ForeColor
;
}
get
{
return
_ForeColor
;
}
set
set
{
{
base
.
ForeColor
=
value
;
label1
.
ForeColor
=
value
;
label1
.
ForeColor
=
value
;
_ForeColor
=
value
;
_ForeColor
=
value
;
}
}
...
...
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.Designer.cs
查看文件 @
b60631b
...
@@ -50,11 +50,12 @@ namespace HZH_Controls.Controls
...
@@ -50,11 +50,12 @@ namespace HZH_Controls.Controls
{
{
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
components
=
new
System
.
ComponentModel
.
Container
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
ucControlBase1
=
new
HZH_Controls
.
Controls
.
UCControlBase
();
this
.
ucControlBase1
=
new
HZH_Controls
.
Controls
.
UCControlBase
();
this
.
ucDataGridView1
=
new
HZH_Controls
.
Controls
.
UCDataGridView
();
this
.
ucDataGridView1
=
new
HZH_Controls
.
Controls
.
UCDataGridView
();
this
.
m_page
=
new
HZH_Controls
.
Controls
.
UCPagerControl
();
this
.
panel2
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
txtSearch
=
new
HZH_Controls
.
Controls
.
UCTextBoxEx
();
this
.
txtSearch
=
new
HZH_Controls
.
Controls
.
UCTextBoxEx
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
ucSplitLine_V2
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
ucSplitLine_V2
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
ucSplitLine_V1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
ucSplitLine_V1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_V
();
this
.
ucSplitLine_H2
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
this
.
ucSplitLine_H2
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
...
@@ -75,23 +76,11 @@ namespace HZH_Controls.Controls
...
@@ -75,23 +76,11 @@ namespace HZH_Controls.Controls
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
447
,
333
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
447
,
333
);
this
.
panel1
.
TabIndex
=
4
;
this
.
panel1
.
TabIndex
=
4
;
//
//
// panel2
//
this
.
panel2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
47
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
437
,
15
);
this
.
panel2
.
TabIndex
=
1
;
//
// timer1
//
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// ucControlBase1
// ucControlBase1
//
//
this
.
ucControlBase1
.
ConerRadius
=
5
;
this
.
ucControlBase1
.
ConerRadius
=
5
;
this
.
ucControlBase1
.
Controls
.
Add
(
this
.
ucDataGridView1
);
this
.
ucControlBase1
.
Controls
.
Add
(
this
.
ucDataGridView1
);
this
.
ucControlBase1
.
Controls
.
Add
(
this
.
m_page
);
this
.
ucControlBase1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ucControlBase1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
ucControlBase1
.
FillColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
ucControlBase1
.
FillColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
ucControlBase1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
ucControlBase1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
...
@@ -109,6 +98,7 @@ namespace HZH_Controls.Controls
...
@@ -109,6 +98,7 @@ namespace HZH_Controls.Controls
//
//
// ucDataGridView1
// ucDataGridView1
//
//
this
.
ucDataGridView1
.
AutoScroll
=
true
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
...
@@ -117,18 +107,37 @@ namespace HZH_Controls.Controls
...
@@ -117,18 +107,37 @@ namespace HZH_Controls.Controls
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsCloseAutoHeight
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Page
=
null
;
this
.
ucDataGridView1
.
RowHeight
=
30
;
this
.
ucDataGridView1
.
RowHeight
=
30
;
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
427
,
2
56
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
427
,
2
23
);
this
.
ucDataGridView1
.
TabIndex
=
0
;
this
.
ucDataGridView1
.
TabIndex
=
0
;
this
.
ucDataGridView1
.
TabStop
=
false
;
this
.
ucDataGridView1
.
TabStop
=
false
;
//
//
// m_page
//
this
.
m_page
.
DataSource
=
null
;
this
.
m_page
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Bottom
;
this
.
m_page
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
228
);
this
.
m_page
.
Name
=
"m_page"
;
this
.
m_page
.
PageCount
=
0
;
this
.
m_page
.
PageIndex
=
1
;
this
.
m_page
.
PageSize
=
10
;
this
.
m_page
.
Size
=
new
System
.
Drawing
.
Size
(
427
,
33
);
this
.
m_page
.
StartIndex
=
0
;
this
.
m_page
.
TabIndex
=
1
;
//
// panel2
//
this
.
panel2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
panel2
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
47
);
this
.
panel2
.
Name
=
"panel2"
;
this
.
panel2
.
Size
=
new
System
.
Drawing
.
Size
(
437
,
15
);
this
.
panel2
.
TabIndex
=
1
;
//
// txtSearch
// txtSearch
//
//
this
.
txtSearch
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
txtSearch
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
...
@@ -137,6 +146,7 @@ namespace HZH_Controls.Controls
...
@@ -137,6 +146,7 @@ namespace HZH_Controls.Controls
this
.
txtSearch
.
DecLength
=
2
;
this
.
txtSearch
.
DecLength
=
2
;
this
.
txtSearch
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
txtSearch
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
txtSearch
.
FillColor
=
System
.
Drawing
.
Color
.
Empty
;
this
.
txtSearch
.
FillColor
=
System
.
Drawing
.
Color
.
Empty
;
this
.
txtSearch
.
FocusBorderColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
255
)))),
((
int
)(((
byte
)(
77
)))),
((
int
)(((
byte
)(
59
)))));
this
.
txtSearch
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
18F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
txtSearch
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
18F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Pixel
);
this
.
txtSearch
.
InputText
=
""
;
this
.
txtSearch
.
InputText
=
""
;
this
.
txtSearch
.
InputType
=
HZH_Controls
.
TextInputType
.
NotControl
;
this
.
txtSearch
.
InputType
=
HZH_Controls
.
TextInputType
.
NotControl
;
...
@@ -170,6 +180,11 @@ namespace HZH_Controls.Controls
...
@@ -170,6 +180,11 @@ namespace HZH_Controls.Controls
this
.
txtSearch
.
Size
=
new
System
.
Drawing
.
Size
(
437
,
42
);
this
.
txtSearch
.
Size
=
new
System
.
Drawing
.
Size
(
437
,
42
);
this
.
txtSearch
.
TabIndex
=
0
;
this
.
txtSearch
.
TabIndex
=
0
;
//
//
// timer1
//
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// ucSplitLine_V2
// ucSplitLine_V2
//
//
this
.
ucSplitLine_V2
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))));
this
.
ucSplitLine_V2
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))),
((
int
)(((
byte
)(
232
)))));
...
@@ -270,5 +285,6 @@ namespace HZH_Controls.Controls
...
@@ -270,5 +285,6 @@ namespace HZH_Controls.Controls
/// The text search
/// The text search
/// </summary>
/// </summary>
private
UCTextBoxEx
txtSearch
;
private
UCTextBoxEx
txtSearch
;
private
UCPagerControl
m_page
;
}
}
}
}
HZH_Controls/HZH_Controls/Controls/ComboBox/UCComboxGridPanel.cs
查看文件 @
b60631b
...
@@ -93,10 +93,6 @@ namespace HZH_Controls.Controls
...
@@ -93,10 +93,6 @@ namespace HZH_Controls.Controls
/// The string last search text
/// The string last search text
/// </summary>
/// </summary>
private
string
strLastSearchText
=
string
.
Empty
;
private
string
strLastSearchText
=
string
.
Empty
;
/// <summary>
/// The m page
/// </summary>
UCPagerControl
m_page
=
new
UCPagerControl
();
/// <summary>
/// <summary>
/// Initializes a new instance of the <see cref="UCComboxGridPanel" /> class.
/// Initializes a new instance of the <see cref="UCComboxGridPanel" /> class.
...
@@ -104,12 +100,13 @@ namespace HZH_Controls.Controls
...
@@ -104,12 +100,13 @@ namespace HZH_Controls.Controls
public
UCComboxGridPanel
()
public
UCComboxGridPanel
()
{
{
InitializeComponent
();
InitializeComponent
();
this
.
ucDataGridView1
.
Page
=
m_page
;
this
.
ucDataGridView1
.
IsCloseAutoHeight
=
false
;
this
.
txtSearch
.
txtInput
.
TextChanged
+=
txtInput_TextChanged
;
this
.
txtSearch
.
txtInput
.
TextChanged
+=
txtInput_TextChanged
;
this
.
ucDataGridView1
.
ItemClick
+=
ucDataGridView1_ItemClick
;
this
.
ucDataGridView1
.
ItemClick
+=
ucDataGridView1_ItemClick
;
m_page
.
ShowSourceChanged
+=
m_page_ShowSourceChanged
;
}
}
/// <summary>
/// <summary>
/// Handles the ItemClick event of the ucDataGridView1 control.
/// Handles the ItemClick event of the ucDataGridView1 control.
/// </summary>
/// </summary>
...
@@ -172,7 +169,7 @@ namespace HZH_Controls.Controls
...
@@ -172,7 +169,7 @@ namespace HZH_Controls.Controls
m_page
.
StartIndex
=
0
;
m_page
.
StartIndex
=
0
;
if
(!
string
.
IsNullOrEmpty
(
strText
))
if
(!
string
.
IsNullOrEmpty
(
strText
))
{
{
strText
=
strText
.
ToLower
();
strText
=
strText
.
ToLower
()
.
Trim
()
;
List
<
object
>
lst
=
m_dataSource
.
FindAll
(
p
=>
m_columns
.
Any
(
c
=>
(
c
.
Format
==
null
?
(
p
.
GetType
().
GetProperty
(
c
.
DataField
).
GetValue
(
p
,
null
).
ToStringExt
())
:
c
.
Format
(
p
.
GetType
().
GetProperty
(
c
.
DataField
).
GetValue
(
p
,
null
))).
ToLower
().
Contains
(
strText
)));
List
<
object
>
lst
=
m_dataSource
.
FindAll
(
p
=>
m_columns
.
Any
(
c
=>
(
c
.
Format
==
null
?
(
p
.
GetType
().
GetProperty
(
c
.
DataField
).
GetValue
(
p
,
null
).
ToStringExt
())
:
c
.
Format
(
p
.
GetType
().
GetProperty
(
c
.
DataField
).
GetValue
(
p
,
null
))).
ToLower
().
Contains
(
strText
)));
m_page
.
DataSource
=
lst
;
m_page
.
DataSource
=
lst
;
}
}
...
@@ -182,5 +179,10 @@ namespace HZH_Controls.Controls
...
@@ -182,5 +179,10 @@ namespace HZH_Controls.Controls
}
}
m_page
.
Reload
();
m_page
.
Reload
();
}
}
void
m_page_ShowSourceChanged
(
object
currentSource
)
{
this
.
ucDataGridView1
.
DataSource
=
currentSource
;
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/DataGridView/DataGridViewColumnEntity.cs
查看文件 @
b60631b
...
@@ -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
查看文件 @
b60631b
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/UCDataGridView.Designer.cs
查看文件 @
b60631b
...
@@ -53,7 +53,6 @@ namespace HZH_Controls.Controls
...
@@ -53,7 +53,6 @@ namespace HZH_Controls.Controls
this
.
panHeadLeft
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panHeadLeft
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
ucSplitLine_H1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
this
.
ucSplitLine_H1
=
new
HZH_Controls
.
Controls
.
UCSplitLine_H
();
this
.
panRow
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panRow
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panPage
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panHead
.
SuspendLayout
();
this
.
panHead
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
...
@@ -105,18 +104,8 @@ namespace HZH_Controls.Controls
...
@@ -105,18 +104,8 @@ namespace HZH_Controls.Controls
this
.
panRow
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panRow
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panRow
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
40
);
this
.
panRow
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
40
);
this
.
panRow
.
Name
=
"panRow"
;
this
.
panRow
.
Name
=
"panRow"
;
this
.
panRow
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
481
);
this
.
panRow
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
525
);
this
.
panRow
.
TabIndex
=
1
;
this
.
panRow
.
TabIndex
=
1
;
this
.
panRow
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
panRow_SizeChanged
);
//
// panPage
//
this
.
panPage
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Bottom
;
this
.
panPage
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
521
);
this
.
panPage
.
Name
=
"panPage"
;
this
.
panPage
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
44
);
this
.
panPage
.
TabIndex
=
0
;
this
.
panPage
.
Visible
=
false
;
//
//
// UCDataGridView
// UCDataGridView
//
//
...
@@ -124,11 +113,9 @@ namespace HZH_Controls.Controls
...
@@ -124,11 +113,9 @@ namespace HZH_Controls.Controls
this
.
AutoScroll
=
true
;
this
.
AutoScroll
=
true
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
Controls
.
Add
(
this
.
panRow
);
this
.
Controls
.
Add
(
this
.
panRow
);
this
.
Controls
.
Add
(
this
.
panPage
);
this
.
Controls
.
Add
(
this
.
panHead
);
this
.
Controls
.
Add
(
this
.
panHead
);
this
.
Name
=
"UCDataGridView"
;
this
.
Name
=
"UCDataGridView"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
565
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
565
);
this
.
Resize
+=
new
System
.
EventHandler
(
this
.
UCDataGridView_Resize
);
this
.
panHead
.
ResumeLayout
(
false
);
this
.
panHead
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
...
@@ -153,10 +140,6 @@ namespace HZH_Controls.Controls
...
@@ -153,10 +140,6 @@ namespace HZH_Controls.Controls
/// </summary>
/// </summary>
private
System
.
Windows
.
Forms
.
Panel
panRow
;
private
System
.
Windows
.
Forms
.
Panel
panRow
;
/// <summary>
/// <summary>
/// The pan page
/// </summary>
private
System
.
Windows
.
Forms
.
Panel
panPage
;
/// <summary>
/// The pan head left
/// The pan head left
/// </summary>
/// </summary>
private
System
.
Windows
.
Forms
.
Panel
panHeadLeft
;
private
System
.
Windows
.
Forms
.
Panel
panHeadLeft
;
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.cs
查看文件 @
b60631b
此文件的差异被折叠,
点击展开。
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewRow.cs
查看文件 @
b60631b
...
@@ -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.Designer.cs
查看文件 @
b60631b
...
@@ -101,7 +101,6 @@ namespace HZH_Controls.Controls
...
@@ -101,7 +101,6 @@ namespace HZH_Controls.Controls
//
//
this
.
ucDGVChild
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
ucDGVChild
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
ucDGVChild
.
AutoRowsScroll
=
false
;
this
.
ucDGVChild
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDGVChild
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDGVChild
.
Columns
=
null
;
this
.
ucDGVChild
.
Columns
=
null
;
this
.
ucDGVChild
.
DataSource
=
null
;
this
.
ucDGVChild
.
DataSource
=
null
;
...
@@ -109,12 +108,10 @@ namespace HZH_Controls.Controls
...
@@ -109,12 +108,10 @@ namespace HZH_Controls.Controls
this
.
ucDGVChild
.
HeadHeight
=
40
;
this
.
ucDGVChild
.
HeadHeight
=
40
;
this
.
ucDGVChild
.
HeadPadingLeft
=
0
;
this
.
ucDGVChild
.
HeadPadingLeft
=
0
;
this
.
ucDGVChild
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDGVChild
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDGVChild
.
IsCloseAutoHeight
=
false
;
this
.
ucDGVChild
.
IsShowCheckBox
=
false
;
this
.
ucDGVChild
.
IsShowCheckBox
=
false
;
this
.
ucDGVChild
.
IsShowHead
=
false
;
this
.
ucDGVChild
.
IsShowHead
=
false
;
this
.
ucDGVChild
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
0
);
this
.
ucDGVChild
.
Location
=
new
System
.
Drawing
.
Point
(
25
,
0
);
this
.
ucDGVChild
.
Name
=
"ucDGVChild"
;
this
.
ucDGVChild
.
Name
=
"ucDGVChild"
;
this
.
ucDGVChild
.
Page
=
null
;
this
.
ucDGVChild
.
RowHeight
=
40
;
this
.
ucDGVChild
.
RowHeight
=
40
;
this
.
ucDGVChild
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDGVChild
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDGVChild
.
Size
=
new
System
.
Drawing
.
Size
(
636
,
100
);
this
.
ucDGVChild
.
Size
=
new
System
.
Drawing
.
Size
(
636
,
100
);
...
...
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridViewTreeRow.cs
查看文件 @
b60631b
...
@@ -137,7 +137,6 @@ namespace HZH_Controls.Controls
...
@@ -137,7 +137,6 @@ namespace HZH_Controls.Controls
{
{
InitializeComponent
();
InitializeComponent
();
this
.
ucDGVChild
.
RowType
=
this
.
GetType
();
this
.
ucDGVChild
.
RowType
=
this
.
GetType
();
this
.
ucDGVChild
.
IsCloseAutoHeight
=
true
;
this
.
SizeChanged
+=
UCDataGridViewTreeRow_SizeChanged
;
this
.
SizeChanged
+=
UCDataGridViewTreeRow_SizeChanged
;
this
.
ucDGVChild
.
ItemClick
+=
(
a
,
b
)
=>
this
.
ucDGVChild
.
ItemClick
+=
(
a
,
b
)
=>
{
{
...
@@ -160,6 +159,8 @@ namespace HZH_Controls.Controls
...
@@ -160,6 +159,8 @@ namespace HZH_Controls.Controls
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
void
UCDataGridViewTreeRow_SizeChanged
(
object
sender
,
EventArgs
e
)
void
UCDataGridViewTreeRow_SizeChanged
(
object
sender
,
EventArgs
e
)
{
{
if
(
this
.
Parent
!=
null
)
{
if
(
this
.
Parent
.
Parent
.
Parent
!=
null
&&
this
.
Parent
.
Parent
.
Parent
.
Name
==
"panChildGrid"
&&
this
.
panLeft
.
Tag
.
ToInt
()
==
1
)
if
(
this
.
Parent
.
Parent
.
Parent
!=
null
&&
this
.
Parent
.
Parent
.
Parent
.
Name
==
"panChildGrid"
&&
this
.
panLeft
.
Tag
.
ToInt
()
==
1
)
{
{
int
intHeight
=
this
.
Parent
.
Parent
.
Controls
[
0
].
Controls
.
ToArray
().
Sum
(
p
=>
p
.
Height
);
int
intHeight
=
this
.
Parent
.
Parent
.
Controls
[
0
].
Controls
.
ToArray
().
Sum
(
p
=>
p
.
Height
);
...
@@ -167,6 +168,7 @@ namespace HZH_Controls.Controls
...
@@ -167,6 +168,7 @@ namespace HZH_Controls.Controls
this
.
Parent
.
Parent
.
Parent
.
Height
=
intHeight
;
this
.
Parent
.
Parent
.
Parent
.
Height
=
intHeight
;
}
}
}
}
}
/// <summary>
/// <summary>
...
@@ -196,6 +198,14 @@ namespace HZH_Controls.Controls
...
@@ -196,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
)
...
@@ -307,6 +317,8 @@ namespace HZH_Controls.Controls
...
@@ -307,6 +317,8 @@ namespace HZH_Controls.Controls
box
.
CheckedChangeEvent
+=
(
a
,
b
)
=>
box
.
CheckedChangeEvent
+=
(
a
,
b
)
=>
{
{
IsChecked
=
box
.
Checked
;
IsChecked
=
box
.
Checked
;
if
(
this
.
ucDGVChild
.
Rows
!=
null
)
{
this
.
ucDGVChild
.
Rows
.
ForEach
(
p
=>
p
.
IsChecked
=
box
.
Checked
);
this
.
ucDGVChild
.
Rows
.
ForEach
(
p
=>
p
.
IsChecked
=
box
.
Checked
);
if
(
CheckBoxChangeEvent
!=
null
)
if
(
CheckBoxChangeEvent
!=
null
)
{
{
...
@@ -316,6 +328,7 @@ namespace HZH_Controls.Controls
...
@@ -316,6 +328,7 @@ namespace HZH_Controls.Controls
CellIndex
=
0
CellIndex
=
0
});
});
}
}
}
};
};
c
=
box
;
c
=
box
;
}
}
...
@@ -324,6 +337,8 @@ namespace HZH_Controls.Controls
...
@@ -324,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
;
...
@@ -338,6 +353,13 @@ namespace HZH_Controls.Controls
...
@@ -338,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/Controls/
List
/IPageControl.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/IPageControl.cs
查看文件 @
b60631b
...
@@ -79,5 +79,6 @@ namespace HZH_Controls.Controls
...
@@ -79,5 +79,6 @@ namespace HZH_Controls.Controls
/// </summary>
/// </summary>
/// <value>The index of the page.</value>
/// <value>The index of the page.</value>
int
PageIndex
{
get
;
set
;
}
int
PageIndex
{
get
;
set
;
}
PageModel
PageModel
{
get
;
set
;
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/
List
/PageControlEventHandler.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/PageControlEventHandler.cs
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/Page/PageModel.cs
0 → 100644
查看文件 @
b60631b
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
HZH_Controls.Controls
{
/// <summary>
/// 翻页控件类型
/// </summary>
public
enum
PageModel
{
/// <summary>
/// 数据模式
/// </summary>
Soure
,
/// <summary>
/// 总页数模式
/// </summary>
PageCount
}
}
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl.Designer.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl.Designer.cs
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl.cs
查看文件 @
b60631b
...
@@ -32,6 +32,45 @@ namespace HZH_Controls.Controls
...
@@ -32,6 +32,45 @@ namespace HZH_Controls.Controls
[
ToolboxItem
(
true
)]
[
ToolboxItem
(
true
)]
public
partial
class
UCPagerControl
:
UCPagerControlBase
public
partial
class
UCPagerControl
:
UCPagerControlBase
{
{
public
override
int
PageCount
{
get
{
return
base
.
PageCount
;
}
set
{
base
.
PageCount
=
value
;
if
(
PageCount
<=
1
)
{
ShowBtn
(
false
,
false
);
}
else
{
ShowBtn
(
false
,
PageCount
>
1
);
}
}
}
public
override
int
PageIndex
{
get
{
return
base
.
PageIndex
;
}
set
{
base
.
PageIndex
=
value
;
if
(
PageCount
<=
1
)
{
ShowBtn
(
false
,
false
);
}
else
{
ShowBtn
(
false
,
PageCount
>
1
);
}
}
}
/// <summary>
/// <summary>
/// Initializes a new instance of the <see cref="UCPagerControl" /> class.
/// Initializes a new instance of the <see cref="UCPagerControl" /> class.
/// </summary>
/// </summary>
...
@@ -90,5 +129,7 @@ namespace HZH_Controls.Controls
...
@@ -90,5 +129,7 @@ namespace HZH_Controls.Controls
panel1
.
Visible
=
panel3
.
Visible
=
blnLeftBtn
;
panel1
.
Visible
=
panel3
.
Visible
=
blnLeftBtn
;
panel2
.
Visible
=
panel4
.
Visible
=
blnRightBtn
;
panel2
.
Visible
=
panel4
.
Visible
=
blnRightBtn
;
}
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl.resx
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl.resx
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl2.Designer.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl2.Designer.cs
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl2.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl2.cs
查看文件 @
b60631b
...
@@ -105,6 +105,8 @@ namespace HZH_Controls.Controls
...
@@ -105,6 +105,8 @@ namespace HZH_Controls.Controls
set
set
{
{
base
.
PageSize
=
value
;
base
.
PageSize
=
value
;
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
ResetPageCount
();
ResetPageCount
();
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
...
@@ -112,6 +114,40 @@ namespace HZH_Controls.Controls
...
@@ -112,6 +114,40 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
}
public
override
int
PageCount
{
get
{
return
base
.
PageCount
;
}
set
{
base
.
PageCount
=
value
;
ReloadPage
();
}
}
public
override
int
PageIndex
{
get
{
return
base
.
PageIndex
;
}
set
{
base
.
PageIndex
=
value
;
ReloadPage
();
}
}
}
/// <summary>
/// <summary>
...
@@ -122,14 +158,24 @@ namespace HZH_Controls.Controls
...
@@ -122,14 +158,24 @@ namespace HZH_Controls.Controls
if
(
PageIndex
==
1
)
if
(
PageIndex
==
1
)
return
;
return
;
PageIndex
=
1
;
PageIndex
=
1
;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 上一页
/// 上一页
...
@@ -141,15 +187,24 @@ namespace HZH_Controls.Controls
...
@@ -141,15 +187,24 @@ namespace HZH_Controls.Controls
return
;
return
;
}
}
PageIndex
--;
PageIndex
--;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 下一页
/// 下一页
...
@@ -161,14 +216,24 @@ namespace HZH_Controls.Controls
...
@@ -161,14 +216,24 @@ namespace HZH_Controls.Controls
return
;
return
;
}
}
PageIndex
++;
PageIndex
++;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 最后一页
/// 最后一页
...
@@ -178,14 +243,24 @@ namespace HZH_Controls.Controls
...
@@ -178,14 +243,24 @@ namespace HZH_Controls.Controls
if
(
PageIndex
==
PageCount
)
if
(
PageIndex
==
PageCount
)
return
;
return
;
PageIndex
=
PageCount
;
PageIndex
=
PageCount
;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// Resets the page count.
/// Resets the page count.
...
@@ -318,6 +393,8 @@ namespace HZH_Controls.Controls
...
@@ -318,6 +393,8 @@ namespace HZH_Controls.Controls
PageIndex
=
(
sender
as
UCBtnExt
).
BtnText
.
ToInt
();
PageIndex
=
(
sender
as
UCBtnExt
).
BtnText
.
ToInt
();
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
...
@@ -325,6 +402,14 @@ namespace HZH_Controls.Controls
...
@@ -325,6 +402,14 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 控制按钮显示
/// 控制按钮显示
...
@@ -389,12 +474,22 @@ namespace HZH_Controls.Controls
...
@@ -389,12 +474,22 @@ namespace HZH_Controls.Controls
PageIndex
=
txtPage
.
InputText
.
ToInt
();
PageIndex
=
txtPage
.
InputText
.
ToInt
();
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
StartIndex
=
(
PageIndex
-
1
)
*
PageSize
;
ReloadPage
();
ReloadPage
();
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
}
}
}
}
...
...
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControl2.resx
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControl2.resx
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControlBase.cs
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControlBase.cs
查看文件 @
b60631b
...
@@ -75,6 +75,17 @@ namespace HZH_Controls.Controls
...
@@ -75,6 +75,17 @@ namespace HZH_Controls.Controls
#
endregion
#
endregion
#
endregion
#
endregion
private
PageModel
m_pm
=
PageModel
.
Soure
;
/// <summary>
/// 翻页控件模式
/// </summary>
/// <value>The page model.</value>
public
PageModel
PageModel
{
get
{
return
m_pm
;
}
set
{
m_pm
=
value
;
}
}
/// <summary>
/// <summary>
/// 总页数
/// 总页数
/// </summary>
/// </summary>
...
@@ -117,7 +128,7 @@ namespace HZH_Controls.Controls
...
@@ -117,7 +128,7 @@ namespace HZH_Controls.Controls
/// <summary>
/// <summary>
/// The m page size
/// The m page size
/// </summary>
/// </summary>
private
int
m_pageSize
=
1
;
private
int
m_pageSize
=
1
0
;
/// <summary>
/// <summary>
/// 每页显示数量
/// 每页显示数量
/// </summary>
/// </summary>
...
@@ -163,6 +174,8 @@ namespace HZH_Controls.Controls
...
@@ -163,6 +174,8 @@ namespace HZH_Controls.Controls
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private
void
UCPagerControlBase_Load
(
object
sender
,
EventArgs
e
)
private
void
UCPagerControlBase_Load
(
object
sender
,
EventArgs
e
)
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
if
(
DataSource
==
null
)
if
(
DataSource
==
null
)
ShowBtn
(
false
,
false
);
ShowBtn
(
false
,
false
);
else
else
...
@@ -170,11 +183,25 @@ namespace HZH_Controls.Controls
...
@@ -170,11 +183,25 @@ namespace HZH_Controls.Controls
ShowBtn
(
false
,
DataSource
.
Count
>
PageSize
);
ShowBtn
(
false
,
DataSource
.
Count
>
PageSize
);
}
}
}
}
else
{
if
(
PageCount
<=
1
)
{
ShowBtn
(
false
,
false
);
}
else
{
ShowBtn
(
false
,
PageCount
>
1
);
}
}
}
/// <summary>
/// <summary>
/// 第一页
/// 第一页
/// </summary>
/// </summary>
public
virtual
void
FirstPage
()
public
virtual
void
FirstPage
()
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
startIndex
=
0
;
startIndex
=
0
;
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
...
@@ -183,11 +210,24 @@ namespace HZH_Controls.Controls
...
@@ -183,11 +210,24 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
startIndex
=
0
;
PageIndex
=
1
;
SetShow
();
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 上一页
/// 上一页
/// </summary>
/// </summary>
public
virtual
void
PreviousPage
()
public
virtual
void
PreviousPage
()
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
if
(
startIndex
==
0
)
if
(
startIndex
==
0
)
return
;
return
;
startIndex
-=
m_pageSize
;
startIndex
-=
m_pageSize
;
...
@@ -200,12 +240,25 @@ namespace HZH_Controls.Controls
...
@@ -200,12 +240,25 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
PageIndex
<=
1
)
return
;
PageIndex
--;
SetShow
();
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 下一页
/// 下一页
/// </summary>
/// </summary>
public
virtual
void
NextPage
()
public
virtual
void
NextPage
()
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
if
(
startIndex
+
m_pageSize
>=
DataSource
.
Count
)
if
(
startIndex
+
m_pageSize
>=
DataSource
.
Count
)
{
{
return
;
return
;
...
@@ -220,11 +273,25 @@ namespace HZH_Controls.Controls
...
@@ -220,11 +273,25 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
PageIndex
>=
PageCount
)
return
;
PageIndex
++;
SetShow
();
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 最后一页
/// 最后一页
/// </summary>
/// </summary>
public
virtual
void
EndPage
()
public
virtual
void
EndPage
()
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
if
(
DataSource
==
null
)
if
(
DataSource
==
null
)
{
{
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
...
@@ -243,17 +310,37 @@ namespace HZH_Controls.Controls
...
@@ -243,17 +310,37 @@ namespace HZH_Controls.Controls
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
PageIndex
=
PageCount
;
SetShow
();
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 刷新数据
/// 刷新数据
/// </summary>
/// </summary>
public
virtual
void
Reload
()
public
virtual
void
Reload
()
{
{
if
(
PageModel
==
HZH_Controls
.
Controls
.
PageModel
.
Soure
)
{
var
s
=
GetCurrentSource
();
var
s
=
GetCurrentSource
();
if
(
ShowSourceChanged
!=
null
)
if
(
ShowSourceChanged
!=
null
)
{
{
ShowSourceChanged
(
s
);
ShowSourceChanged
(
s
);
}
}
}
}
else
{
if
(
ShowSourceChanged
!=
null
)
{
ShowSourceChanged
(
this
);
}
}
}
/// <summary>
/// <summary>
/// 获取当前页数据
/// 获取当前页数据
/// </summary>
/// </summary>
...
@@ -301,5 +388,31 @@ namespace HZH_Controls.Controls
...
@@ -301,5 +388,31 @@ namespace HZH_Controls.Controls
/// <param name="blnRightBtn">是否显示下一页,最后一页</param>
/// <param name="blnRightBtn">是否显示下一页,最后一页</param>
protected
virtual
void
ShowBtn
(
bool
blnLeftBtn
,
bool
blnRightBtn
)
protected
virtual
void
ShowBtn
(
bool
blnLeftBtn
,
bool
blnRightBtn
)
{
}
{
}
private
void
SetShow
()
{
bool
blnLeft
=
false
;
bool
blnRight
=
false
;
if
(
PageCount
>
0
)
{
if
(
PageIndex
>
1
)
{
blnLeft
=
true
;
}
else
{
blnLeft
=
false
;
}
if
(
PageIndex
>=
PageCount
)
{
blnRight
=
false
;
}
else
{
blnRight
=
true
;
}
}
ShowBtn
(
blnLeft
,
blnRight
);
}
}
}
}
}
HZH_Controls/HZH_Controls/Controls/
List
/UCPagerControlBase.resx
→
HZH_Controls/HZH_Controls/Controls/
Page
/UCPagerControlBase.resx
查看文件 @
b60631b
文件被删除
HZH_Controls/HZH_Controls/Controls/Transfer/UCTransfer.Designer.cs
查看文件 @
b60631b
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
//
//
// dgvRight
// dgvRight
//
//
this
.
dgvRight
.
AutoRowsScroll
=
true
;
this
.
dgvRight
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
dgvRight
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
dgvRight
.
Columns
=
null
;
this
.
dgvRight
.
Columns
=
null
;
this
.
dgvRight
.
DataSource
=
null
;
this
.
dgvRight
.
DataSource
=
null
;
...
@@ -100,12 +100,11 @@
...
@@ -100,12 +100,11 @@
this
.
dgvRight
.
HeadHeight
=
40
;
this
.
dgvRight
.
HeadHeight
=
40
;
this
.
dgvRight
.
HeadPadingLeft
=
0
;
this
.
dgvRight
.
HeadPadingLeft
=
0
;
this
.
dgvRight
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
dgvRight
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
dgvRight
.
IsCloseAutoHeight
=
false
;
this
.
dgvRight
.
IsShowCheckBox
=
true
;
this
.
dgvRight
.
IsShowCheckBox
=
true
;
this
.
dgvRight
.
IsShowHead
=
true
;
this
.
dgvRight
.
IsShowHead
=
true
;
this
.
dgvRight
.
Location
=
new
System
.
Drawing
.
Point
(
1
,
1
);
this
.
dgvRight
.
Location
=
new
System
.
Drawing
.
Point
(
1
,
1
);
this
.
dgvRight
.
Name
=
"dgvRight"
;
this
.
dgvRight
.
Name
=
"dgvRight"
;
this
.
dgvRight
.
Page
=
null
;
this
.
dgvRight
.
RowHeight
=
40
;
this
.
dgvRight
.
RowHeight
=
40
;
this
.
dgvRight
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
dgvRight
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
dgvRight
.
Size
=
new
System
.
Drawing
.
Size
(
194
,
395
);
this
.
dgvRight
.
Size
=
new
System
.
Drawing
.
Size
(
194
,
395
);
...
@@ -196,7 +195,6 @@
...
@@ -196,7 +195,6 @@
//
//
// dgvLeft
// dgvLeft
//
//
this
.
dgvLeft
.
AutoRowsScroll
=
true
;
this
.
dgvLeft
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
dgvLeft
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
dgvLeft
.
Columns
=
null
;
this
.
dgvLeft
.
Columns
=
null
;
this
.
dgvLeft
.
DataSource
=
null
;
this
.
dgvLeft
.
DataSource
=
null
;
...
@@ -205,12 +203,10 @@
...
@@ -205,12 +203,10 @@
this
.
dgvLeft
.
HeadHeight
=
40
;
this
.
dgvLeft
.
HeadHeight
=
40
;
this
.
dgvLeft
.
HeadPadingLeft
=
0
;
this
.
dgvLeft
.
HeadPadingLeft
=
0
;
this
.
dgvLeft
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
dgvLeft
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
dgvLeft
.
IsCloseAutoHeight
=
false
;
this
.
dgvLeft
.
IsShowCheckBox
=
true
;
this
.
dgvLeft
.
IsShowCheckBox
=
true
;
this
.
dgvLeft
.
IsShowHead
=
true
;
this
.
dgvLeft
.
IsShowHead
=
true
;
this
.
dgvLeft
.
Location
=
new
System
.
Drawing
.
Point
(
1
,
1
);
this
.
dgvLeft
.
Location
=
new
System
.
Drawing
.
Point
(
1
,
1
);
this
.
dgvLeft
.
Name
=
"dgvLeft"
;
this
.
dgvLeft
.
Name
=
"dgvLeft"
;
this
.
dgvLeft
.
Page
=
null
;
this
.
dgvLeft
.
RowHeight
=
40
;
this
.
dgvLeft
.
RowHeight
=
40
;
this
.
dgvLeft
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
dgvLeft
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
dgvLeft
.
Size
=
new
System
.
Drawing
.
Size
(
193
,
395
);
this
.
dgvLeft
.
Size
=
new
System
.
Drawing
.
Size
(
193
,
395
);
...
...
HZH_Controls/HZH_Controls/Controls/Transfer/UCTransfer.cs
查看文件 @
b60631b
...
@@ -122,8 +122,6 @@ namespace HZH_Controls.Controls
...
@@ -122,8 +122,6 @@ namespace HZH_Controls.Controls
public
UCTransfer
()
public
UCTransfer
()
{
{
InitializeComponent
();
InitializeComponent
();
dgvLeft
.
IsCloseAutoHeight
=
true
;
dgvRight
.
IsCloseAutoHeight
=
true
;
LeftColumns
=
new
DataGridViewColumnEntity
[
0
];
LeftColumns
=
new
DataGridViewColumnEntity
[
0
];
RightColumns
=
new
DataGridViewColumnEntity
[
0
];
RightColumns
=
new
DataGridViewColumnEntity
[
0
];
LeftDataSource
=
new
object
[
0
];
LeftDataSource
=
new
object
[
0
];
...
...
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.Designer.cs
查看文件 @
b60631b
...
@@ -106,6 +106,7 @@ namespace HZH_Controls.Forms
...
@@ -106,6 +106,7 @@ namespace HZH_Controls.Forms
this
.
ShowInTaskbar
=
false
;
this
.
ShowInTaskbar
=
false
;
this
.
Text
=
"FrmWithTitle"
;
this
.
Text
=
"FrmWithTitle"
;
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmWithTitle_Shown
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
FrmWithTitle_Shown
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
FrmWithTitle_SizeChanged
);
this
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
FrmWithTitle_VisibleChanged
);
this
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
FrmWithTitle_VisibleChanged
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
...
...
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.cs
查看文件 @
b60631b
...
@@ -113,5 +113,10 @@ namespace HZH_Controls.Forms
...
@@ -113,5 +113,10 @@ namespace HZH_Controls.Forms
{
{
this
.
Close
();
this
.
Close
();
}
}
private
void
FrmWithTitle_SizeChanged
(
object
sender
,
EventArgs
e
)
{
btnClose
.
Location
=
new
Point
(
this
.
Width
-
btnClose
.
Width
,
btnClose
.
Location
.
Y
);
}
}
}
}
}
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
b60631b
...
@@ -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>
...
@@ -96,6 +97,7 @@
...
@@ -96,6 +97,7 @@
</Compile>
</Compile>
<Compile Include="Controls\Navigation\CrumbNavigationClickEventArgs.cs" />
<Compile Include="Controls\Navigation\CrumbNavigationClickEventArgs.cs" />
<Compile Include="Controls\Navigation\CrumbNavigationItem.cs" />
<Compile Include="Controls\Navigation\CrumbNavigationItem.cs" />
<Compile Include="Controls\Page\PageModel.cs" />
<Compile Include="Controls\Panel\UCPanelQuote.cs">
<Compile Include="Controls\Panel\UCPanelQuote.cs">
<SubType>Component</SubType>
<SubType>Component</SubType>
</Compile>
</Compile>
...
@@ -258,8 +260,8 @@
...
@@ -258,8 +260,8 @@
<DependentUpon>UCLEDTime.cs</DependentUpon>
<DependentUpon>UCLEDTime.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\List\IListViewItem.cs" />
<Compile Include="Controls\List\IListViewItem.cs" />
<Compile Include="Controls\
List
\IPageControl.cs" />
<Compile Include="Controls\
Page
\IPageControl.cs" />
<Compile Include="Controls\
List
\PageControlEventHandler.cs" />
<Compile Include="Controls\
Page
\PageControlEventHandler.cs" />
<Compile Include="Controls\List\UCListView.cs">
<Compile Include="Controls\List\UCListView.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
...
@@ -272,16 +274,16 @@
...
@@ -272,16 +274,16 @@
<Compile Include="Controls\List\UCListViewItem.Designer.cs">
<Compile Include="Controls\List\UCListViewItem.Designer.cs">
<DependentUpon>UCListViewItem.cs</DependentUpon>
<DependentUpon>UCListViewItem.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\
List
\UCPagerControl.cs">
<Compile Include="Controls\
Page
\UCPagerControl.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\
List
\UCPagerControl.Designer.cs">
<Compile Include="Controls\
Page
\UCPagerControl.Designer.cs">
<DependentUpon>UCPagerControl.cs</DependentUpon>
<DependentUpon>UCPagerControl.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\
List
\UCPagerControl2.cs">
<Compile Include="Controls\
Page
\UCPagerControl2.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\
List
\UCPagerControl2.Designer.cs">
<Compile Include="Controls\
Page
\UCPagerControl2.Designer.cs">
<DependentUpon>UCPagerControl2.cs</DependentUpon>
<DependentUpon>UCPagerControl2.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\Menu\IMenuItem.cs" />
<Compile Include="Controls\Menu\IMenuItem.cs" />
...
@@ -482,7 +484,7 @@
...
@@ -482,7 +484,7 @@
<Compile Include="Controls\List\UCListItemExt.Designer.cs">
<Compile Include="Controls\List\UCListItemExt.Designer.cs">
<DependentUpon>UCListItemExt.cs</DependentUpon>
<DependentUpon>UCListItemExt.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Controls\
List
\UCPagerControlBase.cs">
<Compile Include="Controls\
Page
\UCPagerControlBase.cs">
<SubType>UserControl</SubType>
<SubType>UserControl</SubType>
</Compile>
</Compile>
<Compile Include="Controls\Process\UCProcessExt.cs">
<Compile Include="Controls\Process\UCProcessExt.cs">
...
@@ -705,13 +707,13 @@
...
@@ -705,13 +707,13 @@
<EmbeddedResource Include="Controls\List\UCListViewItem.resx">
<EmbeddedResource Include="Controls\List\UCListViewItem.resx">
<DependentUpon>UCListViewItem.cs</DependentUpon>
<DependentUpon>UCListViewItem.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\
List
\UCPagerControl.resx">
<EmbeddedResource Include="Controls\
Page
\UCPagerControl.resx">
<DependentUpon>UCPagerControl.cs</DependentUpon>
<DependentUpon>UCPagerControl.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\
List
\UCPagerControl2.resx">
<EmbeddedResource Include="Controls\
Page
\UCPagerControl2.resx">
<DependentUpon>UCPagerControl2.cs</DependentUpon>
<DependentUpon>UCPagerControl2.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\
List
\UCPagerControlBase.resx">
<EmbeddedResource Include="Controls\
Page
\UCPagerControlBase.resx">
<DependentUpon>UCPagerControlBase.cs</DependentUpon>
<DependentUpon>UCPagerControlBase.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Menu\UCMenu.resx">
<EmbeddedResource Include="Controls\Menu\UCMenu.resx">
...
...
HZH_Controls/Test/FrmMain.cs
查看文件 @
b60631b
...
@@ -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
查看文件 @
b60631b
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <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
查看文件 @
b60631b
...
@@ -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
查看文件 @
b60631b
955 字节
HZH_Controls/Test/Test.csproj
查看文件 @
b60631b
...
@@ -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/UCTestGridTable.Designer.cs
查看文件 @
b60631b
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
//
//
// ucDataGridView1
// ucDataGridView1
//
//
this
.
ucDataGridView1
.
AutoRowsScroll
=
false
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
...
@@ -42,12 +41,10 @@
...
@@ -42,12 +41,10 @@
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
0
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsCloseAutoHeight
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Page
=
null
;
this
.
ucDataGridView1
.
RowHeight
=
41
;
this
.
ucDataGridView1
.
RowHeight
=
41
;
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
739
,
599
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
739
,
599
);
...
...
HZH_Controls/Test/UC/UCTestGridTable.cs
查看文件 @
b60631b
...
@@ -16,18 +16,8 @@ namespace Test.UC
...
@@ -16,18 +16,8 @@ namespace Test.UC
public
UCTestGridTable
()
public
UCTestGridTable
()
{
{
InitializeComponent
();
InitializeComponent
();
ucDataGridView1
.
SizeChanged
+=
ucDataGridView1_SizeChanged
;
ucDataGridView1
.
IsCloseAutoHeight
=
false
;
}
}
void
ucDataGridView1_SizeChanged
(
object
sender
,
EventArgs
e
)
{
if
(
this
.
ucDataGridView1
.
Page
!=
null
)
{
this
.
ucDataGridView1
.
Page
.
PageSize
=
this
.
ucDataGridView1
.
ShowCount
;
this
.
ucDataGridView1
.
DataSource
=
this
.
ucDataGridView1
.
Page
.
GetCurrentSource
();
}
}
private
void
UCTestGridTable_Load
(
object
sender
,
EventArgs
e
)
private
void
UCTestGridTable_Load
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -52,11 +42,7 @@ namespace Test.UC
...
@@ -52,11 +42,7 @@ namespace Test.UC
};
};
lstSource
.
Add
(
model
);
lstSource
.
Add
(
model
);
}
}
this
.
ucDataGridView1
.
DataSource
=
lstSource
;
var
page
=
new
UCPagerControl2
();
page
.
DataSource
=
lstSource
;
this
.
ucDataGridView1
.
Page
=
page
;
this
.
ucDataGridView1
.
First
();
}
}
}
}
...
...
HZH_Controls/Test/UC/UCTestGridTableCustom.Designer.cs
0 → 100644
查看文件 @
b60631b
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
查看文件 @
b60631b
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
查看文件 @
b60631b
<?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
查看文件 @
b60631b
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
查看文件 @
b60631b
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
查看文件 @
b60631b
<?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
查看文件 @
b60631b
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
查看文件 @
b60631b
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
查看文件 @
b60631b
<?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/UCTestPage.Designer.cs
查看文件 @
b60631b
...
@@ -32,16 +32,23 @@
...
@@ -32,16 +32,23 @@
this
.
ucPagerControl21
=
new
HZH_Controls
.
Controls
.
UCPagerControl2
();
this
.
ucPagerControl21
=
new
HZH_Controls
.
Controls
.
UCPagerControl2
();
this
.
ucPagerControl1
=
new
HZH_Controls
.
Controls
.
UCPagerControl
();
this
.
ucPagerControl1
=
new
HZH_Controls
.
Controls
.
UCPagerControl
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ucPagerControl22
=
new
HZH_Controls
.
Controls
.
UCPagerControl2
();
this
.
ucPagerControl2
=
new
HZH_Controls
.
Controls
.
UCPagerControl
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
SuspendLayout
();
this
.
SuspendLayout
();
//
//
// ucPagerControl21
// ucPagerControl21
//
//
this
.
ucPagerControl21
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucPagerControl21
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucPagerControl21
.
DataSource
=
((
System
.
Collections
.
Generic
.
List
<
object
>)(
resources
.
GetObject
(
"ucPagerControl21.DataSource"
)));
this
.
ucPagerControl21
.
DataSource
=
((
System
.
Collections
.
Generic
.
List
<
object
>)(
resources
.
GetObject
(
"ucPagerControl21.DataSource"
)));
this
.
ucPagerControl21
.
Location
=
new
System
.
Drawing
.
Point
(
31
,
19
);
this
.
ucPagerControl21
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
35
);
this
.
ucPagerControl21
.
Name
=
"ucPagerControl21"
;
this
.
ucPagerControl21
.
Name
=
"ucPagerControl21"
;
this
.
ucPagerControl21
.
PageCount
=
0
;
this
.
ucPagerControl21
.
PageCount
=
0
;
this
.
ucPagerControl21
.
PageIndex
=
1
;
this
.
ucPagerControl21
.
PageIndex
=
1
;
this
.
ucPagerControl21
.
PageModel
=
HZH_Controls
.
Controls
.
PageModel
.
Soure
;
this
.
ucPagerControl21
.
PageSize
=
0
;
this
.
ucPagerControl21
.
PageSize
=
0
;
this
.
ucPagerControl21
.
Size
=
new
System
.
Drawing
.
Size
(
709
,
41
);
this
.
ucPagerControl21
.
Size
=
new
System
.
Drawing
.
Size
(
709
,
41
);
this
.
ucPagerControl21
.
StartIndex
=
0
;
this
.
ucPagerControl21
.
StartIndex
=
0
;
...
@@ -50,10 +57,11 @@
...
@@ -50,10 +57,11 @@
// ucPagerControl1
// ucPagerControl1
//
//
this
.
ucPagerControl1
.
DataSource
=
null
;
this
.
ucPagerControl1
.
DataSource
=
null
;
this
.
ucPagerControl1
.
Location
=
new
System
.
Drawing
.
Point
(
60
,
77
);
this
.
ucPagerControl1
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
82
);
this
.
ucPagerControl1
.
Name
=
"ucPagerControl1"
;
this
.
ucPagerControl1
.
Name
=
"ucPagerControl1"
;
this
.
ucPagerControl1
.
PageCount
=
0
;
this
.
ucPagerControl1
.
PageCount
=
0
;
this
.
ucPagerControl1
.
PageIndex
=
1
;
this
.
ucPagerControl1
.
PageIndex
=
1
;
this
.
ucPagerControl1
.
PageModel
=
HZH_Controls
.
Controls
.
PageModel
.
Soure
;
this
.
ucPagerControl1
.
PageSize
=
1
;
this
.
ucPagerControl1
.
PageSize
=
1
;
this
.
ucPagerControl1
.
Size
=
new
System
.
Drawing
.
Size
(
304
,
58
);
this
.
ucPagerControl1
.
Size
=
new
System
.
Drawing
.
Size
(
304
,
58
);
this
.
ucPagerControl1
.
StartIndex
=
0
;
this
.
ucPagerControl1
.
StartIndex
=
0
;
...
@@ -62,24 +70,75 @@
...
@@ -62,24 +70,75 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
58
,
182
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
477
,
128
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
197
,
12
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
197
,
12
);
this
.
label1
.
TabIndex
=
7
;
this
.
label1
.
TabIndex
=
7
;
this
.
label1
.
Text
=
"模拟1000条数据,每页10条展示分页"
;
this
.
label1
.
Text
=
"模拟1000条数据,每页10条展示分页"
;
//
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
ucPagerControl21
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
ucPagerControl1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
13
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
753
,
176
);
this
.
groupBox1
.
TabIndex
=
8
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"数据模式(PageModel=Source)"
;
//
// groupBox2
//
this
.
groupBox2
.
Controls
.
Add
(
this
.
ucPagerControl22
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
ucPagerControl2
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
216
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
753
,
176
);
this
.
groupBox2
.
TabIndex
=
8
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"页数模式(PageModel=PageCount)"
;
//
// ucPagerControl22
//
this
.
ucPagerControl22
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucPagerControl22
.
DataSource
=
((
System
.
Collections
.
Generic
.
List
<
object
>)(
resources
.
GetObject
(
"ucPagerControl22.DataSource"
)));
this
.
ucPagerControl22
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
35
);
this
.
ucPagerControl22
.
Name
=
"ucPagerControl22"
;
this
.
ucPagerControl22
.
PageCount
=
0
;
this
.
ucPagerControl22
.
PageIndex
=
1
;
this
.
ucPagerControl22
.
PageModel
=
HZH_Controls
.
Controls
.
PageModel
.
PageCount
;
this
.
ucPagerControl22
.
PageSize
=
0
;
this
.
ucPagerControl22
.
Size
=
new
System
.
Drawing
.
Size
(
709
,
41
);
this
.
ucPagerControl22
.
StartIndex
=
0
;
this
.
ucPagerControl22
.
TabIndex
=
5
;
//
// ucPagerControl2
//
this
.
ucPagerControl2
.
DataSource
=
null
;
this
.
ucPagerControl2
.
Location
=
new
System
.
Drawing
.
Point
(
21
,
82
);
this
.
ucPagerControl2
.
Name
=
"ucPagerControl2"
;
this
.
ucPagerControl2
.
PageCount
=
0
;
this
.
ucPagerControl2
.
PageIndex
=
1
;
this
.
ucPagerControl2
.
PageModel
=
HZH_Controls
.
Controls
.
PageModel
.
PageCount
;
this
.
ucPagerControl2
.
PageSize
=
1
;
this
.
ucPagerControl2
.
Size
=
new
System
.
Drawing
.
Size
(
304
,
58
);
this
.
ucPagerControl2
.
StartIndex
=
0
;
this
.
ucPagerControl2
.
TabIndex
=
6
;
//
// UCTestPage
// UCTestPage
//
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
groupBox2
);
this
.
Controls
.
Add
(
this
.
ucPagerControl1
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
ucPagerControl21
);
this
.
Name
=
"UCTestPage"
;
this
.
Name
=
"UCTestPage"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
782
,
304
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
782
,
567
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
UCTestPage_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
UCTestPage_Load
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
}
...
@@ -88,5 +147,9 @@
...
@@ -88,5 +147,9 @@
private
HZH_Controls
.
Controls
.
UCPagerControl2
ucPagerControl21
;
private
HZH_Controls
.
Controls
.
UCPagerControl2
ucPagerControl21
;
private
HZH_Controls
.
Controls
.
UCPagerControl
ucPagerControl1
;
private
HZH_Controls
.
Controls
.
UCPagerControl
ucPagerControl1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox2
;
private
HZH_Controls
.
Controls
.
UCPagerControl2
ucPagerControl22
;
private
HZH_Controls
.
Controls
.
UCPagerControl
ucPagerControl2
;
}
}
}
}
HZH_Controls/Test/UC/UCTestPage.cs
查看文件 @
b60631b
...
@@ -32,6 +32,12 @@ namespace Test.UC
...
@@ -32,6 +32,12 @@ namespace Test.UC
ucPagerControl1
.
DataSource
=
lstPage2
;
ucPagerControl1
.
DataSource
=
lstPage2
;
this
.
ucPagerControl1
.
FirstPage
();
this
.
ucPagerControl1
.
FirstPage
();
ucPagerControl22
.
PageCount
=
10
;
ucPagerControl22
.
PageIndex
=
1
;
ucPagerControl2
.
PageCount
=
10
;
ucPagerControl2
.
PageIndex
=
1
;
}
}
}
}
}
}
HZH_Controls/Test/UC/UCTestPage.resx
查看文件 @
b60631b
...
@@ -126,4 +126,13 @@
...
@@ -126,4 +126,13 @@
ZW1zBV9zaXplCF92ZXJzaW9uBQAACAgCAAAACQMAAAAAAAAAAAAAABADAAAAAAAAAAs=
ZW1zBV9zaXplCF92ZXJzaW9uBQAACAgCAAAACQMAAAAAAAAAAAAAABADAAAAAAAAAAs=
</value>
</value>
</data>
</data>
<data name="ucPagerControl22.DataSource" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLk9iamVjdAMAAAAGX2l0
ZW1zBV9zaXplCF92ZXJzaW9uBQAACAgCAAAACQMAAAAAAAAAAAAAABADAAAAAAAAAAs=
</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
HZH_Controls/Test/UC/UCTestTreeGridTable.Designer.cs
查看文件 @
b60631b
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
//
//
// ucDataGridView1
// ucDataGridView1
//
//
this
.
ucDataGridView1
.
AutoRowsScroll
=
true
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
Columns
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
this
.
ucDataGridView1
.
DataSource
=
null
;
...
@@ -42,12 +41,10 @@
...
@@ -42,12 +41,10 @@
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadHeight
=
40
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
24
;
this
.
ucDataGridView1
.
HeadPadingLeft
=
24
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
HeadTextColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
ucDataGridView1
.
IsCloseAutoHeight
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
false
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
IsShowHead
=
true
;
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucDataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Name
=
"ucDataGridView1"
;
this
.
ucDataGridView1
.
Page
=
null
;
this
.
ucDataGridView1
.
RowHeight
=
41
;
this
.
ucDataGridView1
.
RowHeight
=
41
;
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
RowType
=
typeof
(
HZH_Controls
.
Controls
.
UCDataGridViewRow
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
825
,
674
);
this
.
ucDataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
825
,
674
);
...
...
HZH_Controls/Test/UC/UCTestTreeGridTable.cs
查看文件 @
b60631b
...
@@ -16,18 +16,8 @@ namespace Test.UC
...
@@ -16,18 +16,8 @@ namespace Test.UC
public
UCTestTreeGridTable
()
public
UCTestTreeGridTable
()
{
{
InitializeComponent
();
InitializeComponent
();
ucDataGridView1
.
SizeChanged
+=
ucDataGridView1_SizeChanged
;
}
}
void
ucDataGridView1_SizeChanged
(
object
sender
,
EventArgs
e
)
{
if
(
this
.
ucDataGridView1
.
Page
!=
null
)
{
this
.
ucDataGridView1
.
ResetShowCount
();
this
.
ucDataGridView1
.
Page
.
PageSize
=
this
.
ucDataGridView1
.
ShowCount
;
this
.
ucDataGridView1
.
DataSource
=
this
.
ucDataGridView1
.
Page
.
GetCurrentSource
();
}
}
private
void
UCTestTreeGridTable_Load
(
object
sender
,
EventArgs
e
)
private
void
UCTestTreeGridTable_Load
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -55,10 +45,7 @@ namespace Test.UC
...
@@ -55,10 +45,7 @@ namespace Test.UC
AddChilds
(
model
,
5
);
AddChilds
(
model
,
5
);
}
}
var
page
=
new
UCPagerControl2
();
this
.
ucDataGridView1
.
DataSource
=
lstSource
;
page
.
DataSource
=
lstSource
;
this
.
ucDataGridView1
.
Page
=
page
;
this
.
ucDataGridView1
.
First
();
}
}
private
void
AddChilds
(
TestGridModel
tm
,
int
intCount
)
private
void
AddChilds
(
TestGridModel
tm
,
int
intCount
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论