示例#1
0
        private void SetCtrlInit()
        {
            lvDist.Clear();
            lvDist.CheckBoxes = true;
            lvTerm.Items.Clear();
            lvTerm.CheckBoxes = true;
            btnEnd.Text       = LangPack.GetSelect();

            if (this.bGroup)
            {
                this.BackgroundImage = Util.GetBackgroundImage((byte)Util.emBackImage.grpActive);
                lbDist.Text          = LangPack.GetSelGroup();

                ColumnHeader h0 = new ColumnHeader();
                h0.Text  = "";
                h0.Width = 0;
                this.lvDist.Columns.Add(h0);

                ColumnHeader h1 = new ColumnHeader();
                h1.Text  = LangPack.GetNo();
                h1.Width = 40;
                this.lvDist.Columns.Add(h1);

                ColumnHeader h2 = new ColumnHeader();
                h2.Text  = LangPack.GetGroupName();
                h2.Width = 150;
                this.lvDist.Columns.Add(h2);

                ColumnHeader h3 = new ColumnHeader();
                h3.Text  = LangPack.GetCount();
                h3.Width = 60;
                this.lvDist.Columns.Add(h3);

                lvDist.Size    = new System.Drawing.Size(291, 583);
                lvTerm.Visible = false;
                btnEnd.Visible = false;
                ViewGroupList();

                lvDist.Sort();
            }
            else
            {
                this.BackgroundImage = Util.GetBackgroundImage((byte)Util.emBackImage.grpActive);
                lbDist.Text          = LangPack.GetSelDist();
                lbTerm.Text          = LangPack.GetSelTerm();

                ColumnHeader h0 = new ColumnHeader();
                h0.Text  = "";
                h0.Width = 30;
                this.lvDist.Columns.Add(h0);

                ColumnHeader h1 = new ColumnHeader();
                h1.Text  = LangPack.GetNo();
                h1.Width = 40;
                this.lvDist.Columns.Add(h1);

                ColumnHeader h2 = new ColumnHeader();
                h2.Text  = LangPack.GetDistName();
                h2.Width = 150;
                this.lvDist.Columns.Add(h2);

                ColumnHeader h3 = new ColumnHeader();
                h3.Text  = LangPack.GetCount();
                h3.Width = 60;
                this.lvDist.Columns.Add(h3);

                if (this.bSnGrp)
                {
                    lvDist.Size    = new System.Drawing.Size(291, 530);
                    lvTerm.Visible = false;
                    btnEnd.Visible = true;
                    ViewTermsList(true);
                }
                else
                {
                    this.BackgroundImage = Util.GetBackgroundImage((byte)Util.emBackImage.IndActive);

                    lvDist.Size    = new System.Drawing.Size(291, 200);
                    lvTerm.Visible = true;
                    btnEnd.Visible = true;
                    ViewTermsList(false);

                    lvTerm.Columns[1].Text = LangPack.GetTermName();
                    lvTerm.Columns[2].Text = LangPack.GetDistName();

                    lvTerm.Sort();
                }
            }
        }