private void cmnuAdd_Click(object sender, EventArgs e) { using (ApplicationJobDialog dialog = new ApplicationJobDialog()) { if (dialog.ShowDialog(this) == DialogResult.OK) { SaveAndShowJob(dialog.ApplicationJob); } } }
private void ImportFromFile(string file) { ApplicationJob padImport = ApplicationJob.ImportFromPad(file); if (padImport != null) { ApplicationJobDialog newJob = new ApplicationJobDialog(); newJob.ApplicationJob = padImport; if (newJob.ShowDialog(this) == DialogResult.OK) { SaveAndShowJob(newJob.ApplicationJob); } } else { ApplicationJob.ImportFromTemplateOrXml(this, file, m_Jobs); } }