private void popupEdit_closed(object sender, EventArgs e) { presetTitle = popup.PresetTitle; popup.btn_create.Click -= new EventHandler(popup_presetEdit); popup.FormClosing -= new FormClosingEventHandler(popupEdit_closed); popup = null; }
private void btn_add_Click(object sender, EventArgs e) { if (popup == null) { popup = new popupForm(); popup.Text = "Create New Preset"; popup.btn_create.Click += new EventHandler(popup_presetCreate); popup.FormClosing += new FormClosingEventHandler(popupCreate_closed); popup.Location = this.Location; popup.Show(); } }
private void btn_edit_Click(object sender, EventArgs e) { if (popup == null) { popup = new popupForm(); popup.Text = "Edit Preset Name"; popup.btn_create.Text = "Rename"; popup.tb_name.Text = mPresetList[getListViewIndex()].Name; popup.btn_create.Click += new EventHandler(popup_presetEdit); popup.FormClosing += new FormClosingEventHandler(popupEdit_closed); popup.Location = this.Location; popup.Show(); } }
private void resetPopupForm() { popup.btn_create.Click -= new EventHandler(popup_presetCreate); popup.FormClosing -= new FormClosingEventHandler(popup_closed); popup = null; }