public void NewPolicy()
        {
            if ( m_IsInitializing == false )
                ConfigForm_Load( this, EventArgs.Empty );

            U50PolicyInfo policyInfo = new U50PolicyInfo();
            policyInfo.Guid = Guid.NewGuid().ToString();

            do
            {
                policyInfo.Name = string.Format( "U50策略{0}", m_PolicyCount++ );

                if ( m_PolicyName.Contains( policyInfo.Name ) == false )
                    break;
            } while ( true );

            // 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 { Dock = DockStyle.Fill, Visible = false };

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

            this.Panel.Controls.Add( configBControl );

            PolicyCControl configCControl = new PolicyCControl { Dock = DockStyle.Fill, Visible = false };
            policyInfo.Policy = configCControl.GetConfigPolicy();

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub1, configCControl );

            this.Panel.Controls.Add( configCControl );

            PolicyDControl configDControl = new PolicyDControl { Dock = DockStyle.Fill, Visible = false };
            policyInfo.Filtrate = configDControl.GetConfigFiltrate();

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub2, configDControl );

            this.Panel.Controls.Add( configDControl );

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

            this.m_AllConfigControlInfo.Add( newTreeNodePolicySub3, configEControl );

            this.Panel.Controls.Add( configEControl );

            this.TreeView.Nodes.Add( newTreeNodePolicy );

            this.TreeView.SelectedNode = newTreeNodePolicy;

            m_NewTreeNode.Add( newTreeNodePolicy );

            m_TreeNodePolicyInfo.Add( newTreeNodePolicy, policyInfo );
        }
        public void NewPolicy()
        {
            if (m_IsInitializing == false)
            {
                ConfigForm_Load(this, EventArgs.Empty);
            }

            U50PolicyInfo policyInfo = new U50PolicyInfo();

            policyInfo.Guid = Guid.NewGuid().ToString();

            do
            {
                policyInfo.Name = string.Format("U50策略{0}", m_PolicyCount++);

                if (m_PolicyName.Contains(policyInfo.Name) == false)
                {
                    break;
                }
            } while (true);

            // 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 {
                Dock = DockStyle.Fill, Visible = false
            };

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

            this.Panel.Controls.Add(configBControl);

            PolicyCControl configCControl = new PolicyCControl {
                Dock = DockStyle.Fill, Visible = false
            };

            policyInfo.Policy = configCControl.GetConfigPolicy();

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub1, configCControl);

            this.Panel.Controls.Add(configCControl);

            PolicyDControl configDControl = new PolicyDControl {
                Dock = DockStyle.Fill, Visible = false
            };

            policyInfo.Filtrate = configDControl.GetConfigFiltrate();

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub2, configDControl);

            this.Panel.Controls.Add(configDControl);

            PolicyEControl configEControl = new PolicyEControl {
                Dock = DockStyle.Fill, Visible = false
            };

            configEControl.EventButtonSetting += new EventHandler(OnEventButtonSetting);
            m_ButtonSetting.Add(configEControl, newTreeNodePolicySub2);
            policyInfo.Extend = configEControl.GetConfigExtend();

            this.m_AllConfigControlInfo.Add(newTreeNodePolicySub3, configEControl);

            this.Panel.Controls.Add(configEControl);

            this.TreeView.Nodes.Add(newTreeNodePolicy);

            this.TreeView.SelectedNode = newTreeNodePolicy;

            m_NewTreeNode.Add(newTreeNodePolicy);

            m_TreeNodePolicyInfo.Add(newTreeNodePolicy, policyInfo);
        }
        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 );
        }
        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);
        }