Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4849d9f0
由
HZH
编写于
2019-10-11 11:13:13 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
添加注释
1 个父辈
20664192
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
4 行删除
HZH_Controls/HZH_Controls/Controls/NavigationMenu/UCNavigationMenuExt.cs
HZH_Controls/HZH_Controls/Controls/NavigationMenu/UCNavigationMenuExt.cs
查看文件 @
4849d9f
using
System
;
// ***********************************************************************
// Assembly : HZH_Controls
// Created : 2019-10-11
//
// ***********************************************************************
// <copyright file="UCNavigationMenuExt.cs">
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
// </copyright>
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.ComponentModel
;
using
System.Drawing
;
using
System.Drawing
;
...
@@ -10,6 +25,11 @@ using HZH_Controls.Forms;
...
@@ -10,6 +25,11 @@ using HZH_Controls.Forms;
namespace
HZH_Controls.Controls
namespace
HZH_Controls.Controls
{
{
/// <summary>
/// Class UCNavigationMenuExt.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public
partial
class
UCNavigationMenuExt
:
UserControl
public
partial
class
UCNavigationMenuExt
:
UserControl
{
{
/// <summary>
/// <summary>
...
@@ -121,6 +141,9 @@ namespace HZH_Controls.Controls
...
@@ -121,6 +141,9 @@ namespace HZH_Controls.Controls
/// The m LST anchors
/// The m LST anchors
/// </summary>
/// </summary>
Dictionary
<
NavigationMenuItemExt
,
FrmAnchor
>
m_lstAnchors
=
new
Dictionary
<
NavigationMenuItemExt
,
FrmAnchor
>();
Dictionary
<
NavigationMenuItemExt
,
FrmAnchor
>
m_lstAnchors
=
new
Dictionary
<
NavigationMenuItemExt
,
FrmAnchor
>();
/// <summary>
/// Initializes a new instance of the <see cref="UCNavigationMenuExt"/> class.
/// </summary>
public
UCNavigationMenuExt
()
public
UCNavigationMenuExt
()
{
{
InitializeComponent
();
InitializeComponent
();
...
@@ -139,6 +162,9 @@ namespace HZH_Controls.Controls
...
@@ -139,6 +162,9 @@ namespace HZH_Controls.Controls
}
}
}
}
/// <summary>
/// Reloads the menu.
/// </summary>
private
void
ReloadMenu
()
private
void
ReloadMenu
()
{
{
try
try
...
@@ -185,6 +211,11 @@ namespace HZH_Controls.Controls
...
@@ -185,6 +211,11 @@ namespace HZH_Controls.Controls
}
}
}
}
/// <summary>
/// Handles the Click event of the lbl control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
void
lbl_Click
(
object
sender
,
EventArgs
e
)
void
lbl_Click
(
object
sender
,
EventArgs
e
)
{
{
Label
lbl
=
sender
as
Label
;
Label
lbl
=
sender
as
Label
;
...
@@ -218,7 +249,7 @@ namespace HZH_Controls.Controls
...
@@ -218,7 +249,7 @@ namespace HZH_Controls.Controls
/// Handles the MouseEnter event of the lbl control.
/// Handles the MouseEnter event of the lbl control.
/// </summary>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="sender">The source of the event.</param>
/// <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
lbl_MouseEnter
(
object
sender
,
EventArgs
e
)
void
lbl_MouseEnter
(
object
sender
,
EventArgs
e
)
{
{
Label
lbl
=
sender
as
Label
;
Label
lbl
=
sender
as
Label
;
...
@@ -236,12 +267,12 @@ namespace HZH_Controls.Controls
...
@@ -236,12 +267,12 @@ namespace HZH_Controls.Controls
m_lstAnchors
[
menu
].
Show
();
m_lstAnchors
[
menu
].
Show
();
m_lstAnchors
[
menu
].
Size
=
menu
.
ShowControl
.
Size
;
m_lstAnchors
[
menu
].
Size
=
menu
.
ShowControl
.
Size
;
}
}
}
}
/// <summary>
/// <summary>
/// Handles the Paint event of the lbl control.
/// Handles the Paint event of the lbl control.
/// </summary>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="PaintEventArgs"/> instance containing the event data.</param>
/// <param name="e">The <see cref="PaintEventArgs"
/> instance containing the event data.</param>
void
lbl_Paint
(
object
sender
,
PaintEventArgs
e
)
void
lbl_Paint
(
object
sender
,
PaintEventArgs
e
)
{
{
Label
lbl
=
sender
as
Label
;
Label
lbl
=
sender
as
Label
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论