public CoreEnvelopeAtithmeticManageForm(MainForm form)
        {
            InitializeComponent();
            mainForm = form;
            WeightParameter.ResetWeightParameterList();

            treeViewArithmeticList.ImageList = imageListTreeView;

            //if (!System.IO.Directory.Exists("CenterofGravityEnvelopeMethod"))
            //{
            //    MessageBox.Show("不存在 CenterofGravityEnvelopeMethod 目录!");
            //    Close();
            //    return;
            //}

            Dictionary <string, string> waItems = GetArithmeticItems();

            TreeNode rootnode1 = treeViewArithmeticList.Nodes.Add("CenterofGravityEnvelopeMethod", "重心包线算法", 0, 1);

            foreach (KeyValuePair <string, string> pair in waItems)
            {
                rootnode1.Nodes.Add(pair.Value, pair.Key, 4, 5);
            }

            rootnode1.ExpandAll();

            if (mainForm == null)
            {
                return;
            }
            DesignProjectData dpData = mainForm.designProjectData;

            if (dpData == null)
            {
                return;
            }
            if (dpData.lstCoreEnvelopeDesign != null)
            {
                TreeNode rootnode2 = treeViewArithmeticList.Nodes.Add("设计结果列表", "设计结果列表", 0, 1);
                foreach (CoreEnvelopeArithmetic wa in dpData.lstCoreEnvelopeDesign)
                {
                    TreeNode node = rootnode2.Nodes.Add(wa.DataName, wa.DataName, 4, 5);
                    node.Tag = wa;
                }
                rootnode2.Expand();
            }
        }
コード例 #2
0
 public WeightArithmeticManageForm(MainForm form)
 {
     InitializeComponent();
     mainForm = form;
     WeightParameter.ResetWeightParameterList();
 }