예제 #1
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())
            {
            }
        }
예제 #2
0
 public void CreateNewAnalysisCaseTruckUI()
 {
     if (!CanCreateAnalysisCaseTruck)
     {
         return;
     }
     using (var form = new FormNewAnalysisCaseTruck(this, null))
         if (DialogResult.OK == form.ShowDialog())
         {
         }
 }
예제 #3
0
 public AnalysisCaseTruck CreateNewAnalysisCaseTruckUI()
 {
     if (!CanCreateAnalysisCaseTruck)
     {
         return(null);
     }
     using (FormNewAnalysisCaseTruck form = new FormNewAnalysisCaseTruck(this, null))
         if (DialogResult.OK == form.ShowDialog())
         {
         }
     return(null);
 }
예제 #4
0
        public void EditAnalysis(Analysis 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 if (analysis is AnalysisPalletTruck)
            {
                form = new FormNewAnalysisPalletTruck(this, analysis);
            }
            else if (analysis is AnalysisCaseTruck)
            {
                form = new FormNewAnalysisCaseTruck(this, analysis);
            }
            else
            {
                MessageBox.Show("Unexepected analysis type!");
                return;
            }
            if (DialogResult.OK == form.ShowDialog())
            {
            }
        }