private void ActionInsertScript() { ScriptFile item = this.list.SelectedItem as ScriptFile; int index = this.list.SelectedIndex; if (item == null) { index = 0; } ScriptListEditorInsertDialog dialog = new ScriptListEditorInsertDialog(this.scriptList); DialogResult result = dialog.ShowDialog(this); if (result != System.Windows.Forms.DialogResult.OK) { return; } ScriptFile file = this.scriptList.InsertFile(dialog.result, index); this.list.Items.Insert(index, file); this.list.SelectedItem = file; file.ShowEditor(); }
private void ActionInsertScript() { ScriptFile item = this.list.SelectedItem as ScriptFile; int index = this.list.SelectedIndex; if (item == null) { index = 0; } ScriptListEditorInsertDialog dialog = new ScriptListEditorInsertDialog(this.scriptList); DialogResult result = dialog.ShowDialog(this); if (result != System.Windows.Forms.DialogResult.OK) return; ScriptFile file = this.scriptList.InsertFile(dialog.result, index); this.list.Items.Insert(index, file); this.list.SelectedItem = file; file.ShowEditor(); }