public void EditAnalysis(AnalysisHetero analysis) { // search for DockContentHAnalysis window and close it var seq = (from view in Views where view is DockContentHAnalysisCasePallet && (analysis == (view as DockContentHAnalysisCasePallet).Analysis) select view); if (seq.Count() > 0) { seq.First().Close(); } // instantiate a form to edit analysis Form form = null; if (analysis is HAnalysisPallet) { form = new FormNewHAnalysisCasePallet(this, analysis); } else if (analysis is HAnalysisTruck) { form = new FormNewHAnalysisCaseTruck(this, analysis); } else { MessageBox.Show("Unexpected analysis type!"); return; } if (DialogResult.OK == form.ShowDialog()) { } }
public void CreateNewHAnalysisPalletUI() { if (!CanCreateAnalysisCasePallet) { return; } using (FormNewHAnalysis form = new FormNewHAnalysisCasePallet(this, null)) if (DialogResult.OK == form.ShowDialog()) { } }
public HAnalysis CreateNewHAnalysisPalletUI() { if (!CanCreateAnalysisCasePallet) { return(null); } FormNewHAnalysis form = new FormNewHAnalysisCasePallet(this, null); if (DialogResult.OK == form.ShowDialog()) { } return(null); }