Пример #1
0
        private void initListVHeader(CXListView lv)
        {
            lv.Columns.Clear();
            lv.Columns.Add("操作員");
            lv.Columns.Add("操作類型");
            lv.Columns.Add("操作描述");
            lv.Columns.Add("IP");
            lv.Columns.Add("其他");

            for (int index = 0; index < lv.Columns.Count; index++)
            {
                lv.Columns[index].Width = 150;
            }
        }
Пример #2
0
        private void initListVHeader(CXListView lv)
        {
            lv.Columns.Clear();
            lv.Columns.Add("登陆名");
            lv.Columns.Add("姓名");
            lv.Columns.Add("注册时间");
            lv.Columns.Add("服务到期");
            lv.Columns.Add("操作");

            for (int index = 0; index < lv.Columns.Count; index++)
            {
                lv.Columns[index].Width = 150;
            }
        }
Пример #3
0
        private void addSubControl(Panel panel, string textLab)
        {
            int        sep = 3;
            PictureBox box = new PictureBox();

            box.Image    = PublicFunction.getImageByFile("icon1.png");
            box.SizeMode = PictureBoxSizeMode.StretchImage;
            panel.Controls.Add(box);
            box.Location = new Point(sep, sep);
            box.Size     = new Size(20, 20);
            box.Anchor   = AnchorStyles.Top | AnchorStyles.Left;

            Label lab = new Label();

            panel.Controls.Add(lab);
            lab.Text      = textLab;
            lab.AutoSize  = false;
            lab.Location  = new Point(box.Right + sep, sep);
            lab.Size      = new Size(100, 20);
            lab.TextAlign = ContentAlignment.MiddleLeft;
            lab.Font      = new Font("宋体", 10);
            lab.Anchor    = AnchorStyles.Top | AnchorStyles.Left;

            CXListView listV = new CXListView();

            panel.Controls.Add(listV);
            listV.Location = new Point(sep, box.Bottom + sep);
            listV.Size     = new Size(panel.Width - 2 * sep, panel.Height - box.Bottom - sep * 2);
            listV.Anchor   = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            listV.View     = View.Details;
            ColumnHeader head1 = listV.Columns.Add("登錄名");

            head1.Width = 200;

            ColumnHeader head2 = listV.Columns.Add("姓名");

            head2.Width = 200;

            ColumnHeader head3 = listV.Columns.Add("代理商");

            head3.Width = 200;

            ColumnHeader head4 = listV.Columns.Add("更改");

            head4.Width = 200;
        }
Пример #4
0
        public void buildControl()
        {
            // 创建条件控件
            queryPanel = new QueryPanel();
            this.Controls.Add(queryPanel);


            // 创建显示结果listview
            listV = new CXListView();
            this.Controls.Add(listV);
            initListVHeader(listV);

            // 创建翻页面板
            switchPanel = new PageSwitchPanel();
            this.Controls.Add(switchPanel);

            // 设置控件位置
            setControlPosition();
        }
Пример #5
0
        public void buildControl()
        {
            // !
            exportBtn      = new ShapeButton();
            exportBtn.Text = "导出";
            this.Controls.Add(exportBtn);

            //
            searchBox = new SearchBox();
            this.Controls.Add(searchBox);

            //
            addBtn      = new ShapeButton();
            addBtn.Text = "增加";
            this.Controls.Add(addBtn);

            //
            deleBtn      = new ShapeButton();
            deleBtn.Text = "删除";
            this.Controls.Add(deleBtn);


            //
            resetPassword      = new ShapeButton();
            resetPassword.Text = "重置密码";
            this.Controls.Add(resetPassword);

            //
            customLv = new CXListView();
            initListVHeader(customLv);
            this.Controls.Add(customLv);
            customLv.FullRowSelect = true;
            customLv.GridLines     = true;


            //
            pagePanel = new PageSwitchPanel();
            this.Controls.Add(pagePanel);
        }
Пример #6
0
        private void InitCtrl()
        {
            if (_dataList == null)
            {
                _dataList             = new CXListView();
                _dataList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

                _dataList.BackColor      = Color.FromArgb(245, 245, 245);
                _dataList.GridLines      = true;
                _dataList.CheckBoxes     = true;
                _dataList.FullRowSelect  = true;
                _dataList.SmallImageList = _imgList;
                //_dataList.Font = new Font("仿宋", 14);
                this.Controls.Add(_dataList);
            }

            if (_pageSwitchView == null)
            {
                _pageSwitchView = new PageSwitchView();
                //_pageSwitchView.BackColor = Color.Purple;
                this.Controls.Add(_pageSwitchView);
            }

            #region 管理按钮初始化
            if (_addButton == null)
            {
                _addButton      = new Button();
                _addButton.Text = "添加";

                string fileName = Path.Combine(Application.StartupPath, "Res");
                fileName = Path.Combine(fileName, "add.png");

                _addButton.Image      = Image.FromFile(fileName);
                _addButton.ImageAlign = ContentAlignment.MiddleLeft;
                _addButton.TextAlign  = ContentAlignment.MiddleRight;
                _addButton.FlatAppearance.BorderSize = 0;
                this.Controls.Add(_addButton);
            }
            if (_modiButton == null)
            {
                _modiButton      = new Button();
                _modiButton.Text = "修改";

                string fileName = Path.Combine(Application.StartupPath, "Res");
                fileName = Path.Combine(fileName, "modi.png");

                _modiButton.Image      = Image.FromFile(fileName);
                _modiButton.ImageAlign = ContentAlignment.MiddleLeft;
                _modiButton.TextAlign  = ContentAlignment.MiddleRight;
                _modiButton.FlatAppearance.BorderSize = 0;
                this.Controls.Add(_modiButton);
            }

            if (_deleButton == null)
            {
                _deleButton      = new Button();
                _deleButton.Text = "删除";

                string fileName = Path.Combine(Application.StartupPath, "Res");
                fileName = Path.Combine(fileName, "dele.png");

                _deleButton.Image      = Image.FromFile(fileName);
                _deleButton.ImageAlign = ContentAlignment.MiddleLeft;
                _deleButton.TextAlign  = ContentAlignment.MiddleRight;
                _deleButton.FlatAppearance.BorderSize = 0;
                this.Controls.Add(_deleButton);
            }

            if (_refreshButton == null)
            {
                _refreshButton      = new Button();
                _refreshButton.Text = "刷新";

                string fileName = Path.Combine(Application.StartupPath, "Res");
                fileName = Path.Combine(fileName, "reficon.png");

                _refreshButton.Image      = Image.FromFile(fileName);
                _refreshButton.ImageAlign = ContentAlignment.MiddleLeft;
                _refreshButton.TextAlign  = ContentAlignment.MiddleRight;
                _refreshButton.FlatAppearance.BorderSize = 0;
                this.Controls.Add(_refreshButton);
            }
            #endregion
        }