/// <summary> /// 触发事件的方法 /// </summary> /// <param name="e"></param> protected virtual void OnonClosing(onClosingEventArgs e) { if (onClosing != null) { onClosing(this, e); } }
private void minimumButton_Click(object sender, EventArgs e) { onClosingEventArgs e1 = new onClosingEventArgs(); e1.choice = "minimum"; e1.remember = rememberCheckBox.Checked; OnonClosing(e1); this.Close(); }