Пример #1
0
        public UserManage()
        {
            InitializeComponent();
            treeView1.mimagelist = imageList2;
            UserControl系统信息1     = new UserControl系统信息();
            UserControl系统选项1     = new UserControl系统选项();
            UserControl安全1       = new UserControl系统安全();
            UserControl系统设置1     = new UserControl系统设置();
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true);         // 双缓冲


            this.tableLayoutPanel1.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel1, true, null);
            this.tableLayoutPanel2.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel2, true, null);
            this.tableLayoutPanel3.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel3, true, null);
        }
Пример #2
0
        public UserManage()
        {
            InitializeComponent();
            treeView1.mimagelist = imageList2;
            UserControl系统信息1 = new UserControl系统信息();
            UserControl系统选项1 = new UserControl系统选项();
            UserControl安全1 = new UserControl系统安全();
            UserControl系统设置1 = new UserControl系统设置();
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
            SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲


            this.tableLayoutPanel1.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel1, true, null);
            this.tableLayoutPanel2.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel2, true, null);
            this.tableLayoutPanel3.GetType().GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this.tableLayoutPanel3, true, null);

            treeView1.Nodes.Clear();

            if (GlobeVal.mysys.language == 0)
            {
                treeView1.Nodes.Add("系统信息", "系统信息");
                treeView1.Nodes["系统信息"].StateImageIndex = 0;

                treeView1.Nodes["系统信息"].Nodes.Add("查看");



                treeView1.Nodes.Add("安全事项", "安全事项");
                treeView1.Nodes["安全事项"].StateImageIndex = 1;

                treeView1.Nodes["安全事项"].Nodes.Add("启动");


                treeView1.Nodes.Add("首选项", "首选项");
                treeView1.Nodes["首选项"].StateImageIndex = 2;

                treeView1.Nodes["首选项"].Nodes.Add("系统");

                treeView1.Nodes.Add("配置", "配置");
                treeView1.Nodes["配置"].StateImageIndex = 3;

                treeView1.Nodes["配置"].Nodes.Add("选项");
            }
            else
            {
                treeView1.Nodes.Add("System Information", "System Information");
                treeView1.Nodes["System Information"].StateImageIndex = 0;

                treeView1.Nodes["System Information"].Nodes.Add("View");

                treeView1.Nodes.Add("Security", "Security");
                treeView1.Nodes["Security"].StateImageIndex = 1;

                treeView1.Nodes["Security"].Nodes.Add("Setup");

                treeView1.Nodes.Add("Preferences", "Preferences");
                treeView1.Nodes["Preferences"].StateImageIndex = 2;

                treeView1.Nodes["Preferences"].Nodes.Add("System");

                treeView1.Nodes.Add("Configuration", "Configuration");
                treeView1.Nodes["Configuration"].StateImageIndex = 3;

                treeView1.Nodes["Configuration"].Nodes.Add("Options");
            }

        }