コード例 #1
0
        //Row One  -------------------------------------------------------------------------------
        private void buttonRowOne_Click(object sender, EventArgs e)
        {
            if (ButtonSelect == 0)
            {
                //MessageBox.Show("Deleted", "Information");
            }
            // FILE TAB  Open Existing Cruise Design ++++++++++
            else if (ButtonSelect == 1)
            {
               // open recon file
               if (openFileDialogDesign.ShowDialog() == DialogResult.OK)
               {
                  //set title bar with file name
                  Text = openFileDialogDesign.SafeFileName;
                  dalPathDesign = openFileDialogDesign.FileName;
                  // check for design file vs production cruise
                  if(Text.Contains(".cruise"))
                  {
                     MessageBox.Show("Open Production Not Completed at this Time", "Information");
                     return;
                  }

                  // does .cruise file exist
                  if (doesFileExist("cruise"))
                  {
                     // check for historical design in Sale - Purpose
                     reconExists = true;
                  }
                  else
                     reconExists = false;
                  canCreateNew = false;

                  if (openDesignFile())
                  {
                     buttonSetup.Enabled = true;
                     buttonDesign.Enabled = true;
                     buttonTools.Enabled = true;
                  }
                  else
                     MessageBox.Show("Unable to open the design file", "Information");

               }
            }
            // SETUP TAB    Setup Using Recon  +++++++++++++
            else if (ButtonSelect == 2)
            {
               StrataSetupWizard strDlg = new StrataSetupWizard(this, dalPathCruise, reconExists);
               strDlg.Owner = this;

               //        strDlg.dalFile = dalPath;
               strDlg.ShowDialog(this);
            }
            //DESIGN TAB    Design Cruise +++++++++++++++
            else if (ButtonSelect == 3)
            {
               //MessageBox.Show("Design Cruise Selected", "Information");
               Cursor.Current = Cursors.WaitCursor;

               Design_Pages.Processing pDlg = new CruiseDesign.Design_Pages.Processing(this, dalPathCruise, reconExists);
               pDlg.ShowDialog();

               Cursor.Current = this.Cursor;

               Design_Pages.DesignMain dmDlg = new CruiseDesign.Design_Pages.DesignMain(this, dalPathCruise);
               dmDlg.ShowDialog(this);

               // call DesignCruiseForm

            }
            //TOOLS TAB  Compare with Production Cruise +++++++++++++
            else if (ButtonSelect == 4)
               MessageBox.Show("Compare with Production Selected", "Information");
        }
コード例 #2
0
        //Row One  -------------------------------------------------------------------------------
        private void buttonRowOne_Click(object sender, EventArgs e)
        {
            if (ButtonSelect == 0)
            {
                //MessageBox.Show("Deleted", "Information");
            }
            // FILE TAB  Open Existing Cruise Design ++++++++++
            else if (ButtonSelect == 1)
            {
               // open recon file
               if (openFileDialogDesign.ShowDialog() == DialogResult.OK)
               {
                  //set title bar with file name
                  Text = openFileDialogDesign.SafeFileName;
                  dalPathDesign = openFileDialogDesign.FileName;
                  // check for design file vs production cruise
                  if (Text.Contains(".cruise"))
                  {
                     prodFile = true;
                     reconExists = false;
                     canCreateNew = false;
                  }
                  else
                  {
                     // does .cruise file exist
                     if (doesFileExist("cruise"))
                     {
                        // check for historical design in Sale - Purpose
                        reconExists = true;
                     }
                     else
                        reconExists = false;
                     canCreateNew = false;
                     prodFile = false;
                  }
                  if (openDesignFile())
                  {
                     buttonSetup.Enabled = true;
                     buttonDesign.Enabled = true;
                     buttonTools.Enabled = true;
                  }
                  else
                     MessageBox.Show("Unable to open the file.", "Information");

               }
            }
            // SETUP TAB    Setup Using Recon  +++++++++++++
            else if (ButtonSelect == 2)
            {
               if (prodFile)
               {
                  MessageBox.Show("Production File Found.\nNo changes to the current design allowed.\n", "Warning", MessageBoxButtons.OK);
                  return;
               }

               StrataSetupWizard strDlg = new StrataSetupWizard(this, dalPathCruise, reconExists, prodFile, canCreateNew);
               strDlg.Owner = this;

               //        strDlg.dalFile = dalPath;
               strDlg.ShowDialog(this);

               if (canCreateNew)
               {
                  this.cdDAL = new DAL(dalPathDesign, false);
               }

            }
            //DESIGN TAB    Design Cruise +++++++++++++++
            else if (ButtonSelect == 3)
            {
               if (prodFile)
               {
                  MessageBox.Show("Production File Found.\nCannot modify selection frequencies.\n", "Warning", MessageBoxButtons.OK);
                  return;
               }
               //MessageBox.Show("Design Cruise Selected", "Information");
               Cursor.Current = Cursors.WaitCursor;

               Design_Pages.Processing pDlg = new CruiseDesign.Design_Pages.Processing(this, dalPathCruise, reconExists, prodFile);
               pDlg.ShowDialog();

               Cursor.Current = this.Cursor;

               Design_Pages.DesignMain dmDlg = new CruiseDesign.Design_Pages.DesignMain(this, dalPathCruise);
               dmDlg.ShowDialog(this);

               // call DesignCruiseForm

            }
            //TOOLS TAB  Compare with Production Cruise +++++++++++++
            else if (ButtonSelect == 4)
               MessageBox.Show("Compare Production Cruise with Design file./nFuture Enhancement.", "Information");
        }