コード例 #1
0
 private void button8_Click(object sender, EventArgs e)
 {
     if (!MainDashboard.DailyJobSheetFormOpen)
     {
         frmLoading.ShowLoadingScreen();
         frmProductionRecordNew frm = new frmProductionRecordNew
         {
             MdiParent     = this.ParentForm,
             StartPosition = FormStartPosition.CenterScreen,
             WindowState   = FormWindowState.Maximized
         };
         frm.Show();
         MainDashboard.DailyJobSheetFormOpen = true;
         frmLoading.CloseForm();
     }
     else
     {
         if (Application.OpenForms.OfType <frmProductionRecordNew>().Count() == 1)
         {
             Application.OpenForms.OfType <frmProductionRecordNew>().First().BringToFront();
         }
     }
 }
コード例 #2
0
 private void dAILYToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (true)
     {
         if (!DailyJobSheetFormOpen)
         {
             frmLoading.ShowLoadingScreen();
             frmProductionRecordNew frm = new frmProductionRecordNew();
             frm.MdiParent     = this;
             frm.StartPosition = FormStartPosition.CenterScreen;
             frm.WindowState   = FormWindowState.Maximized;
             frm.Show();
             DailyJobSheetFormOpen = true;
             frmLoading.CloseForm();
         }
         else
         {
             if (Application.OpenForms.OfType <frmProductionRecordNew>().Count() == 1)
             {
                 Application.OpenForms.OfType <frmProductionRecordNew>().First().BringToFront();
             }
         }
     }
 }