private void editButton_Click(object sender, EventArgs e) { if (Application.OpenForms["ProfileEditor"] is ProfileEditor) { return; } try { ProfileEditor profileEditor = new ProfileEditor((string)this.profileListBox.SelectedItem); profileEditor.FormClosed += new FormClosedEventHandler(this.fileNameSave_FormClosed); ((Control)profileEditor).Show(); } catch (IOException ex) { Thread.Sleep(TimeSpan.FromSeconds(1.0)); } }
private void editButton_Click(object sender, EventArgs e) { if (Application.OpenForms["ProfileEditor"] is ProfileEditor) return; try { ProfileEditor profileEditor = new ProfileEditor((string) this.profileListBox.SelectedItem); profileEditor.FormClosed += new FormClosedEventHandler(this.fileNameSave_FormClosed); ((Control) profileEditor).Show(); } catch (IOException ex) { Thread.Sleep(TimeSpan.FromSeconds(1.0)); } }