Пример #1
0
        public GroupEditForm(Form form)
            : this()
        {
            InitLang();

            if (form is GroupMngForm)
            {
                this.grpForm = form as GroupMngForm;
                this.bGrp    = true;

                if (!string.IsNullOrEmpty(this.grpForm.NewGrpName))
                {
                    tbName.Text = this.grpForm.NewGrpName;
                }
                else
                {
                    tbName.Text = LangPack.GetNewGroup();
                }

                if (grpForm.isPri == "1")
                {
                    this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitle;
                }
                else
                {
                    this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitleGreen;
                }

                //this.Text = "Group Name Edit";
            }
            else if (form is BoardMngForm)
            {
                this.tbName.Width           = 180;
                this.tbName.Height          = 22;
                this.numericUpDown1.Visible = true;
                this.label2.Text            = LangPack.GetKindNum();
                this.label2.Visible         = true;
                this.brdForm = form as BoardMngForm;
                this.bGrp    = false;

                if (!string.IsNullOrEmpty(this.brdForm.BrdNewName))
                {
                    tbName.Text = this.brdForm.BrdNewName;
                    this.numericUpDown1.Value = this.brdForm.BrdKindNum;
                }
                else
                {
                    tbName.Text = LangPack.GetNewName();
                }

                if (brdForm.isPrimaryCG == "1")
                {
                    this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitle;
                }
                else
                {
                    this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitleGreen;
                }

                //this.Text = "CG Edit";
            }
        }