コード例 #1
0
ファイル: DocumentSB.cs プロジェクト: sm2x/StackBuilder
        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())
            {
            }
        }
コード例 #2
0
ファイル: DocumentSB.cs プロジェクト: maoguoxus/StackBuilder
 public void CreateNewHAnalysisTruckUI()
 {
     if (!CanCreateAnalysisCaseTruck)
     {
         return;
     }
     using (FormNewHAnalysis form = new FormNewHAnalysisCaseTruck(this, null))
         if (DialogResult.OK == form.ShowDialog())
         {
         }
 }