コード例 #1
0
        public void Initialize()
        {
            m_MainTreeNode = new TreeNode( "设置" );
            m_MainTreeNodeSub = new TreeNode( "常规" );

            // 设置
            m_MainTreeNode.Nodes.Add( m_MainTreeNodeSub );

            this.TreeView.Nodes.Add( m_MainTreeNode );

            m_ConfigAControl = new PolicyAControl();
            m_ConfigAControl.Dock = DockStyle.Fill;
            m_ConfigAControl.Visible = false;
            m_ConfigAControl.NewPolicyInfo += new EventHandlerNone( ConfigAControl_NewPolicyInfo );

            this.m_AllConfigControlInfo.Add( m_MainTreeNode, m_ConfigAControl );
            this.m_AllConfigControlInfo.Add( m_MainTreeNodeSub, m_ConfigAControl );

            this.Panel.Controls.Add( m_ConfigAControl );

            if ( U50GlobalSetting.IsLoadPolicyGlobalSetting == true )
            {
                for ( int iIndex = 0; iIndex < U50GlobalSetting.PolicyInfos.Length; iIndex++ )
                    NewPolicy( U50GlobalSetting.PolicyInfos[iIndex] );
            }

            this.TreeView.SelectedNode = m_MainTreeNodeSub;
        }
コード例 #2
0
        public void Initialize()
        {
            m_MainTreeNode    = new TreeNode("设置");
            m_MainTreeNodeSub = new TreeNode("常规");

            // 设置
            m_MainTreeNode.Nodes.Add(m_MainTreeNodeSub);

            this.TreeView.Nodes.Add(m_MainTreeNode);

            m_ConfigAControl                = new PolicyAControl();
            m_ConfigAControl.Dock           = DockStyle.Fill;
            m_ConfigAControl.Visible        = false;
            m_ConfigAControl.NewPolicyInfo += new EventHandlerNone(ConfigAControl_NewPolicyInfo);

            this.m_AllConfigControlInfo.Add(m_MainTreeNode, m_ConfigAControl);
            this.m_AllConfigControlInfo.Add(m_MainTreeNodeSub, m_ConfigAControl);

            this.Panel.Controls.Add(m_ConfigAControl);

            if (U50GlobalSetting.IsLoadPolicyGlobalSetting == true)
            {
                for (int iIndex = 0; iIndex < U50GlobalSetting.PolicyInfos.Length; iIndex++)
                {
                    NewPolicy(U50GlobalSetting.PolicyInfos[iIndex]);
                }
            }

            this.TreeView.SelectedNode = m_MainTreeNodeSub;
        }