// ***********************************************************************
// Assembly : HZH_Controls
// Created : 08-08-2019
//
// ***********************************************************************
//
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
//
//
// Blog: https://www.cnblogs.com/bfyx
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
//
// If you use this code, please keep this note.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HZH_Controls.Forms
{
///
/// Class FrmBack.
/// Implements the
///
///
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(System.ComponentModel.Design.IDesigner))]
public partial class FrmBack : FrmBase
{
public override Color ForeColor
{
get { return base.ForeColor; }
set
{
base.ForeColor = value;
if (this.btnBack1 != null)
this.btnBack1.ForeColor = value;
}
}
public override Color BackColor
{
get { return base.BackColor; }
set
{
base.BackColor = value;
if (this.btnBack1 != null)
{
this.btnBack1.FillColor = value;
this.btnBack1.RectColor = value;
}
}
}
[Description("是否显示帮助按钮"), Category("自定义")]
public bool IsShowHelpBTn
{
get { return lblHelp.Visible; }
set
{
lblHelp.Visible = value;
}
}
///
/// The FRM title
///
private string _frmTitle = "自定义窗体";
///
/// 窗体标题
///
/// The FRM title.
[Description("窗体标题"), Category("自定义")]
public string FrmTitle
{
get { return _frmTitle; }
set
{
_frmTitle = value;
btnBack1.BtnText = " " + value;
}
}
///
/// Occurs when [BTN help click].
///
[Description("帮助按钮点击事件"), Category("自定义")]
public event EventHandler BtnHelpClick;
///
/// Initializes a new instance of the class.
///
public FrmBack()
{
InitializeComponent();
InitFormMove(this.panTop);
}
///
/// Handles the btnClick event of the btnBack1 control.
///
/// The source of the event.
/// The instance containing the event data.
private void btnBack1_btnClick(object sender, EventArgs e)
{
this.Close();
}
///
/// Handles the MouseDown event of the label1 control.
///
/// The source of the event.
/// The instance containing the event data.
private void label1_MouseDown(object sender, MouseEventArgs e)
{
if (BtnHelpClick != null)
BtnHelpClick(sender, e);
}
private void FrmBack_Load(object sender, EventArgs e)
{
this.btnBack1.ForeColor = ForeColor;
}
}
}