protected virtual void afterShow(NewFileForm form) { if (form.DialogResult == DialogResult.OK) { createFile(form.SelectedText, form.SelectedType, form.SelectedOption); } }
private void newFile_Click(object sender, EventArgs e) { NewFileForm nff = new NewFileForm(ref treeView1); nff.ShowDialog(); Console.WriteLine("Count: " + treeView1.Nodes.Count.ToString()); }
protected override void run() { NewFileForm form = new NewFileForm(); beforeShow(form); form.ShowDialog(); afterShow(form); form.Dispose(); }
public Moai.Platform.Templates.Files.FileCreationData PickNewFile(string preselected) { NewFileForm nff = new NewFileForm(preselected); if (nff.ShowDialog() == DialogResult.OK) { return(nff.Result); } else { return(null); } }
/// <summary>Execute the command.</summary> public override void Execute() { NewFileForm newFileForm = Services.Resolve <NewFileForm>(); DialogResult result = newFileForm.ShowDialog(); if (result == DialogResult.OK) { var editor = Services.Resolve <IEditor>(newFileForm.FileEditorDescriptor.EditorKeyName); editor.FileName = null; HostWindow.DisplayDockedForm(editor as DockContent); } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { var newFileDialog = new NewFileForm(); if (newFileDialog.ShowDialog(this) == DialogResult.OK) { filePath = newFileDialog.FileName; needsSaving = true; dataSet.Clear(); while (tabControl1.Controls.Count > 0) { tabControl1.TabPages[0].Dispose(); } dataSet.ReadXmlSchema("student_scheme.xsd"); InitDataGridPages(); } }
protected virtual void beforeShow(NewFileForm form) { }
protected override void beforeShow(NewFileForm form) { form.setForType(Path); }