Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit b861ad78
由
HZH
编写于
2019-08-16 16:27:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修改分页控件bug
1 个父辈
fac77462
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
40 行增加
和
59 行删除
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.Designer.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.Designer.cs
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.cs
HZH_Controls/HZH_Controls/Forms/FrmTips.cs
HZH_Controls/HZH_Controls/Forms/FrmWithOKCancel1.cs
HZH_Controls/HZH_Controls/Forms/FrmWithOKCancel2.cs
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.cs
HZH_Controls/HZH_Controls/HZH_Controls.csproj
HZH_Controls/Test/Form1.Designer.cs
HZH_Controls/Test/FrmTemp1Test.cs
HZH_Controls/HZH_Controls/Controls/DataGridView/UCDataGridView.Designer.cs
查看文件 @
b861ad7
...
@@ -75,15 +75,15 @@
...
@@ -75,15 +75,15 @@
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
,
4
75
);
this
.
panRow
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
4
81
);
this
.
panRow
.
TabIndex
=
1
;
this
.
panRow
.
TabIndex
=
1
;
//
//
// panPage
// panPage
//
//
this
.
panPage
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Bottom
;
this
.
panPage
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Bottom
;
this
.
panPage
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
5
15
);
this
.
panPage
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
5
21
);
this
.
panPage
.
Name
=
"panPage"
;
this
.
panPage
.
Name
=
"panPage"
;
this
.
panPage
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
50
);
this
.
panPage
.
Size
=
new
System
.
Drawing
.
Size
(
1061
,
44
);
this
.
panPage
.
TabIndex
=
0
;
this
.
panPage
.
TabIndex
=
0
;
this
.
panPage
.
Visible
=
false
;
this
.
panPage
.
Visible
=
false
;
//
//
...
...
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.Designer.cs
查看文件 @
b861ad7
namespace
HZH_Controls.Controls
.List
namespace
HZH_Controls.Controls
{
{
partial
class
UCPagerControl2
partial
class
UCPagerControl2
{
{
...
...
HZH_Controls/HZH_Controls/Controls/List/UCPagerControl2.cs
查看文件 @
b861ad7
...
@@ -12,7 +12,7 @@ using System.Linq;
...
@@ -12,7 +12,7 @@ using System.Linq;
using
System.Text
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
namespace
HZH_Controls.Controls
.List
namespace
HZH_Controls.Controls
{
{
[
ToolboxItem
(
true
)]
[
ToolboxItem
(
true
)]
public
partial
class
UCPagerControl2
:
UCPagerControlBase
public
partial
class
UCPagerControl2
:
UCPagerControlBase
...
@@ -34,31 +34,31 @@ namespace HZH_Controls.Controls.List
...
@@ -34,31 +34,31 @@ namespace HZH_Controls.Controls.List
public
override
event
PageControlEventHandler
ShowSourceChanged
;
public
override
event
PageControlEventHandler
ShowSourceChanged
;
private
List
<
object
>
m_dataSource
;
public
override
List
<
object
>
DataSource
public
override
List
<
object
>
DataSource
{
{
get
get
{
{
return
m_d
ataSource
;
return
base
.
D
ataSource
;
}
}
set
set
{
{
m_d
ataSource
=
value
;
base
.
D
ataSource
=
value
;
if
(
m_d
ataSource
==
null
)
if
(
base
.
D
ataSource
==
null
)
m_d
ataSource
=
new
List
<
object
>();
base
.
D
ataSource
=
new
List
<
object
>();
ResetPageCount
();
ResetPageCount
();
}
}
}
}
private
int
m_intPageSize
=
0
;
public
override
int
PageSize
public
override
int
PageSize
{
{
get
get
{
{
return
m_int
PageSize
;
return
base
.
PageSize
;
}
}
set
set
{
{
m_int
PageSize
=
value
;
base
.
PageSize
=
value
;
ResetPageCount
();
ResetPageCount
();
}
}
}
}
...
@@ -128,7 +128,7 @@ namespace HZH_Controls.Controls.List
...
@@ -128,7 +128,7 @@ namespace HZH_Controls.Controls.List
{
{
if
(
PageSize
>
0
)
if
(
PageSize
>
0
)
{
{
PageCount
=
m_dataSource
.
Count
/
m_intPageSize
+
(
m_dataSource
.
Count
%
m_int
PageSize
>
0
?
1
:
0
);
PageCount
=
base
.
DataSource
.
Count
/
base
.
PageSize
+
(
base
.
DataSource
.
Count
%
base
.
PageSize
>
0
?
1
:
0
);
}
}
txtPage
.
MaxValue
=
PageCount
;
txtPage
.
MaxValue
=
PageCount
;
txtPage
.
MinValue
=
1
;
txtPage
.
MinValue
=
1
;
...
...
HZH_Controls/HZH_Controls/Forms/FrmTips.cs
查看文件 @
b861ad7
...
@@ -72,6 +72,9 @@ namespace HZH_Controls.Forms
...
@@ -72,6 +72,9 @@ namespace HZH_Controls.Forms
}
}
#
endregion
#
endregion
/// <summary>
/// 重置倒计时
/// </summary>
public
void
ResetTimer
()
public
void
ResetTimer
()
{
{
if
(
m_CloseTime
>
0
)
if
(
m_CloseTime
>
0
)
...
...
HZH_Controls/HZH_Controls/Forms/FrmWithOKCancel1.cs
查看文件 @
b861ad7
...
@@ -40,14 +40,6 @@ namespace HZH_Controls.Forms
...
@@ -40,14 +40,6 @@ namespace HZH_Controls.Forms
private
void
FrmWithOKCancel1_VisibleChanged
(
object
sender
,
EventArgs
e
)
private
void
FrmWithOKCancel1_VisibleChanged
(
object
sender
,
EventArgs
e
)
{
{
//if (this.Visible)
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER);
//}
//else
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER | ControlHelper.AW_HIDE);
//}
}
}
}
}
}
}
HZH_Controls/HZH_Controls/Forms/FrmWithOKCancel2.cs
查看文件 @
b861ad7
...
@@ -40,14 +40,6 @@ namespace HZH_Controls.Forms
...
@@ -40,14 +40,6 @@ namespace HZH_Controls.Forms
private
void
FrmWithOKCancel2_VisibleChanged
(
object
sender
,
EventArgs
e
)
private
void
FrmWithOKCancel2_VisibleChanged
(
object
sender
,
EventArgs
e
)
{
{
//if (this.Visible)
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER);
//}
//else
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER | ControlHelper.AW_HIDE);
//}
}
}
}
}
}
}
HZH_Controls/HZH_Controls/Forms/FrmWithTitle.cs
查看文件 @
b861ad7
...
@@ -75,14 +75,6 @@ namespace HZH_Controls.Forms
...
@@ -75,14 +75,6 @@ namespace HZH_Controls.Forms
private
void
FrmWithTitle_VisibleChanged
(
object
sender
,
EventArgs
e
)
private
void
FrmWithTitle_VisibleChanged
(
object
sender
,
EventArgs
e
)
{
{
//if (this.Visible)
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER);
//}
//else
//{
// ControlHelper.AnimateWindow(this.Handle, 100, ControlHelper.AW_CENTER | ControlHelper.AW_HIDE);
//}
}
}
}
}
}
}
HZH_Controls/HZH_Controls/HZH_Controls.csproj
查看文件 @
b861ad7
...
@@ -274,11 +274,11 @@
...
@@ -274,11 +274,11 @@
<Compile Include="Forms\FrmInputs.Designer.cs">
<Compile Include="Forms\FrmInputs.Designer.cs">
<DependentUpon>FrmInputs.cs</DependentUpon>
<DependentUpon>FrmInputs.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Forms\Frm
Temp1
.cs">
<Compile Include="Forms\Frm
Back
.cs">
<SubType>Form</SubType>
<SubType>Form</SubType>
</Compile>
</Compile>
<Compile Include="Forms\Frm
Temp1
.Designer.cs">
<Compile Include="Forms\Frm
Back
.Designer.cs">
<DependentUpon>Frm
Temp1
.cs</DependentUpon>
<DependentUpon>Frm
Back
.cs</DependentUpon>
</Compile>
</Compile>
<Compile Include="Forms\FrmTips.cs">
<Compile Include="Forms\FrmTips.cs">
<SubType>Form</SubType>
<SubType>Form</SubType>
...
@@ -432,8 +432,8 @@
...
@@ -432,8 +432,8 @@
<EmbeddedResource Include="Forms\FrmInputs.resx">
<EmbeddedResource Include="Forms\FrmInputs.resx">
<DependentUpon>FrmInputs.cs</DependentUpon>
<DependentUpon>FrmInputs.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Frm
Temp1
.resx">
<EmbeddedResource Include="Forms\Frm
Back
.resx">
<DependentUpon>Frm
Temp1
.cs</DependentUpon>
<DependentUpon>Frm
Back
.cs</DependentUpon>
</EmbeddedResource>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FrmTips.resx">
<EmbeddedResource Include="Forms\FrmTips.resx">
<DependentUpon>FrmTips.cs</DependentUpon>
<DependentUpon>FrmTips.cs</DependentUpon>
...
...
HZH_Controls/Test/Form1.Designer.cs
查看文件 @
b861ad7
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
this
.
groupBox10
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox10
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ucMenu1
=
new
HZH_Controls
.
Controls
.
UCMenu
();
this
.
ucMenu1
=
new
HZH_Controls
.
Controls
.
UCMenu
();
this
.
groupBox11
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox11
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ucPagerControl21
=
new
HZH_Controls
.
Controls
.
List
.
UCPagerControl2
();
this
.
ucPagerControl21
=
new
HZH_Controls
.
Controls
.
UCPagerControl2
();
this
.
groupBox12
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox12
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
ucBtnsGroup1
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
ucBtnsGroup1
=
new
HZH_Controls
.
Controls
.
UCBtnsGroup
();
this
.
groupBox13
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox13
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
@@ -1096,7 +1096,7 @@
...
@@ -1096,7 +1096,7 @@
private
System
.
Windows
.
Forms
.
Button
button9
;
private
System
.
Windows
.
Forms
.
Button
button9
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox10
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox10
;
private
HZH_Controls
.
Controls
.
UCMenu
ucMenu1
;
private
HZH_Controls
.
Controls
.
UCMenu
ucMenu1
;
private
HZH_Controls
.
Controls
.
List
.
UCPagerControl2
ucPagerControl21
;
private
HZH_Controls
.
Controls
.
UCPagerControl2
ucPagerControl21
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox11
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox11
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox12
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox12
;
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup1
;
private
HZH_Controls
.
Controls
.
UCBtnsGroup
ucBtnsGroup1
;
...
...
HZH_Controls/Test/FrmTemp1Test.cs
查看文件 @
b861ad7
...
@@ -19,17 +19,17 @@ namespace Test
...
@@ -19,17 +19,17 @@ namespace Test
private
void
FrmTemp1Test_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmTemp1Test_Load
(
object
sender
,
EventArgs
e
)
{
{
List
<
DataGridViewColumnEntity
>
lstCulumns
=
new
List
<
DataGridViewColumnEntity
>();
List
<
DataGridViewColumnEntity
>
lstCulumns
=
new
List
<
DataGridViewColumnEntity
>();
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"ID"
,
HeadText
=
"编号"
,
Width
=
70
,
WidthType
=
SizeType
.
Absolute
});
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
=
"Name"
,
HeadText
=
"姓名"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
});
lstCulumns
.
Add
(
new
DataGridViewColumnEntity
()
{
DataField
=
"Age"
,
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
=
"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
()
{
DataField
=
"Sex"
,
HeadText
=
"性别"
,
Width
=
50
,
WidthType
=
SizeType
.
Percent
,
Format
=
(
a
)
=>
{
return
((
int
)
a
)
==
0
?
"女"
:
"男"
;
}
});
this
.
ucDataGridView1
.
Columns
=
lstCulumns
;
this
.
ucDataGridView1
.
Columns
=
lstCulumns
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
true
;
this
.
ucDataGridView1
.
IsShowCheckBox
=
true
;
List
<
object
>
lstSource
=
new
List
<
object
>();
List
<
object
>
lstSource
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
2
0
;
i
++)
for
(
int
i
=
0
;
i
<
20
0
;
i
++)
{
{
TestModel
model
=
new
TestModel
()
TestModel
model
=
new
TestModel
()
{
{
ID
=
i
.
ToString
(),
ID
=
i
.
ToString
(),
...
@@ -39,10 +39,12 @@ for (int i = 0; i < 20; i++)
...
@@ -39,10 +39,12 @@ for (int i = 0; i < 20; i++)
Sex
=
i
%
2
Sex
=
i
%
2
};
};
lstSource
.
Add
(
model
);
lstSource
.
Add
(
model
);
}
}
this
.
ucDataGridView1
.
DataSource
=
lstSource
;
var
page
=
new
UCPagerControl2
();
this
.
ucDataGridView1
.
First
();
page
.
DataSource
=
lstSource
;
this
.
ucDataGridView1
.
Page
=
page
;
this
.
ucDataGridView1
.
First
();
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论