// *********************************************************************** // 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 FrmWithOKCancel1. /// Implements the /// /// [Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(System.ComponentModel.Design.IDesigner))] public partial class FrmWithOKCancel1 : FrmWithTitle { /// /// Initializes a new instance of the class. /// public FrmWithOKCancel1() { InitializeComponent(); } /// /// Handles the BtnClick event of the btnOK control. /// /// The source of the event. /// The instance containing the event data. private void btnOK_BtnClick(object sender, EventArgs e) { DoEnter(); } /// /// Handles the BtnClick event of the btnCancel control. /// /// The source of the event. /// The instance containing the event data. private void btnCancel_BtnClick(object sender, EventArgs e) { DoEsc(); } /// /// Does the enter. /// protected override void DoEnter() { this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } /// /// Handles the VisibleChanged event of the FrmWithOKCancel1 control. /// /// The source of the event. /// The instance containing the event data. private void FrmWithOKCancel1_VisibleChanged(object sender, EventArgs e) { } } }