FrmBack.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // ***********************************************************************
  2. // Assembly : HZH_Controls
  3. // Created : 08-08-2019
  4. //
  5. // ***********************************************************************
  6. // <copyright file="FrmBack.cs">
  7. // Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
  8. // </copyright>
  9. //
  10. // Blog: https://www.cnblogs.com/bfyx
  11. // GitHub:https://github.com/kwwwvagaa/NetWinformControl
  12. // gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
  13. //
  14. // If you use this code, please keep this note.
  15. // ***********************************************************************
  16. using System;
  17. using System.Collections.Generic;
  18. using System.ComponentModel;
  19. using System.Data;
  20. using System.Drawing;
  21. using System.Linq;
  22. using System.Text;
  23. using System.Windows.Forms;
  24. namespace HZH_Controls.Forms
  25. {
  26. /// <summary>
  27. /// Class FrmBack.
  28. /// Implements the <see cref="HZH_Controls.Forms.FrmBase" />
  29. /// </summary>
  30. /// <seealso cref="HZH_Controls.Forms.FrmBase" />
  31. [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(System.ComponentModel.Design.IDesigner))]
  32. public partial class FrmBack : FrmBase
  33. {
  34. /// <summary>
  35. /// The FRM title
  36. /// </summary>
  37. private string _frmTitle = "自定义窗体";
  38. /// <summary>
  39. /// 窗体标题
  40. /// </summary>
  41. /// <value>The FRM title.</value>
  42. [Description("窗体标题"), Category("自定义")]
  43. public string FrmTitle
  44. {
  45. get { return _frmTitle; }
  46. set
  47. {
  48. _frmTitle = value;
  49. btnBack1.BtnText = " " + value;
  50. }
  51. }
  52. /// <summary>
  53. /// Occurs when [BTN help click].
  54. /// </summary>
  55. [Description("帮助按钮点击事件"), Category("自定义")]
  56. public event EventHandler BtnHelpClick;
  57. /// <summary>
  58. /// Initializes a new instance of the <see cref="FrmBack" /> class.
  59. /// </summary>
  60. public FrmBack()
  61. {
  62. InitializeComponent();
  63. InitFormMove(this.panTop);
  64. }
  65. /// <summary>
  66. /// Handles the btnClick event of the btnBack1 control.
  67. /// </summary>
  68. /// <param name="sender">The source of the event.</param>
  69. /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
  70. private void btnBack1_btnClick(object sender, EventArgs e)
  71. {
  72. this.Close();
  73. }
  74. /// <summary>
  75. /// Handles the MouseDown event of the label1 control.
  76. /// </summary>
  77. /// <param name="sender">The source of the event.</param>
  78. /// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
  79. private void label1_MouseDown(object sender, MouseEventArgs e)
  80. {
  81. if (BtnHelpClick != null)
  82. BtnHelpClick(sender, e);
  83. }
  84. }
  85. }