public void EditAnalysis(Analysis analysis)
        {
            RemoveItem(analysis);

            Form form = null;

            if (analysis is AnalysisCasePallet)
            {
                form = new FormNewAnalysisCasePallet(this, analysis);
            }
            else if (analysis is AnalysisBoxCase)
            {
                form = new FormNewAnalysisBoxCase(this, analysis);
            }
            else if (analysis is AnalysisCylinderPallet)
            {
                form = new FormNewAnalysisCylinderPallet(this, analysis);
            }
            else if (analysis is AnalysisCylinderCase)
            {
                form = new FormNewAnalysisCylinderCase(this, analysis);
            }
            else
            {
                MessageBox.Show("Unexepected analysis type!");
                return;
            }
            if (DialogResult.OK == form.ShowDialog())
            {
            }
        }
Exemple #2
0
        public void EditAnalysis(AnalysisHomo analysis)
        {
            // search for any DockContentAnalysis window and close it
            var seq = (from view in Views
                       where view is DockContentAnalysisEdit && analysis == (view as DockContentAnalysisEdit).Analysis
                       select view);

            if (seq.Count() > 0)
            {
                seq.First().Close();
            }

            // instantiate a form to edit analysis
            Form form = null;

            if (analysis is AnalysisCasePallet analysisCasePallet)
            {
                form = new FormNewAnalysisCasePallet(this, analysisCasePallet);
            }
            else if (analysis is AnalysisBoxCase analysisBoxCase)
            {
                form = new FormNewAnalysisBoxCase(this, analysisBoxCase);
            }
            else if (analysis is AnalysisCylinderPallet analysisCylinderPallet)
            {
                form = new FormNewAnalysisCylinderPallet(this, analysisCylinderPallet);
            }
            else if (analysis is AnalysisCylinderCase analysisCylinderCase)
            {
                form = new FormNewAnalysisCylinderCase(this, analysisCylinderCase);
            }
            else if (analysis is AnalysisPalletTruck analysisPalletTruck)
            {
                form = new FormNewAnalysisPalletTruck(this, analysisPalletTruck);
            }
            else if (analysis is AnalysisCaseTruck analysisCaseTruck)
            {
                form = new FormNewAnalysisCaseTruck(this, analysisCaseTruck);
            }
            else if (analysis is AnalysisCylinderTruck analysisCylinderTruck)
            {
                form = new FormNewAnalysisCylinderTruck(this, analysisCylinderTruck);
            }
            else if (analysis is AnalysisHCylPallet analysisHCylPallet)
            {
                form = new FormNewAnalysisHCylPallet(this, analysisHCylPallet);
            }
            else if (analysis is AnalysisHCylTruck analysisHCylTruck)
            {
                form = new FormNewAnalysisHCylTruck(this, analysisHCylTruck);
            }
            else
            {
                MessageBox.Show("Unexepected analysis type!");
                return;
            }
            if (DialogResult.OK == form.ShowDialog())
            {
            }
        }
Exemple #3
0
 public void CreateNewAnalysisCylinderCaseUI()
 {
     if (!CanCreateAnalysisCylinderCase)
     {
         return;
     }
     using (FormNewAnalysisCylinderCase form = new FormNewAnalysisCylinderCase(this, null))
         if (DialogResult.OK == form.ShowDialog())
         {
         }
 }