コード例 #1
0
        private void NewPolicy( U50PolicyInfo policyInfo )
        {
            m_PolicyName.Add( policyInfo.Name );

            // U50策略01
            TreeNode newTreeNodePolicy = new TreeNode( policyInfo.Name );
            TreeNode newTreeNodePolicySub = new TreeNode( "常规选项" );
            TreeNode newTreeNodePolicySub1 = new TreeNode( "取样方法" );
            TreeNode newTreeNodePolicySub2 = new TreeNode( "形态函数" );
            TreeNode newTreeNodePolicySub3 = new TreeNode( "增强刷选" );
            newTreeNodePolicy.Nodes.Add( newTreeNodePolicySub );
            newTreeNodePolicy.Nodes.Add( newTreeNodePolicySub1 );
            newTreeNodePolicy.Nodes.Add( newTreeNodePolicySub2 );
            newTreeNodePolicy.Nodes.Add( newTreeNodePolicySub3 );


            PolicyBControl configBControl = new PolicyBControl();
            configBControl.Dock = DockStyle.Fill;
            configBControl.Visible = false;

            this.m_AllConfigControlInfo.Add( newTreeNodePolicy, configBControl );
            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub, configBControl );

            this.Panel.Controls.Add( configBControl );

            PolicyCControl configCControl = new PolicyCControl();
            configCControl.Dock = DockStyle.Fill;
            configCControl.Visible = false;
            configCControl.SetConfigPolicy( policyInfo.Policy );

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub1, configCControl );

            this.Panel.Controls.Add( configCControl );

            PolicyDControl configDControl = new PolicyDControl();
            configDControl.Dock = DockStyle.Fill;
            configDControl.Visible = false;
            configDControl.SetConfigFiltrate( policyInfo.Filtrate );

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub2, configDControl );

            this.Panel.Controls.Add( configDControl );

            PolicyEControl configEControl = new PolicyEControl();
            configEControl.Dock = DockStyle.Fill;
            configEControl.Visible = false;
            configEControl.EventButtonSetting += new EventHandler( OnEventButtonSetting );
            m_ButtonSetting.Add( configEControl, newTreeNodePolicySub2 );
            configEControl.SetConfigExtend( policyInfo.Extend );

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub3, configEControl );

            this.Panel.Controls.Add( configEControl );

            this.TreeView.Nodes.Add( newTreeNodePolicy );

            this.TreeView.SelectedNode = newTreeNodePolicy;

            m_TreeNodePolicyInfo.Add( newTreeNodePolicy, policyInfo );
        }
コード例 #2
0
        private void NewPolicy(U50PolicyInfo policyInfo)
        {
            m_PolicyName.Add(policyInfo.Name);

            // U50策略01
            TreeNode newTreeNodePolicy     = new TreeNode(policyInfo.Name);
            TreeNode newTreeNodePolicySub  = new TreeNode("常规选项");
            TreeNode newTreeNodePolicySub1 = new TreeNode("取样方法");
            TreeNode newTreeNodePolicySub2 = new TreeNode("形态函数");
            TreeNode newTreeNodePolicySub3 = new TreeNode("增强刷选");

            newTreeNodePolicy.Nodes.Add(newTreeNodePolicySub);
            newTreeNodePolicy.Nodes.Add(newTreeNodePolicySub1);
            newTreeNodePolicy.Nodes.Add(newTreeNodePolicySub2);
            newTreeNodePolicy.Nodes.Add(newTreeNodePolicySub3);


            PolicyBControl configBControl = new PolicyBControl();

            configBControl.Dock    = DockStyle.Fill;
            configBControl.Visible = false;

            this.m_AllConfigControlInfo.Add(newTreeNodePolicy, configBControl);
            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub, configBControl);

            this.Panel.Controls.Add(configBControl);

            PolicyCControl configCControl = new PolicyCControl();

            configCControl.Dock    = DockStyle.Fill;
            configCControl.Visible = false;
            configCControl.SetConfigPolicy(policyInfo.Policy);

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub1, configCControl);

            this.Panel.Controls.Add(configCControl);

            PolicyDControl configDControl = new PolicyDControl();

            configDControl.Dock    = DockStyle.Fill;
            configDControl.Visible = false;
            configDControl.SetConfigFiltrate(policyInfo.Filtrate);

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub2, configDControl);

            this.Panel.Controls.Add(configDControl);

            PolicyEControl configEControl = new PolicyEControl();

            configEControl.Dock                = DockStyle.Fill;
            configEControl.Visible             = false;
            configEControl.EventButtonSetting += new EventHandler(OnEventButtonSetting);
            m_ButtonSetting.Add(configEControl, newTreeNodePolicySub2);
            configEControl.SetConfigExtend(policyInfo.Extend);

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub3, configEControl);

            this.Panel.Controls.Add(configEControl);

            this.TreeView.Nodes.Add(newTreeNodePolicy);

            this.TreeView.SelectedNode = newTreeNodePolicy;

            m_TreeNodePolicyInfo.Add(newTreeNodePolicy, policyInfo);
        }