public void CreateNewAnalysisBoxCaseUI() { if (!CanCreateAnalysisBoxCase && !CanCreateAnalysisBundleCase) { return; } FormNewAnalysisBoxCase form = new FormNewAnalysisBoxCase(this, null); if (DialogResult.OK == form.ShowDialog()) { } }
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) { 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 if (analysis is AnalysisCylinderTruck) { form = new FormNewAnalysisCylinderTruck(this, analysis); } else { MessageBox.Show("Unexepected analysis type!"); return; } if (DialogResult.OK == form.ShowDialog()) { } }
public AnalysisBoxCase CreateNewAnalysisBoxCaseUI() { if (!CanCreateAnalysisBoxCase) { return(null); } FormNewAnalysisBoxCase form = new FormNewAnalysisBoxCase(this, null); if (DialogResult.OK == form.ShowDialog()) { } return(null); }
public BoxCaseAnalysis CreateNewBoxCaseAnalysisUI() { if (!CanCreateBoxCaseAnalysis) { return(null); } FormNewAnalysisBoxCase form = new FormNewAnalysisBoxCase(this, null); if (DialogResult.OK == form.ShowDialog()) { } return(null); /* * // build constraint set * BoxCaseConstraintSet constraintSet = new BoxCaseConstraintSet(); * // allowed axes * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_X_N, form.AllowVerticalX); * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_X_P, form.AllowVerticalX); * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_Y_N, form.AllowVerticalY); * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_Y_P, form.AllowVerticalY); * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_Z_N, form.AllowVerticalZ); * constraintSet.SetAllowedOrthoAxis(HalfAxis.HAxis.AXIS_Z_P, form.AllowVerticalZ); * // maximum case weight * constraintSet.UseMaximumCaseWeight = form.UseMaximumCaseWeight; * constraintSet.MaximumCaseWeight = form.MaximumCaseWeight; * // maximum number of items * constraintSet.UseMaximumNumberOfBoxes = form.UseMaximumNumberOfBoxes; * constraintSet.MaximumNumberOfBoxes = form.MaximumNumberOfBoxes; * * return CreateNewBoxCaseAnalysis(form.AnalysisName, form.AnalysisDescription * , form.SelectedBox, form.SelectedCase * , constraintSet * , new BoxCaseSolver()); */ }
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()) { } }