Commit 0dc2f5fe HZH

修改注释信息

1 个父辈 797e8cfe
正在显示 153 个修改的文件 包含 2529 行增加281 行删除
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCBtnExt.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnExt.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
public partial class UCBtnExt public partial class UCBtnExt
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -82,7 +102,13 @@ ...@@ -82,7 +102,13 @@
#endregion #endregion
/// <summary>
/// The label
/// </summary>
public System.Windows.Forms.Label lbl; public System.Windows.Forms.Label lbl;
/// <summary>
/// The label tips
/// </summary>
private System.Windows.Forms.Label lblTips; private System.Windows.Forms.Label lblTips;
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCBtnExt.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:57:36 // Created : 08-08-2019
// 功能描述:按钮 //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCBtnExt.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;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -15,11 +25,20 @@ using System.Windows.Forms; ...@@ -15,11 +25,20 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnExt.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
[DefaultEvent("BtnClick")] [DefaultEvent("BtnClick")]
public partial class UCBtnExt : UCControlBase public partial class UCBtnExt : UCControlBase
{ {
#region 字段属性 #region 字段属性
/// <summary>
/// 是否显示角标
/// </summary>
/// <value><c>true</c> if this instance is show tips; otherwise, <c>false</c>.</value>
[Description("是否显示角标"), Category("自定义")] [Description("是否显示角标"), Category("自定义")]
public bool IsShowTips public bool IsShowTips
{ {
...@@ -32,7 +51,10 @@ namespace HZH_Controls.Controls ...@@ -32,7 +51,10 @@ namespace HZH_Controls.Controls
this.lblTips.Visible = value; this.lblTips.Visible = value;
} }
} }
/// <summary>
/// 角标文字
/// </summary>
/// <value>The tips text.</value>
[Description("角标文字"), Category("自定义")] [Description("角标文字"), Category("自定义")]
public string TipsText public string TipsText
{ {
...@@ -46,7 +68,14 @@ namespace HZH_Controls.Controls ...@@ -46,7 +68,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The BTN back color
/// </summary>
private Color _btnBackColor = Color.White; private Color _btnBackColor = Color.White;
/// <summary>
/// 按钮背景色
/// </summary>
/// <value>The color of the BTN back.</value>
[Description("按钮背景色"), Category("自定义")] [Description("按钮背景色"), Category("自定义")]
public Color BtnBackColor public Color BtnBackColor
{ {
...@@ -58,10 +87,14 @@ namespace HZH_Controls.Controls ...@@ -58,10 +87,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The BTN fore color
/// </summary>
private Color _btnForeColor = Color.White; private Color _btnForeColor = Color.White;
/// <summary> /// <summary>
/// 按钮字体颜色 /// 按钮字体颜色
/// </summary> /// </summary>
/// <value>The color of the BTN fore.</value>
[Description("按钮字体颜色"), Category("自定义")] [Description("按钮字体颜色"), Category("自定义")]
public virtual Color BtnForeColor public virtual Color BtnForeColor
{ {
...@@ -73,10 +106,14 @@ namespace HZH_Controls.Controls ...@@ -73,10 +106,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The BTN font
/// </summary>
private Font _btnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); private Font _btnFont = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
/// <summary> /// <summary>
/// 按钮字体 /// 按钮字体
/// </summary> /// </summary>
/// <value>The BTN font.</value>
[Description("按钮字体"), Category("自定义")] [Description("按钮字体"), Category("自定义")]
public Font BtnFont public Font BtnFont
{ {
...@@ -94,10 +131,14 @@ namespace HZH_Controls.Controls ...@@ -94,10 +131,14 @@ namespace HZH_Controls.Controls
[Description("按钮点击事件"), Category("自定义")] [Description("按钮点击事件"), Category("自定义")]
public event EventHandler BtnClick; public event EventHandler BtnClick;
/// <summary>
/// The BTN text
/// </summary>
private string _btnText; private string _btnText;
/// <summary> /// <summary>
/// 按钮文字 /// 按钮文字
/// </summary> /// </summary>
/// <value>The BTN text.</value>
[Description("按钮文字"), Category("自定义")] [Description("按钮文字"), Category("自定义")]
public virtual string BtnText public virtual string BtnText
{ {
...@@ -109,8 +150,14 @@ namespace HZH_Controls.Controls ...@@ -109,8 +150,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m tips color
/// </summary>
private Color m_tipsColor = Color.FromArgb(232, 30, 99); private Color m_tipsColor = Color.FromArgb(232, 30, 99);
/// <summary>
/// 角标颜色
/// </summary>
/// <value>The color of the tips.</value>
[Description("角标颜色"), Category("自定义")] [Description("角标颜色"), Category("自定义")]
public Color TipsColor public Color TipsColor
{ {
...@@ -118,6 +165,9 @@ namespace HZH_Controls.Controls ...@@ -118,6 +165,9 @@ namespace HZH_Controls.Controls
set { m_tipsColor = value; } set { m_tipsColor = value; }
} }
#endregion #endregion
/// <summary>
/// Initializes a new instance of the <see cref="UCBtnExt" /> class.
/// </summary>
public UCBtnExt() public UCBtnExt()
{ {
InitializeComponent(); InitializeComponent();
...@@ -125,6 +175,11 @@ namespace HZH_Controls.Controls ...@@ -125,6 +175,11 @@ namespace HZH_Controls.Controls
lblTips.Paint += lblTips_Paint; lblTips.Paint += lblTips_Paint;
} }
/// <summary>
/// Handles the Paint event of the lblTips control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="PaintEventArgs" /> instance containing the event data.</param>
void lblTips_Paint(object sender, PaintEventArgs e) void lblTips_Paint(object sender, PaintEventArgs e)
{ {
e.Graphics.SetGDIHigh(); e.Graphics.SetGDIHigh();
...@@ -134,6 +189,11 @@ namespace HZH_Controls.Controls ...@@ -134,6 +189,11 @@ namespace HZH_Controls.Controls
e.Graphics.DrawString(TipsText, lblTips.Font, new SolidBrush(lblTips.ForeColor), new PointF((lblTips.Width - sizeEnd.Width) / 2, (lblTips.Height - sizeEnd.Height) / 2 + 1)); e.Graphics.DrawString(TipsText, lblTips.Font, new SolidBrush(lblTips.ForeColor), new PointF((lblTips.Width - sizeEnd.Width) / 2, (lblTips.Height - sizeEnd.Height) / 2 + 1));
} }
/// <summary>
/// Handles the MouseDown event of the lbl control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void lbl_MouseDown(object sender, MouseEventArgs e) private void lbl_MouseDown(object sender, MouseEventArgs e)
{ {
if (this.BtnClick != null) if (this.BtnClick != null)
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCBtnFillet.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnFillet.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
partial class UCBtnFillet partial class UCBtnFillet
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -62,6 +82,9 @@ ...@@ -62,6 +82,9 @@
#endregion #endregion
/// <summary>
/// The label
/// </summary>
private System.Windows.Forms.Label lbl; private System.Windows.Forms.Label lbl;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCBtnFillet.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:58:03 // Created : 08-08-2019
// 功能描述:按钮 //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCBtnFillet.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,11 +24,23 @@ using System.Windows.Forms; ...@@ -14,11 +24,23 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnFillet.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
[DefaultEvent("BtnClick")] [DefaultEvent("BtnClick")]
public partial class UCBtnFillet : UCControlBase public partial class UCBtnFillet : UCControlBase
{ {
/// <summary>
/// 按钮点击事件
/// </summary>
[Description("按钮点击事件"), Category("自定义")] [Description("按钮点击事件"), Category("自定义")]
public event EventHandler BtnClick; public event EventHandler BtnClick;
/// <summary>
/// 按钮图片
/// </summary>
/// <value>The BTN image.</value>
[Description("按钮图片"), Category("自定义")] [Description("按钮图片"), Category("自定义")]
public Image BtnImage public Image BtnImage
{ {
...@@ -34,6 +56,7 @@ namespace HZH_Controls.Controls ...@@ -34,6 +56,7 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 按钮文字 /// 按钮文字
/// </summary> /// </summary>
/// <value>The BTN text.</value>
[Description("按钮文字"), Category("自定义")] [Description("按钮文字"), Category("自定义")]
public string BtnText public string BtnText
{ {
...@@ -43,11 +66,19 @@ namespace HZH_Controls.Controls ...@@ -43,11 +66,19 @@ namespace HZH_Controls.Controls
lbl.Text = value; lbl.Text = value;
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCBtnFillet" /> class.
/// </summary>
public UCBtnFillet() public UCBtnFillet()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Handles the MouseDown event of the lbl control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void lbl_MouseDown(object sender, MouseEventArgs e) private void lbl_MouseDown(object sender, MouseEventArgs e)
{ {
if (BtnClick != null) if (BtnClick != null)
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCBtnImg.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnImg.
/// Implements the <see cref="HZH_Controls.Controls.UCBtnExt" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCBtnExt" />
partial class UCBtnImg partial class UCBtnImg
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCBtnImg.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:58:07 // Created : 08-08-2019
// 功能描述:按钮 //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCBtnImg.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -15,14 +25,20 @@ using System.Windows.Forms; ...@@ -15,14 +25,20 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary> /// <summary>
/// /// Class UCBtnImg.
/// Implements the <see cref="HZH_Controls.Controls.UCBtnExt" />
/// </summary> /// </summary>
/// <seealso cref="HZH_Controls.Controls.UCBtnExt" />
public partial class UCBtnImg : UCBtnExt public partial class UCBtnImg : UCBtnExt
{ {
/// <summary>
/// The BTN text
/// </summary>
private string _btnText = "自定义按钮"; private string _btnText = "自定义按钮";
/// <summary> /// <summary>
/// 按钮文字 /// 按钮文字
/// </summary> /// </summary>
/// <value>The BTN text.</value>
[Description("按钮文字"), Category("自定义")] [Description("按钮文字"), Category("自定义")]
public override string BtnText public override string BtnText
{ {
...@@ -37,6 +53,7 @@ namespace HZH_Controls.Controls ...@@ -37,6 +53,7 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 图片 /// 图片
/// </summary> /// </summary>
/// <value>The image.</value>
[Description("图片"), Category("自定义")] [Description("图片"), Category("自定义")]
public virtual Image Image public virtual Image Image
{ {
...@@ -49,14 +66,20 @@ namespace HZH_Controls.Controls ...@@ -49,14 +66,20 @@ namespace HZH_Controls.Controls
this.lbl.Image = value; this.lbl.Image = value;
} }
} }
/// <summary>
/// 图片位置
/// </summary>
/// <value>The image align.</value>
[Description("图片位置"), Category("自定义")] [Description("图片位置"), Category("自定义")]
public virtual ContentAlignment ImageAlign public virtual ContentAlignment ImageAlign
{ {
get { return this.lbl.ImageAlign; } get { return this.lbl.ImageAlign; }
set { lbl.ImageAlign = value; } set { lbl.ImageAlign = value; }
} }
/// <summary>
/// 文字位置
/// </summary>
/// <value>The text align.</value>
[Description("文字位置"), Category("自定义")] [Description("文字位置"), Category("自定义")]
public virtual ContentAlignment TextAlign public virtual ContentAlignment TextAlign
{ {
...@@ -64,6 +87,9 @@ namespace HZH_Controls.Controls ...@@ -64,6 +87,9 @@ namespace HZH_Controls.Controls
set { lbl.TextAlign = value; } set { lbl.TextAlign = value; }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCBtnImg" /> class.
/// </summary>
public UCBtnImg() public UCBtnImg()
{ {
InitializeComponent(); InitializeComponent();
......
namespace HZH_Controls.Controls.Btn // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-27-2019
//
// ***********************************************************************
// <copyright file="UCDropDownBtn.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDropDownBtn.
/// Implements the <see cref="HZH_Controls.Controls.UCBtnImg" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCBtnImg" />
partial class UCDropDownBtn partial class UCDropDownBtn
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCDropDownBtn.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-27-2019
// 创建日期:2019-08-31 16:01:36 //
// 功能描述:UCDropDownBtn English:UCDropDownBtn // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCDropDownBtn.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -17,27 +24,56 @@ using System.Windows.Forms; ...@@ -17,27 +24,56 @@ using System.Windows.Forms;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
namespace HZH_Controls.Controls.Btn namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDropDownBtn.
/// Implements the <see cref="HZH_Controls.Controls.UCBtnImg" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCBtnImg" />
[DefaultEvent("BtnClick")] [DefaultEvent("BtnClick")]
public partial class UCDropDownBtn : UCBtnImg public partial class UCDropDownBtn : UCBtnImg
{ {
/// <summary>
/// The FRM anchor
/// </summary>
Forms.FrmAnchor _frmAnchor; Forms.FrmAnchor _frmAnchor;
/// <summary>
/// The drop panel height
/// </summary>
private int _dropPanelHeight = -1; private int _dropPanelHeight = -1;
/// <summary>
/// 按钮点击事件
/// </summary>
public new event EventHandler BtnClick; public new event EventHandler BtnClick;
/// <summary>
/// 下拉框高度
/// </summary>
/// <value>The height of the drop panel.</value>
[Description("下拉框高度"), Category("自定义")] [Description("下拉框高度"), Category("自定义")]
public int DropPanelHeight public int DropPanelHeight
{ {
get { return _dropPanelHeight; } get { return _dropPanelHeight; }
set { _dropPanelHeight = value; } set { _dropPanelHeight = value; }
} }
/// <summary>
/// The BTNS
/// </summary>
private string[] btns; private string[] btns;
[Description("按钮"), Category("自定义")] /// <summary>
/// 需要显示的按钮文字
/// </summary>
/// <value>The BTNS.</value>
[Description("需要显示的按钮文字"), Category("自定义")]
public string[] Btns public string[] Btns
{ {
get { return btns; } get { return btns; }
set { btns = value; } set { btns = value; }
} }
/// <summary>
/// 图片
/// </summary>
/// <value>The image.</value>
[Obsolete("不再可用的属性")] [Obsolete("不再可用的属性")]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override Image Image public override Image Image
...@@ -45,6 +81,10 @@ namespace HZH_Controls.Controls.Btn ...@@ -45,6 +81,10 @@ namespace HZH_Controls.Controls.Btn
get; get;
set; set;
} }
/// <summary>
/// 图片位置
/// </summary>
/// <value>The image align.</value>
[Obsolete("不再可用的属性")] [Obsolete("不再可用的属性")]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public override ContentAlignment ImageAlign public override ContentAlignment ImageAlign
...@@ -52,7 +92,11 @@ namespace HZH_Controls.Controls.Btn ...@@ -52,7 +92,11 @@ namespace HZH_Controls.Controls.Btn
get; get;
set; set;
} }
/// <summary>
/// 按钮字体颜色
/// </summary>
/// <value>The color of the BTN fore.</value>
[Description("按钮字体颜色"), Category("自定义")]
public override Color BtnForeColor public override Color BtnForeColor
{ {
get get
...@@ -79,6 +123,9 @@ namespace HZH_Controls.Controls.Btn ...@@ -79,6 +123,9 @@ namespace HZH_Controls.Controls.Btn
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCDropDownBtn" /> class.
/// </summary>
public UCDropDownBtn() public UCDropDownBtn()
{ {
InitializeComponent(); InitializeComponent();
...@@ -87,6 +134,11 @@ namespace HZH_Controls.Controls.Btn ...@@ -87,6 +134,11 @@ namespace HZH_Controls.Controls.Btn
base.BtnClick += UCDropDownBtn_BtnClick; base.BtnClick += UCDropDownBtn_BtnClick;
} }
/// <summary>
/// Handles the BtnClick event of the UCDropDownBtn 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 UCDropDownBtn_BtnClick(object sender, EventArgs e) void UCDropDownBtn_BtnClick(object sender, EventArgs e)
{ {
if (_frmAnchor == null || _frmAnchor.IsDisposed || _frmAnchor.Visible == false) if (_frmAnchor == null || _frmAnchor.IsDisposed || _frmAnchor.Visible == false)
...@@ -138,6 +190,11 @@ namespace HZH_Controls.Controls.Btn ...@@ -138,6 +190,11 @@ namespace HZH_Controls.Controls.Btn
_frmAnchor.Close(); _frmAnchor.Close();
} }
} }
/// <summary>
/// Handles the SelectSourceEvent event of the ucTime 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 ucTime_SelectSourceEvent(object sender, EventArgs e) void ucTime_SelectSourceEvent(object sender, EventArgs e)
{ {
if (_frmAnchor != null && !_frmAnchor.IsDisposed && _frmAnchor.Visible) if (_frmAnchor != null && !_frmAnchor.IsDisposed && _frmAnchor.Visible)
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-15-2019
//
// ***********************************************************************
// <copyright file="UCBtnsGroup.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnsGroup.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCBtnsGroup partial class UCBtnsGroup
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -53,6 +73,9 @@ ...@@ -53,6 +73,9 @@
#endregion #endregion
/// <summary>
/// The flow layout panel1
/// </summary>
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCBtnsGroup.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:58:13 // Created : 08-15-2019
// 功能描述:按钮组 //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCBtnsGroup.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,16 +24,27 @@ using System.Windows.Forms; ...@@ -14,16 +24,27 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCBtnsGroup.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCBtnsGroup : UserControl public partial class UCBtnsGroup : UserControl
{ {
/// <summary> /// <summary>
/// 选中改变事件 /// 选中改变事件
/// </summary> /// </summary>
[Description("选中改变事件"), Category("自定义")]
public event EventHandler SelectedItemChanged; public event EventHandler SelectedItemChanged;
/// <summary>
/// The m data source
/// </summary>
private Dictionary<string, string> m_dataSource = new Dictionary<string, string>(); private Dictionary<string, string> m_dataSource = new Dictionary<string, string>();
/// <summary> /// <summary>
/// 数据源 /// 数据源
/// </summary> /// </summary>
/// <value>The data source.</value>
[Description("数据源"), Category("自定义")]
public Dictionary<string, string> DataSource public Dictionary<string, string> DataSource
{ {
get { return m_dataSource; } get { return m_dataSource; }
...@@ -34,10 +55,15 @@ namespace HZH_Controls.Controls ...@@ -34,10 +55,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m select item
/// </summary>
private List<string> m_selectItem = new List<string>(); private List<string> m_selectItem = new List<string>();
/// <summary> /// <summary>
/// 选中项 /// 选中项
/// </summary> /// </summary>
/// <value>The select item.</value>
[Description("选中项"), Category("自定义")]
public List<string> SelectItem public List<string> SelectItem
{ {
get { return m_selectItem; } get { return m_selectItem; }
...@@ -50,20 +76,31 @@ namespace HZH_Controls.Controls ...@@ -50,20 +76,31 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m is multiple
/// </summary>
private bool m_isMultiple = false; private bool m_isMultiple = false;
/// <summary> /// <summary>
/// 是否多选 /// 是否多选
/// </summary> /// </summary>
/// <value><c>true</c> if this instance is multiple; otherwise, <c>false</c>.</value>
[Description("是否多选"), Category("自定义")]
public bool IsMultiple public bool IsMultiple
{ {
get { return m_isMultiple; } get { return m_isMultiple; }
set { m_isMultiple = value; } set { m_isMultiple = value; }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCBtnsGroup" /> class.
/// </summary>
public UCBtnsGroup() public UCBtnsGroup()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Reloads this instance.
/// </summary>
private void Reload() private void Reload()
{ {
try try
...@@ -106,6 +143,11 @@ namespace HZH_Controls.Controls ...@@ -106,6 +143,11 @@ namespace HZH_Controls.Controls
SetSelected(); SetSelected();
} }
/// <summary>
/// Handles the BtnClick event of the btn 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 btn_BtnClick(object sender, EventArgs e) void btn_BtnClick(object sender, EventArgs e)
{ {
var btn = sender as UCBtnExt; var btn = sender as UCBtnExt;
...@@ -136,6 +178,9 @@ namespace HZH_Controls.Controls ...@@ -136,6 +178,9 @@ namespace HZH_Controls.Controls
SelectedItemChanged(this, e); SelectedItemChanged(this, e);
} }
/// <summary>
/// Sets the selected.
/// </summary>
private void SetSelected() private void SetSelected()
{ {
if (m_selectItem != null && m_selectItem.Count > 0 && DataSource != null && DataSource.Count > 0) if (m_selectItem != null && m_selectItem.Count > 0 && DataSource != null && DataSource.Count > 0)
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCCheckBox.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCCheckBox.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCCheckBox partial class UCCheckBox
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -73,7 +93,13 @@ ...@@ -73,7 +93,13 @@
#endregion #endregion
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The label1
/// </summary>
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCCheckBox.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:58:34 // Created : 08-08-2019
// 功能描述:CheckBox //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCCheckBox.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,12 +24,29 @@ using System.Windows.Forms; ...@@ -14,12 +24,29 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCCheckBox.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
[DefaultEvent("CheckedChangeEvent")] [DefaultEvent("CheckedChangeEvent")]
public partial class UCCheckBox : UserControl public partial class UCCheckBox : UserControl
{ {
/// <summary>
/// 选中改变事件
/// </summary>
[Description("选中改变事件"), Category("自定义")] [Description("选中改变事件"), Category("自定义")]
public event EventHandler CheckedChangeEvent; public event EventHandler CheckedChangeEvent;
/// <summary>
/// 字体
/// </summary>
/// <value>The font.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("字体"), Category("自定义")] [Description("字体"), Category("自定义")]
public override Font Font public override Font Font
{ {
...@@ -34,7 +61,17 @@ namespace HZH_Controls.Controls ...@@ -34,7 +61,17 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The fore color
/// </summary>
private Color _ForeColor = Color.FromArgb(62, 62, 62); private Color _ForeColor = Color.FromArgb(62, 62, 62);
/// <summary>
/// 字体颜色
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("字体颜色"), Category("自定义")] [Description("字体颜色"), Category("自定义")]
public new Color ForeColor public new Color ForeColor
{ {
...@@ -45,7 +82,14 @@ namespace HZH_Controls.Controls ...@@ -45,7 +82,14 @@ namespace HZH_Controls.Controls
_ForeColor = value; _ForeColor = value;
} }
} }
/// <summary>
/// The text
/// </summary>
private string _Text = "复选框"; private string _Text = "复选框";
/// <summary>
/// 文本
/// </summary>
/// <value>The text value.</value>
[Description("文本"), Category("自定义")] [Description("文本"), Category("自定义")]
public string TextValue public string TextValue
{ {
...@@ -56,7 +100,14 @@ namespace HZH_Controls.Controls ...@@ -56,7 +100,14 @@ namespace HZH_Controls.Controls
_Text = value; _Text = value;
} }
} }
/// <summary>
/// The checked
/// </summary>
private bool _checked = false; private bool _checked = false;
/// <summary>
/// 是否选中
/// </summary>
/// <value><c>true</c> if checked; otherwise, <c>false</c>.</value>
[Description("是否选中"), Category("自定义")] [Description("是否选中"), Category("自定义")]
public bool Checked public bool Checked
{ {
...@@ -100,6 +151,16 @@ namespace HZH_Controls.Controls ...@@ -100,6 +151,16 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 获取或设置一个值,该值指示控件是否可以对用户交互作出响应。
/// </summary>
/// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
public new bool Enabled public new bool Enabled
{ {
get get
...@@ -133,11 +194,19 @@ namespace HZH_Controls.Controls ...@@ -133,11 +194,19 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCCheckBox" /> class.
/// </summary>
public UCCheckBox() public UCCheckBox()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Handles the MouseDown event of the CheckBox control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void CheckBox_MouseDown(object sender, MouseEventArgs e) private void CheckBox_MouseDown(object sender, MouseEventArgs e)
{ {
Checked = !Checked; Checked = !Checked;
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCCombox.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCCombox.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
partial class UCCombox partial class UCCombox
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -110,8 +130,17 @@ ...@@ -110,8 +130,17 @@
#endregion #endregion
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The text input
/// </summary>
public TextBoxEx txtInput; public TextBoxEx txtInput;
/// <summary>
/// The label input
/// </summary>
private System.Windows.Forms.Label lblInput; private System.Windows.Forms.Label lblInput;
} }
} }
namespace HZH_Controls.Controls.ComboBox // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-28-2019
//
// ***********************************************************************
// <copyright file="UCComboxGrid.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCComboxGrid.
/// Implements the <see cref="HZH_Controls.Controls.UCCombox" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCCombox" />
partial class UCComboxGrid partial class UCComboxGrid
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:uccomboxgrid.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-28-2019
// 创建日期:2019-08-31 16:01:55 //
// 功能描述:UCDropDownBtn English:UCDropDownBtn // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCComboxGrid.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -16,13 +23,24 @@ using System.Text; ...@@ -16,13 +23,24 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using HZH_Controls.Controls; using HZH_Controls.Controls;
namespace HZH_Controls.Controls.ComboBox namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCComboxGrid.
/// Implements the <see cref="HZH_Controls.Controls.UCCombox" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCCombox" />
public partial class UCComboxGrid : UCCombox public partial class UCComboxGrid : UCCombox
{ {
/// <summary>
/// The m row type
/// </summary>
private Type m_rowType = typeof(UCDataGridViewRow); private Type m_rowType = typeof(UCDataGridViewRow);
/// <summary>
/// 表格行类型
/// </summary>
/// <value>The type of the grid row.</value>
[Description("表格行类型"), Category("自定义")] [Description("表格行类型"), Category("自定义")]
public Type GridRowType public Type GridRowType
{ {
...@@ -32,10 +50,19 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -32,10 +50,19 @@ namespace HZH_Controls.Controls.ComboBox
m_rowType = value; m_rowType = value;
} }
} }
/// <summary>
/// The int width
/// </summary>
int intWidth = 0; int intWidth = 0;
/// <summary>
/// The m columns
/// </summary>
private List<DataGridViewColumnEntity> m_columns = null; private List<DataGridViewColumnEntity> m_columns = null;
/// <summary>
/// 表格列
/// </summary>
/// <value>The grid columns.</value>
[Description("表格列"), Category("自定义")] [Description("表格列"), Category("自定义")]
public List<DataGridViewColumnEntity> GridColumns public List<DataGridViewColumnEntity> GridColumns
{ {
...@@ -47,8 +74,14 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -47,8 +74,14 @@ namespace HZH_Controls.Controls.ComboBox
intWidth = value.Sum(p => p.WidthType == SizeType.Absolute ? p.Width : (p.Width < 80 ? 80 : p.Width)); intWidth = value.Sum(p => p.WidthType == SizeType.Absolute ? p.Width : (p.Width < 80 ? 80 : p.Width));
} }
} }
/// <summary>
/// The m data source
/// </summary>
private List<object> m_dataSource = null; private List<object> m_dataSource = null;
/// <summary>
/// 表格数据源
/// </summary>
/// <value>The grid data source.</value>
[Description("表格数据源"), Category("自定义")] [Description("表格数据源"), Category("自定义")]
public List<object> GridDataSource public List<object> GridDataSource
{ {
...@@ -56,8 +89,14 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -56,8 +89,14 @@ namespace HZH_Controls.Controls.ComboBox
set { m_dataSource = value; } set { m_dataSource = value; }
} }
/// <summary>
/// The m text field
/// </summary>
private string m_textField; private string m_textField;
/// <summary>
/// 显示值字段名称
/// </summary>
/// <value>The text field.</value>
[Description("显示值字段名称"), Category("自定义")] [Description("显示值字段名称"), Category("自定义")]
public string TextField public string TextField
{ {
...@@ -68,6 +107,10 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -68,6 +107,10 @@ namespace HZH_Controls.Controls.ComboBox
SetText(); SetText();
} }
} }
/// <summary>
/// 控件样式
/// </summary>
/// <value>The box style.</value>
[Obsolete("不再可用的属性")] [Obsolete("不再可用的属性")]
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] [Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
private new ComboBoxStyle BoxStyle private new ComboBoxStyle BoxStyle
...@@ -75,8 +118,14 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -75,8 +118,14 @@ namespace HZH_Controls.Controls.ComboBox
get; get;
set; set;
} }
/// <summary>
/// The select source
/// </summary>
private object selectSource = null; private object selectSource = null;
/// <summary>
/// 选中的数据源
/// </summary>
/// <value>The select source.</value>
[Description("选中的数据源"), Category("自定义")] [Description("选中的数据源"), Category("自定义")]
public object SelectSource public object SelectSource
{ {
...@@ -93,15 +142,31 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -93,15 +142,31 @@ namespace HZH_Controls.Controls.ComboBox
} }
/// <summary>
/// 选中数据源改变事件
/// </summary>
[Description("选中数据源改变事件"), Category("自定义")] [Description("选中数据源改变事件"), Category("自定义")]
public new event EventHandler SelectedChangedEvent; public new event EventHandler SelectedChangedEvent;
/// <summary>
/// Initializes a new instance of the <see cref="UCComboxGrid" /> class.
/// </summary>
public UCComboxGrid() public UCComboxGrid()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// The m uc panel
/// </summary>
UCComboxGridPanel m_ucPanel = null; UCComboxGridPanel m_ucPanel = null;
/// <summary>
/// The FRM anchor
/// </summary>
Forms.FrmAnchor _frmAnchor; Forms.FrmAnchor _frmAnchor;
/// <summary>
/// Handles the MouseDown event of the click control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
protected override void click_MouseDown(object sender, MouseEventArgs e) protected override void click_MouseDown(object sender, MouseEventArgs e)
{ {
if (m_columns == null || m_columns.Count <= 0) if (m_columns == null || m_columns.Count <= 0)
...@@ -135,12 +200,20 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -135,12 +200,20 @@ namespace HZH_Controls.Controls.ComboBox
} }
/// <summary>
/// Handles the ItemClick event of the m_ucPanel control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
void m_ucPanel_ItemClick(object sender, DataGridViewEventArgs e) void m_ucPanel_ItemClick(object sender, DataGridViewEventArgs e)
{ {
_frmAnchor.Hide(); _frmAnchor.Hide();
SelectSource = sender; SelectSource = sender;
} }
/// <summary>
/// Sets the text.
/// </summary>
private void SetText() private void SetText()
{ {
if (!string.IsNullOrEmpty(m_textField) && selectSource != null) if (!string.IsNullOrEmpty(m_textField) && selectSource != null)
......
namespace HZH_Controls.Controls.ComboBox // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-28-2019
//
// ***********************************************************************
// <copyright file="UCComboxGridPanel.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCComboxGridPanel.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCComboxGridPanel partial class UCComboxGridPanel
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -210,15 +230,45 @@ ...@@ -210,15 +230,45 @@
#endregion #endregion
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The uc split line h2
/// </summary>
private UCSplitLine_H ucSplitLine_H2; private UCSplitLine_H ucSplitLine_H2;
/// <summary>
/// The uc split line v1
/// </summary>
private UCSplitLine_V ucSplitLine_V1; private UCSplitLine_V ucSplitLine_V1;
/// <summary>
/// The uc split line v2
/// </summary>
private UCSplitLine_V ucSplitLine_V2; private UCSplitLine_V ucSplitLine_V2;
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The uc control base1
/// </summary>
private UCControlBase ucControlBase1; private UCControlBase ucControlBase1;
/// <summary>
/// The uc data grid view1
/// </summary>
private UCDataGridView ucDataGridView1; private UCDataGridView ucDataGridView1;
/// <summary>
/// The panel2
/// </summary>
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
/// <summary>
/// The timer1
/// </summary>
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
/// <summary>
/// The text search
/// </summary>
private UCTextBoxEx txtSearch; private UCTextBoxEx txtSearch;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCComboxGridPanel.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-28-2019
// 创建日期:2019-08-31 16:02:08 //
// 功能描述:UCComboxGridPanel English:UCComboxGridPanel // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCComboxGridPanel.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -15,15 +22,30 @@ using System.Linq; ...@@ -15,15 +22,30 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace HZH_Controls.Controls.ComboBox namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCComboxGridPanel.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UCComboxGridPanel : UserControl public partial class UCComboxGridPanel : UserControl
{ {
/// <summary>
/// 项点击事件
/// </summary>
[Description("项点击事件"), Category("自定义")] [Description("项点击事件"), Category("自定义")]
public event DataGridViewEventHandler ItemClick; public event DataGridViewEventHandler ItemClick;
/// <summary>
/// The m row type
/// </summary>
private Type m_rowType = typeof(UCDataGridViewRow); private Type m_rowType = typeof(UCDataGridViewRow);
/// <summary>
/// 行类型
/// </summary>
/// <value>The type of the row.</value>
[Description("行类型"), Category("自定义")]
public Type RowType public Type RowType
{ {
get { return m_rowType; } get { return m_rowType; }
...@@ -34,8 +56,15 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -34,8 +56,15 @@ namespace HZH_Controls.Controls.ComboBox
} }
} }
/// <summary>
/// The m columns
/// </summary>
private List<DataGridViewColumnEntity> m_columns = null; private List<DataGridViewColumnEntity> m_columns = null;
/// <summary>
/// 列
/// </summary>
/// <value>The columns.</value>
[Description("列"), Category("自定义")]
public List<DataGridViewColumnEntity> Columns public List<DataGridViewColumnEntity> Columns
{ {
get { return m_columns; } get { return m_columns; }
...@@ -45,17 +74,33 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -45,17 +74,33 @@ namespace HZH_Controls.Controls.ComboBox
this.ucDataGridView1.Columns = value; this.ucDataGridView1.Columns = value;
} }
} }
/// <summary>
/// The m data source
/// </summary>
private List<object> m_dataSource = null; private List<object> m_dataSource = null;
/// <summary>
/// 数据源
/// </summary>
/// <value>The data source.</value>
[Description("数据源"), Category("自定义")]
public List<object> DataSource public List<object> DataSource
{ {
get { return m_dataSource; } get { return m_dataSource; }
set { m_dataSource = value; } set { m_dataSource = value; }
} }
/// <summary>
/// The string last search text
/// </summary>
private string strLastSearchText = string.Empty; private string strLastSearchText = string.Empty;
/// <summary>
/// The m page
/// </summary>
UCPagerControl m_page = new UCPagerControl(); UCPagerControl m_page = new UCPagerControl();
/// <summary>
/// Initializes a new instance of the <see cref="UCComboxGridPanel" /> class.
/// </summary>
public UCComboxGridPanel() public UCComboxGridPanel()
{ {
InitializeComponent(); InitializeComponent();
...@@ -65,6 +110,11 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -65,6 +110,11 @@ namespace HZH_Controls.Controls.ComboBox
this.ucDataGridView1.ItemClick += ucDataGridView1_ItemClick; this.ucDataGridView1.ItemClick += ucDataGridView1_ItemClick;
} }
/// <summary>
/// Handles the ItemClick event of the ucDataGridView1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
void ucDataGridView1_ItemClick(object sender, DataGridViewEventArgs e) void ucDataGridView1_ItemClick(object sender, DataGridViewEventArgs e)
{ {
if (ItemClick != null) if (ItemClick != null)
...@@ -73,18 +123,33 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -73,18 +123,33 @@ namespace HZH_Controls.Controls.ComboBox
} }
} }
/// <summary>
/// Handles the TextChanged event of the txtInput 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 txtInput_TextChanged(object sender, EventArgs e) void txtInput_TextChanged(object sender, EventArgs e)
{ {
timer1.Enabled = false; timer1.Enabled = false;
timer1.Enabled = true; timer1.Enabled = true;
} }
/// <summary>
/// Handles the Load event of the UCComboxGridPanel control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void UCComboxGridPanel_Load(object sender, EventArgs e) private void UCComboxGridPanel_Load(object sender, EventArgs e)
{ {
m_page.DataSource = m_dataSource; m_page.DataSource = m_dataSource;
this.ucDataGridView1.DataSource = m_page.GetCurrentSource(); this.ucDataGridView1.DataSource = m_page.GetCurrentSource();
} }
/// <summary>
/// Handles the Tick event of the timer1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
{ {
if (strLastSearchText == txtSearch.InputText) if (strLastSearchText == txtSearch.InputText)
...@@ -98,6 +163,10 @@ namespace HZH_Controls.Controls.ComboBox ...@@ -98,6 +163,10 @@ namespace HZH_Controls.Controls.ComboBox
} }
} }
/// <summary>
/// Searches the specified string text.
/// </summary>
/// <param name="strText">The string text.</param>
private void Search(string strText) private void Search(string strText)
{ {
m_page.StartIndex = 0; m_page.StartIndex = 0;
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DataGridViewCellEntity.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:03 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="DataGridViewCellEntity.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -10,10 +20,25 @@ using System.Text; ...@@ -10,10 +20,25 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class DataGridViewCellEntity.
/// </summary>
public class DataGridViewCellEntity public class DataGridViewCellEntity
{ {
/// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
public string Title { get; set; } public string Title { get; set; }
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>The width.</value>
public int Width { get; set; } public int Width { get; set; }
/// <summary>
/// Gets or sets the type of the width.
/// </summary>
/// <value>The type of the width.</value>
public System.Windows.Forms.SizeType WidthType { get; set; } public System.Windows.Forms.SizeType WidthType { get; set; }
} }
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DataGridViewCellEventArgs.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:10 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="DataGridViewCellEventArgs.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -11,10 +21,27 @@ using System.Windows.Forms; ...@@ -11,10 +21,27 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class DataGridViewEventArgs.
/// Implements the <see cref="System.EventArgs" />
/// </summary>
/// <seealso cref="System.EventArgs" />
public class DataGridViewEventArgs : EventArgs public class DataGridViewEventArgs : EventArgs
{ {
/// <summary>
/// Gets or sets the cell control.
/// </summary>
/// <value>The cell control.</value>
public Control CellControl { get; set; } public Control CellControl { get; set; }
/// <summary>
/// Gets or sets the index of the cell.
/// </summary>
/// <value>The index of the cell.</value>
public int CellIndex { get; set; } public int CellIndex { get; set; }
/// <summary>
/// Gets or sets the index of the row.
/// </summary>
/// <value>The index of the row.</value>
public int RowIndex { get; set; } public int RowIndex { get; set; }
} }
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DataGridViewCellEventHandler.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:13 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="DataGridViewCellEventHandler.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -11,10 +21,20 @@ using System.Text; ...@@ -11,10 +21,20 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Delegate DataGridViewEventHandler
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
[Serializable] [Serializable]
[ComVisible(true)] [ComVisible(true)]
public delegate void DataGridViewEventHandler(object sender, DataGridViewEventArgs e); public delegate void DataGridViewEventHandler(object sender, DataGridViewEventArgs e);
/// <summary>
/// Delegate DataGridViewRowCustomEventHandler
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="DataGridViewRowCustomEventArgs" /> instance containing the event data.</param>
[Serializable] [Serializable]
[ComVisible(true)] [ComVisible(true)]
public delegate void DataGridViewRowCustomEventHandler(object sender, DataGridViewRowCustomEventArgs e); public delegate void DataGridViewRowCustomEventHandler(object sender, DataGridViewRowCustomEventArgs e);
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DataGridViewColumnEntity.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:17 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="DataGridViewColumnEntity.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -11,14 +21,44 @@ using System.Drawing; ...@@ -11,14 +21,44 @@ using System.Drawing;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class DataGridViewColumnEntity.
/// </summary>
public class DataGridViewColumnEntity public class DataGridViewColumnEntity
{ {
/// <summary>
/// Gets or sets the head text.
/// </summary>
/// <value>The head text.</value>
public string HeadText { get; set; } public string HeadText { get; set; }
/// <summary>
/// Gets or sets the width.
/// </summary>
/// <value>The width.</value>
public int Width { get; set; } public int Width { get; set; }
/// <summary>
/// Gets or sets the type of the width.
/// </summary>
/// <value>The type of the width.</value>
public System.Windows.Forms.SizeType WidthType { get; set; } public System.Windows.Forms.SizeType WidthType { get; set; }
/// <summary>
/// Gets or sets the data field.
/// </summary>
/// <value>The data field.</value>
public string DataField { get; set; } public string DataField { get; set; }
/// <summary>
/// Gets or sets the format.
/// </summary>
/// <value>The format.</value>
public Func<object, string> Format { get; set; } public Func<object, string> Format { get; set; }
/// <summary>
/// The text align
/// </summary>
private ContentAlignment _TextAlign = ContentAlignment.MiddleCenter; private ContentAlignment _TextAlign = ContentAlignment.MiddleCenter;
/// <summary>
/// Gets or sets the text align.
/// </summary>
/// <value>The text align.</value>
public ContentAlignment TextAlign { get { return _TextAlign; } set { _TextAlign = value; } } public ContentAlignment TextAlign { get { return _TextAlign; } set { _TextAlign = value; } }
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DataGridViewRowCustomEventArgs.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-27-2019
// 创建日期:2019-08-31 16:02:31 //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // <copyright file="DataGridViewRowCustomEventArgs.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -12,8 +20,17 @@ using System.Text; ...@@ -12,8 +20,17 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class DataGridViewRowCustomEventArgs.
/// Implements the <see cref="System.EventArgs" />
/// </summary>
/// <seealso cref="System.EventArgs" />
public class DataGridViewRowCustomEventArgs : EventArgs public class DataGridViewRowCustomEventArgs : EventArgs
{ {
/// <summary>
/// Gets or sets the name of the event.
/// </summary>
/// <value>The name of the event.</value>
public string EventName { get; set; } public string EventName { get; set; }
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:IDataGridViewRow.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:21 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="IDataGridViewRow.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -11,8 +21,14 @@ using System.Windows.Forms; ...@@ -11,8 +21,14 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Interface IDataGridViewRow
/// </summary>
public interface IDataGridViewRow public interface IDataGridViewRow
{ {
/// <summary>
/// Occurs when [row custom event].
/// </summary>
event DataGridViewRowCustomEventHandler RowCustomEvent; event DataGridViewRowCustomEventHandler RowCustomEvent;
/// <summary> /// <summary>
/// CheckBox选中事件 /// CheckBox选中事件
...@@ -29,16 +45,23 @@ namespace HZH_Controls.Controls ...@@ -29,16 +45,23 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 列参数,用于创建列数和宽度 /// 列参数,用于创建列数和宽度
/// </summary> /// </summary>
/// <value>The columns.</value>
List<DataGridViewColumnEntity> Columns { get; set; } List<DataGridViewColumnEntity> Columns { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is show CheckBox.
/// </summary>
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
bool IsShowCheckBox { get; set; } bool IsShowCheckBox { get; set; }
/// <summary> /// <summary>
/// 是否选中 /// 是否选中
/// </summary> /// </summary>
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
bool IsChecked { get; set; } bool IsChecked { get; set; }
/// <summary> /// <summary>
/// 数据源 /// 数据源
/// </summary> /// </summary>
/// <value>The data source.</value>
object DataSource { get; set; } object DataSource { get; set; }
/// <summary> /// <summary>
/// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells /// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells
...@@ -47,7 +70,6 @@ namespace HZH_Controls.Controls ...@@ -47,7 +70,6 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 绑定数据到Cell /// 绑定数据到Cell
/// </summary> /// </summary>
/// <param name="intIndex">cell下标</param>
/// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns> /// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns>
void BindingCellData(); void BindingCellData();
/// <summary> /// <summary>
...@@ -58,6 +80,7 @@ namespace HZH_Controls.Controls ...@@ -58,6 +80,7 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 行高 /// 行高
/// </summary> /// </summary>
/// <value>The height of the row.</value>
int RowHeight { get; set; } int RowHeight { get; set; }
} }
} }
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-09-2019
//
// ***********************************************************************
// <copyright file="UCDataGridView.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDataGridView.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCDataGridView partial class UCDataGridView
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -114,11 +134,29 @@ ...@@ -114,11 +134,29 @@
#endregion #endregion
/// <summary>
/// The pan head
/// </summary>
private System.Windows.Forms.Panel panHead; private System.Windows.Forms.Panel panHead;
/// <summary>
/// The pan columns
/// </summary>
private System.Windows.Forms.TableLayoutPanel panColumns; private System.Windows.Forms.TableLayoutPanel panColumns;
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The pan row
/// </summary>
private System.Windows.Forms.Panel panRow; private System.Windows.Forms.Panel panRow;
/// <summary>
/// The pan page
/// </summary>
private System.Windows.Forms.Panel panPage; private System.Windows.Forms.Panel panPage;
/// <summary>
/// The pan head left
/// </summary>
private System.Windows.Forms.Panel panHeadLeft; private System.Windows.Forms.Panel panHeadLeft;
} }
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-09-2019
//
// ***********************************************************************
// <copyright file="UCDataGridViewRow.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDataGridViewRow.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCDataGridViewRow partial class UCDataGridViewRow
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -70,7 +90,13 @@ ...@@ -70,7 +90,13 @@
#endregion #endregion
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The pan cells
/// </summary>
private System.Windows.Forms.TableLayoutPanel panCells; private System.Windows.Forms.TableLayoutPanel panCells;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCDataGridViewRow.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:31 // Created : 08-09-2019
// 功能描述:DataGridView //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCDataGridViewRow.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,35 +24,73 @@ using System.Windows.Forms; ...@@ -14,35 +24,73 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDataGridViewRow.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// Implements the <see cref="HZH_Controls.Controls.IDataGridViewRow" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
/// <seealso cref="HZH_Controls.Controls.IDataGridViewRow" />
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UCDataGridViewRow : UserControl, IDataGridViewRow public partial class UCDataGridViewRow : UserControl, IDataGridViewRow
{ {
#region 属性 #region 属性
/// <summary>
/// CheckBox选中事件
/// </summary>
public event DataGridViewEventHandler CheckBoxChangeEvent; public event DataGridViewEventHandler CheckBoxChangeEvent;
/// <summary>
/// Occurs when [row custom event].
/// </summary>
public event DataGridViewRowCustomEventHandler RowCustomEvent; public event DataGridViewRowCustomEventHandler RowCustomEvent;
/// <summary>
/// 点击单元格事件
/// </summary>
public event DataGridViewEventHandler CellClick; public event DataGridViewEventHandler CellClick;
/// <summary>
/// 数据源改变事件
/// </summary>
public event DataGridViewEventHandler SourceChanged; public event DataGridViewEventHandler SourceChanged;
/// <summary>
/// 列参数,用于创建列数和宽度
/// </summary>
/// <value>The columns.</value>
public List<DataGridViewColumnEntity> Columns public List<DataGridViewColumnEntity> Columns
{ {
get; get;
set; set;
} }
/// <summary>
/// 数据源
/// </summary>
/// <value>The data source.</value>
public object DataSource public object DataSource
{ {
get; get;
set; set;
} }
/// <summary>
/// Gets or sets a value indicating whether this instance is show CheckBox.
/// </summary>
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
public bool IsShowCheckBox public bool IsShowCheckBox
{ {
get; get;
set; set;
} }
/// <summary>
/// The m is checked
/// </summary>
private bool m_isChecked; private bool m_isChecked;
/// <summary>
/// 是否选中
/// </summary>
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
public bool IsChecked public bool IsChecked
{ {
get get
...@@ -59,7 +107,14 @@ namespace HZH_Controls.Controls ...@@ -59,7 +107,14 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// The m row height
/// </summary>
int m_rowHeight = 40; int m_rowHeight = 40;
/// <summary>
/// 行高
/// </summary>
/// <value>The height of the row.</value>
public int RowHeight public int RowHeight
{ {
get get
...@@ -75,11 +130,18 @@ namespace HZH_Controls.Controls ...@@ -75,11 +130,18 @@ namespace HZH_Controls.Controls
#endregion #endregion
/// <summary>
/// Initializes a new instance of the <see cref="UCDataGridViewRow" /> class.
/// </summary>
public UCDataGridViewRow() public UCDataGridViewRow()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// 绑定数据到Cell
/// </summary>
/// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns>
public void BindingCellData() public void BindingCellData()
{ {
for (int i = 0; i < Columns.Count; i++) for (int i = 0; i < Columns.Count; i++)
...@@ -105,6 +167,11 @@ namespace HZH_Controls.Controls ...@@ -105,6 +167,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the MouseDown event of the Item control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
void Item_MouseDown(object sender, MouseEventArgs e) void Item_MouseDown(object sender, MouseEventArgs e)
{ {
if (CellClick != null) if (CellClick != null)
...@@ -117,6 +184,10 @@ namespace HZH_Controls.Controls ...@@ -117,6 +184,10 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 设置选中状态,通常为设置颜色即可
/// </summary>
/// <param name="blnSelected">是否选中</param>
public void SetSelect(bool blnSelected) public void SetSelect(bool blnSelected)
{ {
if (blnSelected) if (blnSelected)
...@@ -129,6 +200,9 @@ namespace HZH_Controls.Controls ...@@ -129,6 +200,9 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Reloads the cells.
/// </summary>
public void ReloadCells() public void ReloadCells()
{ {
try try
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-23-2019
//
// ***********************************************************************
// <copyright file="UCDataGridViewTreeRow.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDataGridViewTreeRow.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCDataGridViewTreeRow partial class UCDataGridViewTreeRow
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -155,13 +175,37 @@ ...@@ -155,13 +175,37 @@
#endregion #endregion
/// <summary>
/// The pan cells
/// </summary>
private System.Windows.Forms.TableLayoutPanel panCells; private System.Windows.Forms.TableLayoutPanel panCells;
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The pan left
/// </summary>
private System.Windows.Forms.Panel panLeft; private System.Windows.Forms.Panel panLeft;
/// <summary>
/// The pan child grid
/// </summary>
private System.Windows.Forms.Panel panChildGrid; private System.Windows.Forms.Panel panChildGrid;
/// <summary>
/// The uc DGV child
/// </summary>
private UCDataGridView ucDGVChild; private UCDataGridView ucDGVChild;
/// <summary>
/// The pan child left
/// </summary>
private System.Windows.Forms.Panel panChildLeft; private System.Windows.Forms.Panel panChildLeft;
/// <summary>
/// The pan main
/// </summary>
private System.Windows.Forms.Panel panMain; private System.Windows.Forms.Panel panMain;
/// <summary>
/// The uc split line v1
/// </summary>
private UCSplitLine_V ucSplitLine_V1; private UCSplitLine_V ucSplitLine_V1;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCDataGridViewTreeRow.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-23-2019
// 创建日期:2019-08-31 16:02:55 //
// 功能描述:UCDataGridViewTreeRow English:UCDataGridViewTreeRow // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCDataGridViewTreeRow.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -18,34 +25,72 @@ using System.Collections; ...@@ -18,34 +25,72 @@ using System.Collections;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDataGridViewTreeRow.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// Implements the <see cref="HZH_Controls.Controls.IDataGridViewRow" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
/// <seealso cref="HZH_Controls.Controls.IDataGridViewRow" />
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UCDataGridViewTreeRow : UserControl, IDataGridViewRow public partial class UCDataGridViewTreeRow : UserControl, IDataGridViewRow
{ {
#region 属性 #region 属性
/// <summary>
/// CheckBox选中事件
/// </summary>
public event DataGridViewEventHandler CheckBoxChangeEvent; public event DataGridViewEventHandler CheckBoxChangeEvent;
/// <summary>
/// 点击单元格事件
/// </summary>
public event DataGridViewEventHandler CellClick; public event DataGridViewEventHandler CellClick;
/// <summary>
/// 数据源改变事件
/// </summary>
public event DataGridViewEventHandler SourceChanged; public event DataGridViewEventHandler SourceChanged;
/// <summary>
/// Occurs when [row custom event].
/// </summary>
public event DataGridViewRowCustomEventHandler RowCustomEvent; public event DataGridViewRowCustomEventHandler RowCustomEvent;
/// <summary>
/// 列参数,用于创建列数和宽度
/// </summary>
/// <value>The columns.</value>
public List<DataGridViewColumnEntity> Columns public List<DataGridViewColumnEntity> Columns
{ {
get; get;
set; set;
} }
/// <summary>
/// 数据源
/// </summary>
/// <value>The data source.</value>
public object DataSource public object DataSource
{ {
get; get;
set; set;
} }
/// <summary>
/// Gets or sets a value indicating whether this instance is show CheckBox.
/// </summary>
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
public bool IsShowCheckBox public bool IsShowCheckBox
{ {
get; get;
set; set;
} }
/// <summary>
/// The m is checked
/// </summary>
private bool m_isChecked; private bool m_isChecked;
/// <summary>
/// 是否选中
/// </summary>
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
public bool IsChecked public bool IsChecked
{ {
get get
...@@ -63,7 +108,14 @@ namespace HZH_Controls.Controls ...@@ -63,7 +108,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m row height
/// </summary>
int m_rowHeight = 40; int m_rowHeight = 40;
/// <summary>
/// 行高
/// </summary>
/// <value>The height of the row.</value>
public int RowHeight public int RowHeight
{ {
get get
...@@ -78,6 +130,9 @@ namespace HZH_Controls.Controls ...@@ -78,6 +130,9 @@ namespace HZH_Controls.Controls
} }
#endregion #endregion
/// <summary>
/// Initializes a new instance of the <see cref="UCDataGridViewTreeRow" /> class.
/// </summary>
public UCDataGridViewTreeRow() public UCDataGridViewTreeRow()
{ {
InitializeComponent(); InitializeComponent();
...@@ -98,6 +153,11 @@ namespace HZH_Controls.Controls ...@@ -98,6 +153,11 @@ namespace HZH_Controls.Controls
} }
/// <summary>
/// Handles the SizeChanged event of the UCDataGridViewTreeRow 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 UCDataGridViewTreeRow_SizeChanged(object sender, EventArgs e) void UCDataGridViewTreeRow_SizeChanged(object sender, EventArgs e)
{ {
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)
...@@ -109,6 +169,10 @@ namespace HZH_Controls.Controls ...@@ -109,6 +169,10 @@ namespace HZH_Controls.Controls
} }
/// <summary>
/// 绑定数据到Cell
/// </summary>
/// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns>
public void BindingCellData() public void BindingCellData()
{ {
for (int i = 0; i < Columns.Count; i++) for (int i = 0; i < Columns.Count; i++)
...@@ -176,6 +240,11 @@ namespace HZH_Controls.Controls ...@@ -176,6 +240,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the MouseDown event of the Item control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
void Item_MouseDown(object sender, MouseEventArgs e) void Item_MouseDown(object sender, MouseEventArgs e)
{ {
if (CellClick != null) if (CellClick != null)
...@@ -188,6 +257,10 @@ namespace HZH_Controls.Controls ...@@ -188,6 +257,10 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 设置选中状态,通常为设置颜色即可
/// </summary>
/// <param name="blnSelected">是否选中</param>
public void SetSelect(bool blnSelected) public void SetSelect(bool blnSelected)
{ {
if (blnSelected) if (blnSelected)
...@@ -200,6 +273,9 @@ namespace HZH_Controls.Controls ...@@ -200,6 +273,9 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells
/// </summary>
public void ReloadCells() public void ReloadCells()
{ {
try try
...@@ -273,6 +349,11 @@ namespace HZH_Controls.Controls ...@@ -273,6 +349,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the SizeChanged event of the panChildGrid control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void panChildGrid_SizeChanged(object sender, EventArgs e) private void panChildGrid_SizeChanged(object sender, EventArgs e)
{ {
int intHeight = RowHeight + panChildGrid.Height; int intHeight = RowHeight + panChildGrid.Height;
...@@ -282,6 +363,11 @@ namespace HZH_Controls.Controls ...@@ -282,6 +363,11 @@ namespace HZH_Controls.Controls
this.Height = intHeight; this.Height = intHeight;
} }
/// <summary>
/// Handles the MouseDown event of the panLeft control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void panLeft_MouseDown(object sender, MouseEventArgs e) private void panLeft_MouseDown(object sender, MouseEventArgs e)
{ {
try try
...@@ -332,6 +418,11 @@ namespace HZH_Controls.Controls ...@@ -332,6 +418,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the SizeChanged event of the ucDGVChild control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void ucDGVChild_SizeChanged(object sender, EventArgs e) private void ucDGVChild_SizeChanged(object sender, EventArgs e)
{ {
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:DateTimePickerType.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:40 // Created : 08-08-2019
// 功能描述:DateTime //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="DateTimePickerType.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -10,10 +20,22 @@ using System.Text; ...@@ -10,10 +20,22 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Enum DateTimePickerType
/// </summary>
public enum DateTimePickerType public enum DateTimePickerType
{ {
/// <summary>
/// The date time
/// </summary>
DateTime = 1, DateTime = 1,
/// <summary>
/// The date
/// </summary>
Date = 2, Date = 2,
/// <summary>
/// The time
/// </summary>
Time = 4 Time = 4
} }
} }
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCDatePickerExt.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDatePickerExt.
/// Implements the <see cref="HZH_Controls.Controls.UCControlBase" />
/// </summary>
/// <seealso cref="HZH_Controls.Controls.UCControlBase" />
partial class UCDatePickerExt partial class UCDatePickerExt
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -316,16 +336,49 @@ ...@@ -316,16 +336,49 @@
#endregion #endregion
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The label4
/// </summary>
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
/// <summary>
/// The label3
/// </summary>
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
/// <summary>
/// The label2
/// </summary>
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
/// <summary>
/// The label1
/// </summary>
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
/// <summary>
/// The text minute
/// </summary>
private TextBoxEx txtMinute; private TextBoxEx txtMinute;
/// <summary>
/// The text hour
/// </summary>
private TextBoxEx txtHour; private TextBoxEx txtHour;
/// <summary>
/// The text day
/// </summary>
private TextBoxEx txtDay; private TextBoxEx txtDay;
/// <summary>
/// The text month
/// </summary>
private TextBoxEx txtMonth; private TextBoxEx txtMonth;
/// <summary>
/// The text year
/// </summary>
private TextBoxEx txtYear; private TextBoxEx txtYear;
/// <summary>
/// The label5
/// </summary>
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
} }
} }
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCDateTimeSelectPan.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDateTimeSelectPan.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCDateTimeSelectPan public partial class UCDateTimeSelectPan
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -399,25 +419,85 @@ ...@@ -399,25 +419,85 @@
#endregion #endregion
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The panel2
/// </summary>
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
/// <summary>
/// The uc split line h2
/// </summary>
private UCSplitLine_H ucSplitLine_H2; private UCSplitLine_H ucSplitLine_H2;
/// <summary>
/// The pan mian
/// </summary>
private System.Windows.Forms.Panel panMian; private System.Windows.Forms.Panel panMian;
/// <summary>
/// The BTN minute
/// </summary>
private UCBtnExt btnMinute; private UCBtnExt btnMinute;
/// <summary>
/// The BTN day
/// </summary>
private UCBtnExt btnDay; private UCBtnExt btnDay;
/// <summary>
/// The BTN hour
/// </summary>
private UCBtnExt btnHour; private UCBtnExt btnHour;
/// <summary>
/// The BTN month
/// </summary>
private UCBtnExt btnMonth; private UCBtnExt btnMonth;
/// <summary>
/// The BTN year
/// </summary>
private UCBtnExt btnYear; private UCBtnExt btnYear;
/// <summary>
/// The pan time
/// </summary>
private UCTimePanel panTime; private UCTimePanel panTime;
/// <summary>
/// The BTN cancel
/// </summary>
private UCBtnExt btnCancel; private UCBtnExt btnCancel;
/// <summary>
/// The BTN ok
/// </summary>
private UCBtnExt btnOk; private UCBtnExt btnOk;
/// <summary>
/// The pan right
/// </summary>
private System.Windows.Forms.Panel panRight; private System.Windows.Forms.Panel panRight;
/// <summary>
/// The pan left
/// </summary>
private System.Windows.Forms.Panel panLeft; private System.Windows.Forms.Panel panLeft;
/// <summary>
/// The SP4
/// </summary>
private System.Windows.Forms.Panel sp4; private System.Windows.Forms.Panel sp4;
/// <summary>
/// The SP3
/// </summary>
private System.Windows.Forms.Panel sp3; private System.Windows.Forms.Panel sp3;
/// <summary>
/// The SP2
/// </summary>
private System.Windows.Forms.Panel sp2; private System.Windows.Forms.Panel sp2;
/// <summary>
/// The SP1
/// </summary>
private System.Windows.Forms.Panel sp1; private System.Windows.Forms.Panel sp1;
/// <summary>
/// The panel3
/// </summary>
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel3;
} }
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCDateTimeSelectPan.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:51 // Created : 08-08-2019
// 功能描述:DateTime //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCDateTimeSelectPan.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -15,14 +25,32 @@ using System.Windows.Forms; ...@@ -15,14 +25,32 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCDateTimeSelectPan.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UCDateTimeSelectPan : UserControl public partial class UCDateTimeSelectPan : UserControl
{ {
/// <summary>
/// Occurs when [selected time event].
/// </summary>
[Description("确定事件"), Category("自定义")] [Description("确定事件"), Category("自定义")]
public event EventHandler SelectedTimeEvent; public event EventHandler SelectedTimeEvent;
/// <summary>
/// Occurs when [cancel time event].
/// </summary>
[Description("取消事件"), Category("自定义")] [Description("取消事件"), Category("自定义")]
public event EventHandler CancelTimeEvent; public event EventHandler CancelTimeEvent;
/// <summary>
/// The automatic select next
/// </summary>
private bool autoSelectNext = true; private bool autoSelectNext = true;
/// <summary>
/// Gets or sets a value indicating whether [automatic select next].
/// </summary>
/// <value><c>true</c> if [automatic select next]; otherwise, <c>false</c>.</value>
[Description("自动选中下一级"), Category("自定义")] [Description("自动选中下一级"), Category("自定义")]
public bool AutoSelectNext public bool AutoSelectNext
{ {
...@@ -30,8 +58,15 @@ namespace HZH_Controls.Controls ...@@ -30,8 +58,15 @@ namespace HZH_Controls.Controls
set { autoSelectNext = value; } set { autoSelectNext = value; }
} }
/// <summary>
/// The m dt
/// </summary>
DateTime m_dt = DateTime.Now; DateTime m_dt = DateTime.Now;
/// <summary>
/// Gets or sets the current time.
/// </summary>
/// <value>The current time.</value>
public DateTime CurrentTime public DateTime CurrentTime
{ {
get { return m_dt; } get { return m_dt; }
...@@ -41,21 +76,38 @@ namespace HZH_Controls.Controls ...@@ -41,21 +76,38 @@ namespace HZH_Controls.Controls
SetTimeToControl(); SetTimeToControl();
} }
} }
/// <summary>
/// The m this BTN
/// </summary>
UCBtnExt m_thisBtn = null; UCBtnExt m_thisBtn = null;
/// <summary>
/// The m type
/// </summary>
DateTimePickerType m_type = DateTimePickerType.DateTime; DateTimePickerType m_type = DateTimePickerType.DateTime;
/// <summary>
/// Gets or sets the type of the time.
/// </summary>
/// <value>The type of the time.</value>
[Description("时间类型"), Category("自定义")] [Description("时间类型"), Category("自定义")]
public DateTimePickerType TimeType public DateTimePickerType TimeType
{ {
get { return m_type; } get { return m_type; }
set { m_type = value; } set { m_type = value; }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCDateTimeSelectPan" /> class.
/// </summary>
public UCDateTimeSelectPan() public UCDateTimeSelectPan()
{ {
InitializeComponent(); InitializeComponent();
panTime.SelectSourceEvent += panTime_SelectSourceEvent; panTime.SelectSourceEvent += panTime_SelectSourceEvent;
this.TabStop = false; this.TabStop = false;
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCDateTimeSelectPan" /> class.
/// </summary>
/// <param name="dt">The dt.</param>
public UCDateTimeSelectPan(DateTime dt) public UCDateTimeSelectPan(DateTime dt)
{ {
m_dt = dt; m_dt = dt;
...@@ -64,6 +116,11 @@ namespace HZH_Controls.Controls ...@@ -64,6 +116,11 @@ namespace HZH_Controls.Controls
this.TabStop = false; this.TabStop = false;
} }
/// <summary>
/// Handles the SelectSourceEvent event of the panTime 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 panTime_SelectSourceEvent(object sender, EventArgs e) void panTime_SelectSourceEvent(object sender, EventArgs e)
{ {
string strKey = sender.ToString(); string strKey = sender.ToString();
...@@ -113,6 +170,11 @@ namespace HZH_Controls.Controls ...@@ -113,6 +170,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the Load event of the UCDateTimePickerExt control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void UCDateTimePickerExt_Load(object sender, EventArgs e) private void UCDateTimePickerExt_Load(object sender, EventArgs e)
{ {
SetTimeToControl(); SetTimeToControl();
...@@ -141,6 +203,9 @@ namespace HZH_Controls.Controls ...@@ -141,6 +203,9 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Sets the time to control.
/// </summary>
private void SetTimeToControl() private void SetTimeToControl()
{ {
btnYear.Tag = m_dt.Year; btnYear.Tag = m_dt.Year;
...@@ -155,6 +220,10 @@ namespace HZH_Controls.Controls ...@@ -155,6 +220,10 @@ namespace HZH_Controls.Controls
btnMinute.BtnText = m_dt.Minute.ToString().PadLeft(2, '0') + "分"; btnMinute.BtnText = m_dt.Minute.ToString().PadLeft(2, '0') + "分";
} }
/// <summary>
/// Sets the type of the select.
/// </summary>
/// <param name="btn">The BTN.</param>
private void SetSelectType(UCBtnExt btn) private void SetSelectType(UCBtnExt btn)
{ {
try try
...@@ -250,11 +319,21 @@ namespace HZH_Controls.Controls ...@@ -250,11 +319,21 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the BtnClick event of the btnTime control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void btnTime_BtnClick(object sender, EventArgs e) private void btnTime_BtnClick(object sender, EventArgs e)
{ {
SetSelectType((UCBtnExt)sender); SetSelectType((UCBtnExt)sender);
} }
/// <summary>
/// Handles the MouseDown event of the panLeft control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void panLeft_MouseDown(object sender, MouseEventArgs e) private void panLeft_MouseDown(object sender, MouseEventArgs e)
{ {
List<KeyValuePair<string, string>> lstSource = new List<KeyValuePair<string, string>>(); List<KeyValuePair<string, string>> lstSource = new List<KeyValuePair<string, string>>();
...@@ -271,6 +350,11 @@ namespace HZH_Controls.Controls ...@@ -271,6 +350,11 @@ namespace HZH_Controls.Controls
panTime.ResumeLayout(true); panTime.ResumeLayout(true);
} }
/// <summary>
/// Handles the MouseDown event of the panRight control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void panRight_MouseDown(object sender, MouseEventArgs e) private void panRight_MouseDown(object sender, MouseEventArgs e)
{ {
List<KeyValuePair<string, string>> lstSource = new List<KeyValuePair<string, string>>(); List<KeyValuePair<string, string>> lstSource = new List<KeyValuePair<string, string>>();
...@@ -287,12 +371,22 @@ namespace HZH_Controls.Controls ...@@ -287,12 +371,22 @@ namespace HZH_Controls.Controls
panTime.ResumeLayout(true); panTime.ResumeLayout(true);
} }
/// <summary>
/// Handles the BtnClick event of the btnOk control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void btnOk_BtnClick(object sender, EventArgs e) private void btnOk_BtnClick(object sender, EventArgs e)
{ {
if (SelectedTimeEvent != null) if (SelectedTimeEvent != null)
SelectedTimeEvent(m_dt, null); SelectedTimeEvent(m_dt, null);
} }
/// <summary>
/// Handles the BtnClick event of the btnCancel control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void btnCancel_BtnClick(object sender, EventArgs e) private void btnCancel_BtnClick(object sender, EventArgs e)
{ {
if (CancelTimeEvent != null) if (CancelTimeEvent != null)
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCTimePanel.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCTimePanel.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCTimePanel partial class UCTimePanel
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -110,10 +130,25 @@ ...@@ -110,10 +130,25 @@
#endregion #endregion
/// <summary>
/// The pan main
/// </summary>
private System.Windows.Forms.TableLayoutPanel panMain; private System.Windows.Forms.TableLayoutPanel panMain;
/// <summary>
/// The uc split line v1
/// </summary>
private UCSplitLine_V ucSplitLine_V1; private UCSplitLine_V ucSplitLine_V1;
/// <summary>
/// The uc split line v2
/// </summary>
private UCSplitLine_V ucSplitLine_V2; private UCSplitLine_V ucSplitLine_V2;
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The uc split line h2
/// </summary>
private UCSplitLine_H ucSplitLine_H2; private UCSplitLine_H ucSplitLine_H2;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCTimePanel.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 15:59:56 // Created : 08-08-2019
// 功能描述:DateTime //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCTimePanel.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -15,13 +25,32 @@ using System.Windows.Forms; ...@@ -15,13 +25,32 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCTimePanel.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
[ToolboxItem(false)] [ToolboxItem(false)]
public partial class UCTimePanel : UserControl public partial class UCTimePanel : UserControl
{ {
/// <summary>
/// Occurs when [select source event].
/// </summary>
public event EventHandler SelectSourceEvent; public event EventHandler SelectSourceEvent;
/// <summary>
/// The source
/// </summary>
private List<KeyValuePair<string, string>> source = null; private List<KeyValuePair<string, string>> source = null;
/// <summary>
/// Gets or sets a value indicating whether [first event].
/// </summary>
/// <value><c>true</c> if [first event]; otherwise, <c>false</c>.</value>
public bool FirstEvent { get; set; } public bool FirstEvent { get; set; }
/// <summary>
/// Gets or sets the source.
/// </summary>
/// <value>The source.</value>
public List<KeyValuePair<string, string>> Source public List<KeyValuePair<string, string>> Source
{ {
get { return source; } get { return source; }
...@@ -32,8 +61,15 @@ namespace HZH_Controls.Controls ...@@ -32,8 +61,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The is show border
/// </summary>
private bool _IsShowBorder = false; private bool _IsShowBorder = false;
/// <summary>
/// Gets or sets a value indicating whether this instance is show border.
/// </summary>
/// <value><c>true</c> if this instance is show border; otherwise, <c>false</c>.</value>
public bool IsShowBorder public bool IsShowBorder
{ {
get { return _IsShowBorder; } get { return _IsShowBorder; }
...@@ -47,10 +83,14 @@ namespace HZH_Controls.Controls ...@@ -47,10 +83,14 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The select BTN
/// </summary>
UCBtnExt selectBtn; UCBtnExt selectBtn;
/// <summary> /// <summary>
/// 选中按钮 /// 选中按钮
/// </summary> /// </summary>
/// <value>The select BTN.</value>
public UCBtnExt SelectBtn public UCBtnExt SelectBtn
{ {
get { return selectBtn; } get { return selectBtn; }
...@@ -74,19 +114,34 @@ namespace HZH_Controls.Controls ...@@ -74,19 +114,34 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCTimePanel" /> class.
/// </summary>
public UCTimePanel() public UCTimePanel()
{ {
InitializeComponent(); InitializeComponent();
this.SizeChanged += UCTimePanel_SizeChanged; this.SizeChanged += UCTimePanel_SizeChanged;
} }
/// <summary>
/// Handles the SizeChanged event of the UCTimePanel 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 UCTimePanel_SizeChanged(object sender, EventArgs e) void UCTimePanel_SizeChanged(object sender, EventArgs e)
{ {
} }
/// <summary>
/// The row
/// </summary>
private int row = 0; private int row = 0;
/// <summary>
/// Gets or sets the row.
/// </summary>
/// <value>The row.</value>
public int Row public int Row
{ {
get { return row; } get { return row; }
...@@ -98,8 +153,15 @@ namespace HZH_Controls.Controls ...@@ -98,8 +153,15 @@ namespace HZH_Controls.Controls
} }
/// <summary>
/// The column
/// </summary>
private int column = 0; private int column = 0;
/// <summary>
/// Gets or sets the column.
/// </summary>
/// <value>The column.</value>
public int Column public int Column
{ {
get { return column; } get { return column; }
...@@ -110,6 +172,11 @@ namespace HZH_Controls.Controls ...@@ -110,6 +172,11 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Handles the Load event of the UCTimePanel control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
private void UCTimePanel_Load(object sender, EventArgs e) private void UCTimePanel_Load(object sender, EventArgs e)
{ {
...@@ -158,7 +225,7 @@ namespace HZH_Controls.Controls ...@@ -158,7 +225,7 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 设置选中项 /// 设置选中项
/// </summary> /// </summary>
/// <param name="strKey"></param> /// <param name="strKey">The string key.</param>
public void SetSelect(string strKey) public void SetSelect(string strKey)
{ {
foreach (UCBtnExt item in this.panMain.Controls) foreach (UCBtnExt item in this.panMain.Controls)
...@@ -234,6 +301,11 @@ namespace HZH_Controls.Controls ...@@ -234,6 +301,11 @@ namespace HZH_Controls.Controls
} }
#endregion #endregion
/// <summary>
/// Handles the BtnClick event of the btn 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 btn_BtnClick(object sender, EventArgs e) void btn_BtnClick(object sender, EventArgs e)
{ {
var btn = (UCBtnExt)sender; var btn = (UCBtnExt)sender;
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCKeyBorderAll.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 16:00:06 // Created : 08-08-2019
// 功能描述:KeyBord //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCKeyBorderAll.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,11 +24,23 @@ using System.Windows.Forms; ...@@ -14,11 +24,23 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCKeyBorderAll.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
[DefaultEvent("KeyDown")] [DefaultEvent("KeyDown")]
public partial class UCKeyBorderAll : UserControl public partial class UCKeyBorderAll : UserControl
{ {
/// <summary>
/// The character type
/// </summary>
private KeyBorderCharType _charType = KeyBorderCharType.CHAR; private KeyBorderCharType _charType = KeyBorderCharType.CHAR;
/// <summary>
/// Gets or sets the type of the character.
/// </summary>
/// <value>The type of the character.</value>
[Description("默认显示样式"), Category("自定义")] [Description("默认显示样式"), Category("自定义")]
public KeyBorderCharType CharType public KeyBorderCharType CharType
{ {
...@@ -42,19 +64,39 @@ namespace HZH_Controls.Controls ...@@ -42,19 +64,39 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Occurs when [key click].
/// </summary>
[Description("按键点击事件"), Category("自定义")] [Description("按键点击事件"), Category("自定义")]
public event EventHandler KeyClick; public event EventHandler KeyClick;
/// <summary>
/// Occurs when [enter click].
/// </summary>
[Description("回车点击事件"), Category("自定义")] [Description("回车点击事件"), Category("自定义")]
public event EventHandler EnterClick; public event EventHandler EnterClick;
/// <summary>
/// Occurs when [backspace clike].
/// </summary>
[Description("删除点击事件"), Category("自定义")] [Description("删除点击事件"), Category("自定义")]
public event EventHandler BackspaceClike; public event EventHandler BackspaceClike;
/// <summary>
/// Occurs when [retract clike].
/// </summary>
[Description("收起点击事件"), Category("自定义")] [Description("收起点击事件"), Category("自定义")]
public event EventHandler RetractClike; public event EventHandler RetractClike;
/// <summary>
/// Initializes a new instance of the <see cref="UCKeyBorderAll" /> class.
/// </summary>
public UCKeyBorderAll() public UCKeyBorderAll()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Handles the MouseDown event of the KeyDown control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void KeyDown_MouseDown(object sender, MouseEventArgs e) private void KeyDown_MouseDown(object sender, MouseEventArgs e)
{ {
Label lbl = sender as Label; Label lbl = sender as Label;
...@@ -105,6 +147,10 @@ namespace HZH_Controls.Controls ...@@ -105,6 +147,10 @@ namespace HZH_Controls.Controls
KeyClick(sender, e); KeyClick(sender, e);
} }
/// <summary>
/// Converts to uper.
/// </summary>
/// <param name="bln">if set to <c>true</c> [BLN].</param>
private void ToUper(bool bln) private void ToUper(bool bln)
{ {
foreach (Control item in this.tableLayoutPanel2.Controls) foreach (Control item in this.tableLayoutPanel2.Controls)
...@@ -132,6 +178,9 @@ namespace HZH_Controls.Controls ...@@ -132,6 +178,9 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// Characters the or number.
/// </summary>
private void CharOrNum() private void CharOrNum()
{ {
foreach (Control item in this.tableLayoutPanel2.Controls) foreach (Control item in this.tableLayoutPanel2.Controls)
...@@ -152,9 +201,18 @@ namespace HZH_Controls.Controls ...@@ -152,9 +201,18 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Enum KeyBorderCharType
/// </summary>
public enum KeyBorderCharType public enum KeyBorderCharType
{ {
/// <summary>
/// The character
/// </summary>
CHAR = 1, CHAR = 1,
/// <summary>
/// The number
/// </summary>
NUMBER = 2 NUMBER = 2
} }
} }
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
// <copyright file="UCKeyBorderNum.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCKeyBorderNum.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCKeyBorderNum partial class UCKeyBorderNum
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -830,60 +850,225 @@ ...@@ -830,60 +850,225 @@
#endregion #endregion
/// <summary>
/// The table layout panel1
/// </summary>
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
/// <summary>
/// The panel1
/// </summary>
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
/// <summary>
/// The panel14
/// </summary>
private System.Windows.Forms.Panel panel14; private System.Windows.Forms.Panel panel14;
/// <summary>
/// The uc split line V14
/// </summary>
private UCSplitLine_V ucSplitLine_V14; private UCSplitLine_V ucSplitLine_V14;
/// <summary>
/// The panel13
/// </summary>
private System.Windows.Forms.Panel panel13; private System.Windows.Forms.Panel panel13;
/// <summary>
/// The uc split line V13
/// </summary>
private UCSplitLine_V ucSplitLine_V13; private UCSplitLine_V ucSplitLine_V13;
/// <summary>
/// The panel12
/// </summary>
private System.Windows.Forms.Panel panel12; private System.Windows.Forms.Panel panel12;
/// <summary>
/// The uc split line V12
/// </summary>
private UCSplitLine_V ucSplitLine_V12; private UCSplitLine_V ucSplitLine_V12;
/// <summary>
/// The panel11
/// </summary>
private System.Windows.Forms.Panel panel11; private System.Windows.Forms.Panel panel11;
/// <summary>
/// The uc split line H11
/// </summary>
private UCSplitLine_H ucSplitLine_H11; private UCSplitLine_H ucSplitLine_H11;
/// <summary>
/// The uc split line V11
/// </summary>
private UCSplitLine_V ucSplitLine_V11; private UCSplitLine_V ucSplitLine_V11;
/// <summary>
/// The panel10
/// </summary>
private System.Windows.Forms.Panel panel10; private System.Windows.Forms.Panel panel10;
/// <summary>
/// The uc split line H10
/// </summary>
private UCSplitLine_H ucSplitLine_H10; private UCSplitLine_H ucSplitLine_H10;
/// <summary>
/// The uc split line V10
/// </summary>
private UCSplitLine_V ucSplitLine_V10; private UCSplitLine_V ucSplitLine_V10;
/// <summary>
/// The panel9
/// </summary>
private System.Windows.Forms.Panel panel9; private System.Windows.Forms.Panel panel9;
/// <summary>
/// The uc split line h9
/// </summary>
private UCSplitLine_H ucSplitLine_H9; private UCSplitLine_H ucSplitLine_H9;
/// <summary>
/// The uc split line v9
/// </summary>
private UCSplitLine_V ucSplitLine_V9; private UCSplitLine_V ucSplitLine_V9;
/// <summary>
/// The panel8
/// </summary>
private System.Windows.Forms.Panel panel8; private System.Windows.Forms.Panel panel8;
/// <summary>
/// The uc split line h8
/// </summary>
private UCSplitLine_H ucSplitLine_H8; private UCSplitLine_H ucSplitLine_H8;
/// <summary>
/// The uc split line v8
/// </summary>
private UCSplitLine_V ucSplitLine_V8; private UCSplitLine_V ucSplitLine_V8;
/// <summary>
/// The panel7
/// </summary>
private System.Windows.Forms.Panel panel7; private System.Windows.Forms.Panel panel7;
/// <summary>
/// The panel6
/// </summary>
private System.Windows.Forms.Panel panel6; private System.Windows.Forms.Panel panel6;
/// <summary>
/// The uc split line h6
/// </summary>
private UCSplitLine_H ucSplitLine_H6; private UCSplitLine_H ucSplitLine_H6;
/// <summary>
/// The uc split line v6
/// </summary>
private UCSplitLine_V ucSplitLine_V6; private UCSplitLine_V ucSplitLine_V6;
/// <summary>
/// The panel5
/// </summary>
private System.Windows.Forms.Panel panel5; private System.Windows.Forms.Panel panel5;
/// <summary>
/// The uc split line h5
/// </summary>
private UCSplitLine_H ucSplitLine_H5; private UCSplitLine_H ucSplitLine_H5;
/// <summary>
/// The uc split line v5
/// </summary>
private UCSplitLine_V ucSplitLine_V5; private UCSplitLine_V ucSplitLine_V5;
/// <summary>
/// The panel4
/// </summary>
private System.Windows.Forms.Panel panel4; private System.Windows.Forms.Panel panel4;
/// <summary>
/// The uc split line h4
/// </summary>
private UCSplitLine_H ucSplitLine_H4; private UCSplitLine_H ucSplitLine_H4;
/// <summary>
/// The uc split line v4
/// </summary>
private UCSplitLine_V ucSplitLine_V4; private UCSplitLine_V ucSplitLine_V4;
/// <summary>
/// The panel3
/// </summary>
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel3;
/// <summary>
/// The uc split line h3
/// </summary>
private UCSplitLine_H ucSplitLine_H3; private UCSplitLine_H ucSplitLine_H3;
/// <summary>
/// The panel2
/// </summary>
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
/// <summary>
/// The uc split line h2
/// </summary>
private UCSplitLine_H ucSplitLine_H2; private UCSplitLine_H ucSplitLine_H2;
/// <summary>
/// The uc split line v2
/// </summary>
private UCSplitLine_V ucSplitLine_V2; private UCSplitLine_V ucSplitLine_V2;
/// <summary>
/// The uc split line h1
/// </summary>
private UCSplitLine_H ucSplitLine_H1; private UCSplitLine_H ucSplitLine_H1;
/// <summary>
/// The uc split line v1
/// </summary>
private UCSplitLine_V ucSplitLine_V1; private UCSplitLine_V ucSplitLine_V1;
/// <summary>
/// The label11
/// </summary>
private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label11;
/// <summary>
/// The label12
/// </summary>
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label12;
/// <summary>
/// The label13
/// </summary>
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
/// <summary>
/// The label10
/// </summary>
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
/// <summary>
/// The label9
/// </summary>
private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label9;
/// <summary>
/// The label8
/// </summary>
private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label8;
/// <summary>
/// The label6
/// </summary>
private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label6;
/// <summary>
/// The label14
/// </summary>
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
/// <summary>
/// The label7
/// </summary>
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label7;
/// <summary>
/// The label3
/// </summary>
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
/// <summary>
/// The label5
/// </summary>
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
/// <summary>
/// The label4
/// </summary>
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
/// <summary>
/// The label2
/// </summary>
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
/// <summary>
/// The label1
/// </summary>
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
/// <summary>
/// The uc split line v3
/// </summary>
private UCSplitLine_V ucSplitLine_V3; private UCSplitLine_V ucSplitLine_V3;
/// <summary>
/// The uc split line v7
/// </summary>
private UCSplitLine_V ucSplitLine_V7; private UCSplitLine_V ucSplitLine_V7;
/// <summary>
/// The uc split line h7
/// </summary>
private UCSplitLine_H ucSplitLine_H7; private UCSplitLine_H ucSplitLine_H7;
/// <summary>
/// The uc split line H12
/// </summary>
private UCSplitLine_H ucSplitLine_H12; private UCSplitLine_H ucSplitLine_H12;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCKeyBorderNum.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 16:00:10 // Created : 08-08-2019
// 功能描述:KeyBord //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCKeyBorderNum.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,29 +24,55 @@ using System.Windows.Forms; ...@@ -14,29 +24,55 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCKeyBorderNum.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCKeyBorderNum : UserControl public partial class UCKeyBorderNum : UserControl
{ {
/// <summary>
/// The use custom event
/// </summary>
private bool useCustomEvent = false; private bool useCustomEvent = false;
/// <summary> /// <summary>
/// 是否使用自定义的事件来接收按键,当为true时将不再向系统发送按键请求 /// 是否使用自定义的事件来接收按键,当为true时将不再向系统发送按键请求
/// </summary> /// </summary>
/// <value><c>true</c> if [use custom event]; otherwise, <c>false</c>.</value>
[Description("是否使用自定义的事件来接收按键,当为true时将不再向系统发送按键请求"), Category("自定义")] [Description("是否使用自定义的事件来接收按键,当为true时将不再向系统发送按键请求"), Category("自定义")]
public bool UseCustomEvent public bool UseCustomEvent
{ {
get { return useCustomEvent; } get { return useCustomEvent; }
set { useCustomEvent = value; } set { useCustomEvent = value; }
} }
/// <summary>
/// Occurs when [number click].
/// </summary>
[Description("数字点击事件"), Category("自定义")] [Description("数字点击事件"), Category("自定义")]
public event EventHandler NumClick; public event EventHandler NumClick;
/// <summary>
/// Occurs when [backspace click].
/// </summary>
[Description("删除点击事件"), Category("自定义")] [Description("删除点击事件"), Category("自定义")]
public event EventHandler BackspaceClick; public event EventHandler BackspaceClick;
/// <summary>
/// Occurs when [enter click].
/// </summary>
[Description("回车点击事件"), Category("自定义")] [Description("回车点击事件"), Category("自定义")]
public event EventHandler EnterClick; public event EventHandler EnterClick;
/// <summary>
/// Initializes a new instance of the <see cref="UCKeyBorderNum" /> class.
/// </summary>
public UCKeyBorderNum() public UCKeyBorderNum()
{ {
InitializeComponent(); InitializeComponent();
} }
/// <summary>
/// Handles the MouseDown event of the Num control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Num_MouseDown(object sender, MouseEventArgs e) private void Num_MouseDown(object sender, MouseEventArgs e)
{ {
if (NumClick != null) if (NumClick != null)
...@@ -49,6 +85,11 @@ namespace HZH_Controls.Controls ...@@ -49,6 +85,11 @@ namespace HZH_Controls.Controls
SendKeys.Send(lbl.Tag.ToString()); SendKeys.Send(lbl.Tag.ToString());
} }
/// <summary>
/// Handles the MouseDown event of the Backspace control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Backspace_MouseDown(object sender, MouseEventArgs e) private void Backspace_MouseDown(object sender, MouseEventArgs e)
{ {
if (BackspaceClick != null) if (BackspaceClick != null)
...@@ -61,6 +102,11 @@ namespace HZH_Controls.Controls ...@@ -61,6 +102,11 @@ namespace HZH_Controls.Controls
SendKeys.Send("{BACKSPACE}"); SendKeys.Send("{BACKSPACE}");
} }
/// <summary>
/// Handles the MouseDown event of the Enter control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Enter_MouseDown(object sender, MouseEventArgs e) private void Enter_MouseDown(object sender, MouseEventArgs e)
{ {
if (EnterClick != null) if (EnterClick != null)
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCKeyBorderPay.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 16:00:14 // Created : 08-08-2019
// 功能描述:KeyBord //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="UCKeyBorderPay.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -14,22 +24,45 @@ using System.Windows.Forms; ...@@ -14,22 +24,45 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCKeyBorderPay.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCKeyBorderPay : UserControl public partial class UCKeyBorderPay : UserControl
{ {
/// <summary>
/// Occurs when [number click].
/// </summary>
[Description("数字点击事件"), Category("自定义")] [Description("数字点击事件"), Category("自定义")]
public event EventHandler NumClick; public event EventHandler NumClick;
/// <summary>
/// Occurs when [cancel click].
/// </summary>
[Description("取消点击事件"), Category("自定义")] [Description("取消点击事件"), Category("自定义")]
public event EventHandler CancelClick; public event EventHandler CancelClick;
/// <summary>
/// Occurs when [ok click].
/// </summary>
[Description("确定点击事件"), Category("自定义")] [Description("确定点击事件"), Category("自定义")]
public event EventHandler OKClick; public event EventHandler OKClick;
/// <summary>
/// Occurs when [backspace click].
/// </summary>
[Description("删除点击事件"), Category("自定义")] [Description("删除点击事件"), Category("自定义")]
public event EventHandler BackspaceClick; public event EventHandler BackspaceClick;
/// <summary>
/// Occurs when [money click].
/// </summary>
[Description("金额点击事件"), Category("自定义")] [Description("金额点击事件"), Category("自定义")]
public event EventHandler MoneyClick; public event EventHandler MoneyClick;
/// <summary>
/// Initializes a new instance of the <see cref="UCKeyBorderPay" /> class.
/// </summary>
public UCKeyBorderPay() public UCKeyBorderPay()
{ {
InitializeComponent(); InitializeComponent();
...@@ -149,6 +182,10 @@ namespace HZH_Controls.Controls ...@@ -149,6 +182,10 @@ namespace HZH_Controls.Controls
} }
#endregion #endregion
/// <summary>
/// Sets the fast money to contrl.
/// </summary>
/// <param name="values">The values.</param>
private void SetFastMoneyToContrl(List<decimal> values) private void SetFastMoneyToContrl(List<decimal> values)
{ {
List<Label> lbl = new List<Label>() { lblFast1, lblFast2, lblFast3, lblFast4 }; List<Label> lbl = new List<Label>() { lblFast1, lblFast2, lblFast3, lblFast4 };
...@@ -179,51 +216,88 @@ namespace HZH_Controls.Controls ...@@ -179,51 +216,88 @@ namespace HZH_Controls.Controls
lbl[i].Tag = lbl[i].Text = values[i].ToString("0.##"); lbl[i].Tag = lbl[i].Text = values[i].ToString("0.##");
} }
} }
/// <summary>
/// Handles the MouseDown event of the Num control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Num_MouseDown(object sender, MouseEventArgs e) private void Num_MouseDown(object sender, MouseEventArgs e)
{ {
if (NumClick != null) if (NumClick != null)
NumClick((sender as Label).Tag, e); NumClick((sender as Label).Tag, e);
} }
/// <summary>
/// Handles the MouseDown event of the Backspace control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Backspace_MouseDown(object sender, MouseEventArgs e) private void Backspace_MouseDown(object sender, MouseEventArgs e)
{ {
if (BackspaceClick != null) if (BackspaceClick != null)
BackspaceClick((sender as Label).Tag, e); BackspaceClick((sender as Label).Tag, e);
} }
/// <summary>
/// Handles the MouseDown event of the Cancel control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Cancel_MouseDown(object sender, MouseEventArgs e) private void Cancel_MouseDown(object sender, MouseEventArgs e)
{ {
if (CancelClick != null) if (CancelClick != null)
CancelClick((sender as Label).Tag, e); CancelClick((sender as Label).Tag, e);
} }
/// <summary>
/// Handles the MouseDown event of the OK control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void OK_MouseDown(object sender, MouseEventArgs e) private void OK_MouseDown(object sender, MouseEventArgs e)
{ {
if (OKClick != null) if (OKClick != null)
OKClick((sender as Label).Tag, e); OKClick((sender as Label).Tag, e);
} }
/// <summary>
/// Handles the MouseDown event of the Money control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
private void Money_MouseDown(object sender, MouseEventArgs e) private void Money_MouseDown(object sender, MouseEventArgs e)
{ {
if (MoneyClick != null) if (MoneyClick != null)
MoneyClick((sender as Label).Tag, e); MoneyClick((sender as Label).Tag, e);
} }
/// <summary>
/// Money1s the click.
/// </summary>
public void Money1Click() public void Money1Click()
{ {
Money_MouseDown(lblFast1, null); Money_MouseDown(lblFast1, null);
} }
/// <summary>
/// Money2s the click.
/// </summary>
public void Money2Click() public void Money2Click()
{ {
Money_MouseDown(lblFast2, null); Money_MouseDown(lblFast2, null);
} }
/// <summary>
/// Money3s the click.
/// </summary>
public void Money3Click() public void Money3Click()
{ {
Money_MouseDown(lblFast3, null); Money_MouseDown(lblFast3, null);
} }
/// <summary>
/// Money4s the click.
/// </summary>
public void Money4Click() public void Money4Click()
{ {
Money_MouseDown(lblFast4, null); Money_MouseDown(lblFast4, null);
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 09-02-2019
//
// ***********************************************************************
// <copyright file="UCLEDData.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDData.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCLEDData partial class UCLEDData
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -188,16 +208,49 @@ ...@@ -188,16 +208,49 @@
#endregion #endregion
/// <summary>
/// The table layout panel1
/// </summary>
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
/// <summary>
/// The d1
/// </summary>
private UCLEDNum D1; private UCLEDNum D1;
/// <summary>
/// The d2
/// </summary>
private UCLEDNum D2; private UCLEDNum D2;
/// <summary>
/// The d3
/// </summary>
private UCLEDNum D3; private UCLEDNum D3;
/// <summary>
/// The d4
/// </summary>
private UCLEDNum D4; private UCLEDNum D4;
/// <summary>
/// The d5
/// </summary>
private UCLEDNum D5; private UCLEDNum D5;
/// <summary>
/// The d6
/// </summary>
private UCLEDNum D6; private UCLEDNum D6;
/// <summary>
/// The d7
/// </summary>
private UCLEDNum D7; private UCLEDNum D7;
/// <summary>
/// The d8
/// </summary>
private UCLEDNum D8; private UCLEDNum D8;
/// <summary>
/// The d9
/// </summary>
private UCLEDNum D9; private UCLEDNum D9;
/// <summary>
/// The D10
/// </summary>
private UCLEDNum D10; private UCLEDNum D10;
} }
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCLEDData.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 09-02-2019
// 创建日期:2019-09-02 16:22:48 //
// 功能描述:UCLEDData English:UCLEDData // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCLEDData.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -17,10 +24,22 @@ using System.Windows.Forms; ...@@ -17,10 +24,22 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDData.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCLEDData : UserControl public partial class UCLEDData : UserControl
{ {
/// <summary>
/// The m value
/// </summary>
private DateTime m_value; private DateTime m_value;
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")] [Description("值"), Category("自定义")]
public DateTime Value public DateTime Value
{ {
...@@ -36,8 +55,15 @@ namespace HZH_Controls.Controls ...@@ -36,8 +55,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m line width
/// </summary>
private int m_lineWidth = 8; private int m_lineWidth = 8;
/// <summary>
/// Gets or sets the width of the line.
/// </summary>
/// <value>The width of the line.</value>
[Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")] [Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")]
public int LineWidth public int LineWidth
{ {
...@@ -52,6 +78,13 @@ namespace HZH_Controls.Controls ...@@ -52,6 +78,13 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 获取或设置控件的前景色。
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("颜色"), Category("自定义")] [Description("颜色"), Category("自定义")]
public override System.Drawing.Color ForeColor public override System.Drawing.Color ForeColor
{ {
...@@ -68,6 +101,9 @@ namespace HZH_Controls.Controls ...@@ -68,6 +101,9 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCLEDData" /> class.
/// </summary>
public UCLEDData() public UCLEDData()
{ {
InitializeComponent(); InitializeComponent();
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 09-02-2019
//
// ***********************************************************************
// <copyright file="UCLEDDataTime.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDDataTime.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCLEDDataTime partial class UCLEDDataTime
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -291,24 +311,81 @@ ...@@ -291,24 +311,81 @@
#endregion #endregion
/// <summary>
/// The table layout panel1
/// </summary>
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
/// <summary>
/// The d1
/// </summary>
private UCLEDNum D1; private UCLEDNum D1;
/// <summary>
/// The d2
/// </summary>
private UCLEDNum D2; private UCLEDNum D2;
/// <summary>
/// The d3
/// </summary>
private UCLEDNum D3; private UCLEDNum D3;
/// <summary>
/// The d4
/// </summary>
private UCLEDNum D4; private UCLEDNum D4;
/// <summary>
/// The d5
/// </summary>
private UCLEDNum D5; private UCLEDNum D5;
/// <summary>
/// The d6
/// </summary>
private UCLEDNum D6; private UCLEDNum D6;
/// <summary>
/// The d7
/// </summary>
private UCLEDNum D7; private UCLEDNum D7;
/// <summary>
/// The d8
/// </summary>
private UCLEDNum D8; private UCLEDNum D8;
/// <summary>
/// The d9
/// </summary>
private UCLEDNum D9; private UCLEDNum D9;
/// <summary>
/// The D10
/// </summary>
private UCLEDNum D10; private UCLEDNum D10;
/// <summary>
/// The D12
/// </summary>
private UCLEDNum D12; private UCLEDNum D12;
/// <summary>
/// The D13
/// </summary>
private UCLEDNum D13; private UCLEDNum D13;
/// <summary>
/// The D14
/// </summary>
private UCLEDNum D14; private UCLEDNum D14;
/// <summary>
/// The D15
/// </summary>
private UCLEDNum D15; private UCLEDNum D15;
/// <summary>
/// The D16
/// </summary>
private UCLEDNum D16; private UCLEDNum D16;
/// <summary>
/// The D17
/// </summary>
private UCLEDNum D17; private UCLEDNum D17;
/// <summary>
/// The D18
/// </summary>
private UCLEDNum D18; private UCLEDNum D18;
/// <summary>
/// The D19
/// </summary>
private UCLEDNum D19; private UCLEDNum D19;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCLEDDataTime.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 09-02-2019
// 创建日期:2019-09-02 16:22:53 //
// 功能描述:UCLEDDataTime English:UCLEDDataTime // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCLEDDataTime.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -17,10 +24,22 @@ using System.Windows.Forms; ...@@ -17,10 +24,22 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDDataTime.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCLEDDataTime : UserControl public partial class UCLEDDataTime : UserControl
{ {
/// <summary>
/// The m value
/// </summary>
private DateTime m_value; private DateTime m_value;
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")] [Description("值"), Category("自定义")]
public DateTime Value public DateTime Value
{ {
...@@ -38,8 +57,15 @@ namespace HZH_Controls.Controls ...@@ -38,8 +57,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m line width
/// </summary>
private int m_lineWidth = 8; private int m_lineWidth = 8;
/// <summary>
/// Gets or sets the width of the line.
/// </summary>
/// <value>The width of the line.</value>
[Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")] [Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")]
public int LineWidth public int LineWidth
{ {
...@@ -54,6 +80,13 @@ namespace HZH_Controls.Controls ...@@ -54,6 +80,13 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 获取或设置控件的前景色。
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("颜色"), Category("自定义")] [Description("颜色"), Category("自定义")]
public override System.Drawing.Color ForeColor public override System.Drawing.Color ForeColor
{ {
...@@ -70,6 +103,9 @@ namespace HZH_Controls.Controls ...@@ -70,6 +103,9 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCLEDDataTime" /> class.
/// </summary>
public UCLEDDataTime() public UCLEDDataTime()
{ {
InitializeComponent(); InitializeComponent();
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCLEDNum.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 09-02-2019
// 创建日期:2019-09-02 16:22:59 //
// 功能描述:UCLEDNum English:UCLEDNum // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCLEDNum.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -28,11 +35,25 @@ namespace HZH_Controls.Controls ...@@ -28,11 +35,25 @@ namespace HZH_Controls.Controls
* * * * * *
* ****4*** * ****4***
*/ */
/// <summary>
/// Class UCLEDNum.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public class UCLEDNum : UserControl public class UCLEDNum : UserControl
{ {
/// <summary>
/// The m draw rect
/// </summary>
Rectangle m_drawRect = Rectangle.Empty; Rectangle m_drawRect = Rectangle.Empty;
/// <summary>
/// The m nums
/// </summary>
private static Dictionary<char, int[]> m_nums = new Dictionary<char, int[]>(); private static Dictionary<char, int[]> m_nums = new Dictionary<char, int[]>();
/// <summary>
/// Initializes static members of the <see cref="UCLEDNum" /> class.
/// </summary>
static UCLEDNum() static UCLEDNum()
{ {
m_nums['0'] = new int[] { 1, 2, 3, 4, 5, 6 }; m_nums['0'] = new int[] { 1, 2, 3, 4, 5, 6 };
...@@ -51,6 +72,9 @@ namespace HZH_Controls.Controls ...@@ -51,6 +72,9 @@ namespace HZH_Controls.Controls
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCLEDNum" /> class.
/// </summary>
public UCLEDNum() public UCLEDNum()
{ {
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
...@@ -66,13 +90,25 @@ namespace HZH_Controls.Controls ...@@ -66,13 +90,25 @@ namespace HZH_Controls.Controls
m_drawRect = new Rectangle(1, 1, this.Width - 2, this.Height - 2); m_drawRect = new Rectangle(1, 1, this.Width - 2, this.Height - 2);
} }
/// <summary>
/// Handles the SizeChanged event of the LEDNum 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 LEDNum_SizeChanged(object sender, EventArgs e) void LEDNum_SizeChanged(object sender, EventArgs e)
{ {
m_drawRect = new Rectangle(1, 1, this.Width - 2, this.Height - 2); m_drawRect = new Rectangle(1, 1, this.Width - 2, this.Height - 2);
} }
/// <summary>
/// The m value
/// </summary>
private char m_value = '0'; private char m_value = '0';
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")] [Description("值"), Category("自定义")]
public char Value public char Value
{ {
...@@ -91,8 +127,15 @@ namespace HZH_Controls.Controls ...@@ -91,8 +127,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m line width
/// </summary>
private int m_lineWidth = 8; private int m_lineWidth = 8;
/// <summary>
/// Gets or sets the width of the line.
/// </summary>
/// <value>The width of the line.</value>
[Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")] [Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")]
public int LineWidth public int LineWidth
{ {
...@@ -104,6 +147,13 @@ namespace HZH_Controls.Controls ...@@ -104,6 +147,13 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 获取或设置控件的前景色。
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("颜色"), Category("自定义")] [Description("颜色"), Category("自定义")]
public override System.Drawing.Color ForeColor public override System.Drawing.Color ForeColor
{ {
...@@ -117,6 +167,10 @@ namespace HZH_Controls.Controls ...@@ -117,6 +167,10 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 引发 <see cref="E:System.Windows.Forms.Control.Paint" /> 事件。
/// </summary>
/// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
protected override void OnPaint(PaintEventArgs e) protected override void OnPaint(PaintEventArgs e)
{ {
base.OnPaint(e); base.OnPaint(e);
......
namespace HZH_Controls.Controls.LED // ***********************************************************************
// Assembly : HZH_Controls
// Created : 09-02-2019
//
// ***********************************************************************
// <copyright file="UCLEDNums.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDNums.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCLEDNums partial class UCLEDNums
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCLEDNums.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 09-02-2019
// 创建日期:2019-09-02 16:23:03 //
// 功能描述:UCLEDNums English:UCLEDNums // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCLEDNums.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -15,12 +22,24 @@ using System.Linq; ...@@ -15,12 +22,24 @@ using System.Linq;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace HZH_Controls.Controls.LED namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDNums.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCLEDNums : UserControl public partial class UCLEDNums : UserControl
{ {
/// <summary>
/// The m value
/// </summary>
private string m_value; private string m_value;
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")] [Description("值"), Category("自定义")]
public string Value public string Value
{ {
...@@ -32,8 +51,15 @@ namespace HZH_Controls.Controls.LED ...@@ -32,8 +51,15 @@ namespace HZH_Controls.Controls.LED
} }
} }
/// <summary>
/// The m line width
/// </summary>
private int m_lineWidth = 8; private int m_lineWidth = 8;
/// <summary>
/// Gets or sets the width of the line.
/// </summary>
/// <value>The width of the line.</value>
[Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")] [Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")]
public int LineWidth public int LineWidth
{ {
...@@ -48,6 +74,13 @@ namespace HZH_Controls.Controls.LED ...@@ -48,6 +74,13 @@ namespace HZH_Controls.Controls.LED
} }
} }
/// <summary>
/// 获取或设置控件的前景色。
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("颜色"), Category("自定义")] [Description("颜色"), Category("自定义")]
public override System.Drawing.Color ForeColor public override System.Drawing.Color ForeColor
{ {
...@@ -65,6 +98,16 @@ namespace HZH_Controls.Controls.LED ...@@ -65,6 +98,16 @@ namespace HZH_Controls.Controls.LED
} }
} }
/// <summary>
/// 获取或设置一个值,该值指示是否将控件的元素对齐以支持使用从右向左的字体的区域设置。
/// </summary>
/// <value>The right to left.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
public override RightToLeft RightToLeft public override RightToLeft RightToLeft
{ {
get get
...@@ -78,6 +121,9 @@ namespace HZH_Controls.Controls.LED ...@@ -78,6 +121,9 @@ namespace HZH_Controls.Controls.LED
} }
} }
/// <summary>
/// Reloads the value.
/// </summary>
private void ReloadValue() private void ReloadValue()
{ {
try try
...@@ -106,6 +152,9 @@ namespace HZH_Controls.Controls.LED ...@@ -106,6 +152,9 @@ namespace HZH_Controls.Controls.LED
ControlHelper.FreezeControl(this, false); ControlHelper.FreezeControl(this, false);
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCLEDNums" /> class.
/// </summary>
public UCLEDNums() public UCLEDNums()
{ {
InitializeComponent(); InitializeComponent();
......
namespace HZH_Controls.Controls // ***********************************************************************
// Assembly : HZH_Controls
// Created : 09-02-2019
//
// ***********************************************************************
// <copyright file="UCLEDTime.Designer.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.
// ***********************************************************************
namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDTime.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
partial class UCLEDTime partial class UCLEDTime
{ {
/// <summary> /// <summary>
/// 必需的设计器变量。 /// 必需的设计器变量。
/// </summary> /// </summary>
private System.ComponentModel.IContainer components = null; private System.ComponentModel.IContainer components = null;
/// <summary> /// <summary>
/// 清理所有正在使用的资源。 /// 清理所有正在使用的资源。
/// </summary> /// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
...@@ -22,7 +42,7 @@ ...@@ -22,7 +42,7 @@
#region 组件设计器生成的代码 #region 组件设计器生成的代码
/// <summary> /// <summary>
/// 设计器支持所需的方法 - 不要 /// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。 /// 使用代码编辑器修改此方法的内容。
/// </summary> /// </summary>
...@@ -160,14 +180,41 @@ ...@@ -160,14 +180,41 @@
#endregion #endregion
/// <summary>
/// The table layout panel1
/// </summary>
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
/// <summary>
/// The d1
/// </summary>
private UCLEDNum D1; private UCLEDNum D1;
/// <summary>
/// The d2
/// </summary>
private UCLEDNum D2; private UCLEDNum D2;
/// <summary>
/// The d3
/// </summary>
private UCLEDNum D3; private UCLEDNum D3;
/// <summary>
/// The d4
/// </summary>
private UCLEDNum D4; private UCLEDNum D4;
/// <summary>
/// The d5
/// </summary>
private UCLEDNum D5; private UCLEDNum D5;
/// <summary>
/// The d6
/// </summary>
private UCLEDNum D6; private UCLEDNum D6;
/// <summary>
/// The d7
/// </summary>
private UCLEDNum D7; private UCLEDNum D7;
/// <summary>
/// The d8
/// </summary>
private UCLEDNum D8; private UCLEDNum D8;
} }
} }
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:UCLEDTime.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 09-02-2019
// 创建日期:2019-09-02 16:23:08 //
// 功能描述:UCLEDTime English:UCLEDTime // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="UCLEDTime.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -17,10 +24,22 @@ using System.Windows.Forms; ...@@ -17,10 +24,22 @@ using System.Windows.Forms;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Class UCLEDTime.
/// Implements the <see cref="System.Windows.Forms.UserControl" />
/// </summary>
/// <seealso cref="System.Windows.Forms.UserControl" />
public partial class UCLEDTime : UserControl public partial class UCLEDTime : UserControl
{ {
/// <summary>
/// The m value
/// </summary>
private DateTime m_value; private DateTime m_value;
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
[Description("值"), Category("自定义")] [Description("值"), Category("自定义")]
public DateTime Value public DateTime Value
{ {
...@@ -36,8 +55,15 @@ namespace HZH_Controls.Controls ...@@ -36,8 +55,15 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// The m line width
/// </summary>
private int m_lineWidth = 8; private int m_lineWidth = 8;
/// <summary>
/// Gets or sets the width of the line.
/// </summary>
/// <value>The width of the line.</value>
[Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")] [Description("线宽度,为了更好的显示效果,请使用偶数"), Category("自定义")]
public int LineWidth public int LineWidth
{ {
...@@ -52,6 +78,13 @@ namespace HZH_Controls.Controls ...@@ -52,6 +78,13 @@ namespace HZH_Controls.Controls
} }
} }
/// <summary>
/// 获取或设置控件的前景色。
/// </summary>
/// <value>The color of the fore.</value>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
[Description("颜色"), Category("自定义")] [Description("颜色"), Category("自定义")]
public override System.Drawing.Color ForeColor public override System.Drawing.Color ForeColor
{ {
...@@ -68,6 +101,9 @@ namespace HZH_Controls.Controls ...@@ -68,6 +101,9 @@ namespace HZH_Controls.Controls
} }
} }
} }
/// <summary>
/// Initializes a new instance of the <see cref="UCLEDTime" /> class.
/// </summary>
public UCLEDTime() public UCLEDTime()
{ {
InitializeComponent(); InitializeComponent();
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:IListViewItem.cs // Assembly : HZH_Controls
// 作  者:HZH // Created : 08-22-2019
// 创建日期:2019-08-31 16:03:22 //
// 功能描述:IListViewItem English:IListViewItem // ***********************************************************************
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // <copyright file="IListViewItem.cs">
// 项目地址:https://github.com/kwwwvagaa/NetWinformControl // 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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -13,11 +20,15 @@ using System.Text; ...@@ -13,11 +20,15 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Interface IListViewItem
/// </summary>
public interface IListViewItem public interface IListViewItem
{ {
/// <summary> /// <summary>
/// 数据源 /// 数据源
/// </summary> /// </summary>
/// <value>The data source.</value>
object DataSource { get; set; } object DataSource { get; set; }
/// <summary> /// <summary>
/// 选中项事件 /// 选中项事件
......
// 版权所有 黄正辉 交流群:568015492 QQ:623128629 // ***********************************************************************
// 文件名称:IPageControl.cs // Assembly : HZH_Controls
// 创建日期:2019-08-15 16:00:24 // Created : 08-09-2019
// 功能描述:PageControl //
// 项目地址:https://gitee.com/kwwwvagaa/net_winform_custom_control // ***********************************************************************
// <copyright file="IPageControl.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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -10,6 +20,9 @@ using System.Text; ...@@ -10,6 +20,9 @@ using System.Text;
namespace HZH_Controls.Controls namespace HZH_Controls.Controls
{ {
/// <summary>
/// Interface IPageControl
/// </summary>
public interface IPageControl public interface IPageControl
{ {
/// <summary> /// <summary>
...@@ -19,14 +32,17 @@ namespace HZH_Controls.Controls ...@@ -19,14 +32,17 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 数据源 /// 数据源
/// </summary> /// </summary>
/// <value>The data source.</value>
List<object> DataSource { get; set; } List<object> DataSource { get; set; }
/// <summary> /// <summary>
/// 显示数量 /// 显示数量
/// </summary> /// </summary>
/// <value>The size of the page.</value>
int PageSize { get; set; } int PageSize { get; set; }
/// <summary> /// <summary>
/// 开始下标 /// 开始下标
/// </summary> /// </summary>
/// <value>The start index.</value>
int StartIndex { get; set; } int StartIndex { get; set; }
/// <summary> /// <summary>
/// 第一页 /// 第一页
...@@ -51,15 +67,17 @@ namespace HZH_Controls.Controls ...@@ -51,15 +67,17 @@ namespace HZH_Controls.Controls
/// <summary> /// <summary>
/// 获取当前页数据 /// 获取当前页数据
/// </summary> /// </summary>
/// <returns></returns> /// <returns>List&lt;System.Object&gt;.</returns>
List<object> GetCurrentSource(); List<object> GetCurrentSource();
/// <summary> /// <summary>
/// 总页数 /// 总页数
/// </summary> /// </summary>
/// <value>The page count.</value>
int PageCount { get; set; } int PageCount { get; set; }
/// <summary> /// <summary>
/// 当前页 /// 当前页
/// </summary> /// </summary>
/// <value>The index of the page.</value>
int PageIndex { get; set; } int PageIndex { get; set; }
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!