コード例 #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 CreateNewHAnalysisPalletUI()
 {
     if (!CanCreateAnalysisCasePallet)
     {
         return;
     }
     using (FormNewHAnalysis form = new FormNewHAnalysisCasePallet(this, null))
         if (DialogResult.OK == form.ShowDialog())
         {
         }
 }
コード例 #3
0
        public HAnalysis CreateNewHAnalysisPalletUI()
        {
            if (!CanCreateAnalysisCasePallet)
            {
                return(null);
            }
            FormNewHAnalysis form = new FormNewHAnalysisCasePallet(this, null);

            if (DialogResult.OK == form.ShowDialog())
            {
            }
            return(null);
        }