private void createPath() { if (Application.OpenForms["NewPath"] is NewPath) { return; } if (this.pathListBox.SelectedIndex != -1) { this.pathListBox.SetSelected(this.pathListBox.SelectedIndex, false); } NewPath newPath = new NewPath(this.pathType); newPath.FormClosed += new FormClosedEventHandler(this.newPath_FormClosed); ((Control)newPath).Show(); }
private void createPath() { if (Application.OpenForms["NewPath"] is NewPath) return; if (this.pathListBox.SelectedIndex != -1) this.pathListBox.SetSelected(this.pathListBox.SelectedIndex, false); NewPath newPath = new NewPath(this.pathType); newPath.FormClosed += new FormClosedEventHandler(this.newPath_FormClosed); ((Control) newPath).Show(); }