Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 68681cd7
由
kwwwvagaa
编写于
2020-03-17 11:53:37 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
图片取样控件优化级demo更新
1 个父辈
df902249
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
118 行增加
和
3 行删除
HZH_Controls/HZH_Controls/Controls/Sampling/UCSampling.cs
HZH_Controls/Test/UC/UCTestSampling.Designer.cs
HZH_Controls/Test/UC/UCTestSampling.cs
HZH_Controls/Test/UC/UCTestSampling.resx
HZH_Controls/HZH_Controls/Controls/Sampling/UCSampling.cs
查看文件 @
68681cd
...
...
@@ -139,6 +139,12 @@ namespace HZH_Controls.Controls
/// </summary>
GraphicsPath
m_borderPath
=
new
GraphicsPath
();
[
Browsable
(
true
),
Category
(
"自定义属性"
),
Description
(
"边界"
),
Localizable
(
true
)]
public
GraphicsPath
BorderPath
{
get
{
return
m_borderPath
;
}
}
/// <summary>
/// Handles the SizeChanged event of the UCSampling control.
/// </summary>
...
...
@@ -248,14 +254,13 @@ namespace HZH_Controls.Controls
/// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
protected
override
void
OnPaint
(
PaintEventArgs
e
)
{
base
.
OnPaint
(
e
);
e
.
Graphics
.
SetGDIHigh
();
this
.
Region
=
new
System
.
Drawing
.
Region
(
m_borderPath
);
if
(
_bitCache
!=
null
)
e
.
Graphics
.
DrawImage
(
_bitCache
,
0
,
0
);
base
.
OnPaint
(
e
);
}
}
}
HZH_Controls/Test/UC/UCTestSampling.Designer.cs
查看文件 @
68681cd
...
...
@@ -36,6 +36,11 @@
this
.
ucSampling4
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling2
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling3
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling7
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling8
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling9
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling10
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
ucSampling11
=
new
HZH_Controls
.
Controls
.
UCSampling
();
this
.
SuspendLayout
();
//
// label1
...
...
@@ -113,10 +118,85 @@
this
.
ucSampling3
.
TabIndex
=
1
;
this
.
ucSampling3
.
Transparent
=
null
;
//
// ucSampling7
//
this
.
ucSampling7
.
Alpha
=
0
;
this
.
ucSampling7
.
ColorThreshold
=
10
;
this
.
ucSampling7
.
Location
=
new
System
.
Drawing
.
Point
(
655
,
460
);
this
.
ucSampling7
.
Name
=
"ucSampling7"
;
this
.
ucSampling7
.
SamplingImag
=
((
System
.
Drawing
.
Bitmap
)(
resources
.
GetObject
(
"ucSampling7.SamplingImag"
)));
this
.
ucSampling7
.
Size
=
new
System
.
Drawing
.
Size
(
218
,
189
);
this
.
ucSampling7
.
TabIndex
=
3
;
this
.
ucSampling7
.
Transparent
=
null
;
this
.
ucSampling7
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
ucSampling10_Paint
);
this
.
ucSampling7
.
MouseEnter
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseEnter
);
this
.
ucSampling7
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseLeave
);
//
// ucSampling8
//
this
.
ucSampling8
.
Alpha
=
0
;
this
.
ucSampling8
.
ColorThreshold
=
10
;
this
.
ucSampling8
.
Location
=
new
System
.
Drawing
.
Point
(
659
,
609
);
this
.
ucSampling8
.
Name
=
"ucSampling8"
;
this
.
ucSampling8
.
SamplingImag
=
((
System
.
Drawing
.
Bitmap
)(
resources
.
GetObject
(
"ucSampling8.SamplingImag"
)));
this
.
ucSampling8
.
Size
=
new
System
.
Drawing
.
Size
(
176
,
199
);
this
.
ucSampling8
.
TabIndex
=
4
;
this
.
ucSampling8
.
Transparent
=
null
;
this
.
ucSampling8
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
ucSampling10_Paint
);
this
.
ucSampling8
.
MouseEnter
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseEnter
);
this
.
ucSampling8
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseLeave
);
//
// ucSampling9
//
this
.
ucSampling9
.
Alpha
=
0
;
this
.
ucSampling9
.
ColorThreshold
=
10
;
this
.
ucSampling9
.
Location
=
new
System
.
Drawing
.
Point
(
449
,
609
);
this
.
ucSampling9
.
Name
=
"ucSampling9"
;
this
.
ucSampling9
.
SamplingImag
=
((
System
.
Drawing
.
Bitmap
)(
resources
.
GetObject
(
"ucSampling9.SamplingImag"
)));
this
.
ucSampling9
.
Size
=
new
System
.
Drawing
.
Size
(
215
,
199
);
this
.
ucSampling9
.
TabIndex
=
5
;
this
.
ucSampling9
.
Transparent
=
null
;
this
.
ucSampling9
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
ucSampling10_Paint
);
this
.
ucSampling9
.
MouseEnter
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseEnter
);
this
.
ucSampling9
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseLeave
);
//
// ucSampling10
//
this
.
ucSampling10
.
Alpha
=
0
;
this
.
ucSampling10
.
ColorThreshold
=
10
;
this
.
ucSampling10
.
Location
=
new
System
.
Drawing
.
Point
(
409
,
460
);
this
.
ucSampling10
.
Name
=
"ucSampling10"
;
this
.
ucSampling10
.
SamplingImag
=
((
System
.
Drawing
.
Bitmap
)(
resources
.
GetObject
(
"ucSampling10.SamplingImag"
)));
this
.
ucSampling10
.
Size
=
new
System
.
Drawing
.
Size
(
230
,
203
);
this
.
ucSampling10
.
TabIndex
=
6
;
this
.
ucSampling10
.
Transparent
=
null
;
this
.
ucSampling10
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
ucSampling10_Paint
);
this
.
ucSampling10
.
MouseEnter
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseEnter
);
this
.
ucSampling10
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseLeave
);
//
// ucSampling11
//
this
.
ucSampling11
.
Alpha
=
0
;
this
.
ucSampling11
.
ColorThreshold
=
10
;
this
.
ucSampling11
.
Location
=
new
System
.
Drawing
.
Point
(
518
,
394
);
this
.
ucSampling11
.
Name
=
"ucSampling11"
;
this
.
ucSampling11
.
SamplingImag
=
((
System
.
Drawing
.
Bitmap
)(
resources
.
GetObject
(
"ucSampling11.SamplingImag"
)));
this
.
ucSampling11
.
Size
=
new
System
.
Drawing
.
Size
(
250
,
189
);
this
.
ucSampling11
.
TabIndex
=
7
;
this
.
ucSampling11
.
Transparent
=
null
;
this
.
ucSampling11
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
ucSampling10_Paint
);
this
.
ucSampling11
.
MouseEnter
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseEnter
);
this
.
ucSampling11
.
MouseLeave
+=
new
System
.
EventHandler
(
this
.
ucSampling10_MouseLeave
);
//
// UCTestSampling
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
Controls
.
Add
(
this
.
ucSampling11
);
this
.
Controls
.
Add
(
this
.
ucSampling10
);
this
.
Controls
.
Add
(
this
.
ucSampling9
);
this
.
Controls
.
Add
(
this
.
ucSampling8
);
this
.
Controls
.
Add
(
this
.
ucSampling7
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
ucSampling6
);
this
.
Controls
.
Add
(
this
.
ucSampling3
);
...
...
@@ -125,7 +205,7 @@
this
.
Controls
.
Add
(
this
.
ucSampling5
);
this
.
Controls
.
Add
(
this
.
ucSampling4
);
this
.
Name
=
"UCTestSampling"
;
this
.
Size
=
new
System
.
Drawing
.
Size
(
1010
,
450
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
1010
,
821
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -140,6 +220,11 @@
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling1
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling2
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling3
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling7
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling8
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling9
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling10
;
private
HZH_Controls
.
Controls
.
UCSampling
ucSampling11
;
}
...
...
HZH_Controls/Test/UC/UCTestSampling.cs
查看文件 @
68681cd
...
...
@@ -6,6 +6,7 @@ using System.Data;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
HZH_Controls.Controls
;
namespace
Test.UC
{
...
...
@@ -16,5 +17,29 @@ namespace Test.UC
{
InitializeComponent
();
}
bool
blnIn
=
false
;
private
void
ucSampling10_MouseEnter
(
object
sender
,
EventArgs
e
)
{
blnIn
=
true
;
UCSampling
uc
=
(
UCSampling
)
sender
;
uc
.
Invalidate
();
}
private
void
ucSampling10_MouseLeave
(
object
sender
,
EventArgs
e
)
{
blnIn
=
false
;
UCSampling
uc
=
(
UCSampling
)
sender
;
uc
.
Invalidate
();
}
private
void
ucSampling10_Paint
(
object
sender
,
PaintEventArgs
e
)
{
if
(
blnIn
)
{
UCSampling
uc
=
(
UCSampling
)
sender
;
e
.
Graphics
.
FillPath
(
new
SolidBrush
(
Color
.
FromArgb
(
50
,
Color
.
White
)),
uc
.
BorderPath
);
}
}
}
}
HZH_Controls/Test/UC/UCTestSampling.resx
查看文件 @
68681cd
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论