using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace DayOf1440.UI { /// /// Form 基类 /// public partial class BaseForm : Form { public BaseForm() { this.Load += new EventHandler(BaseForm_Load); this.FormClosed += new FormClosedEventHandler(BaseForm_FormClosed); InitializeComponent(); } public void BaseForm_Load(object sender, EventArgs e) { Program.formList.Add(this); } public void BaseForm_FormClosed(object sender, FormClosedEventArgs e) { Program.formList.Remove(this); } private void InitializeComponent() { this.SuspendLayout(); // // BaseForm // this.ClientSize = new System.Drawing.Size(1350, 729); this.Name = "BaseForm"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.DoubleClick += new System.EventHandler(this.BaseForm_DoubleClick); this.ResumeLayout(false); } private void BaseForm_DoubleClick(object sender, EventArgs e) { Application.Exit(); } } }