示例#1
0
 private void cmnuAdd_Click(object sender, EventArgs e)
 {
     using (ApplicationJobDialog dialog = new ApplicationJobDialog())
     {
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             SaveAndShowJob(dialog.ApplicationJob);
         }
     }
 }
示例#2
0
 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);
     }
 }