Example #1
0
        public StMsgEditForm(string msgNum, string _isPrimary)
            : this()
        {
            InitLang();

            this.msgMng = StMsgDataMng.GetMsgMng();
            this.msgNum = msgNum;

            if (this.msgNum == "Add")
            {
                bAdd = true;
                numNo.Select();
                numNo_ValueChanged(this, new EventArgs());
            }
            else
            {
                ViewData(msgNum);
                bAdd = false;
                tbName.Select();
            }

            if (_isPrimary == "1")
            {
                this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitle;
            }
            else
            {
                this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitleGreen;
            }
        }
Example #2
0
        public static StMsgDataMng GetMsgMng()
        {
            if (!bInsFlag)
            {
                bInsFlag = true;
                msgMng   = new StMsgDataMng();
            }

            return(msgMng);
        }
Example #3
0
        public StMsgMngForm(string _isPrimary)
        {
            InitializeComponent();

            msgMng = StMsgDataMng.GetMsgMng();
            InitLang();
            InitCtrl();
            this.storedIsPrimary = _isPrimary;

            if (_isPrimary == "1")
            {
                this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitle;
            }
            else
            {
                this.panel1.BackgroundImage = MewsBroad.Properties.Resources.bgTitleGreen;
            }
        }
Example #4
0
        public void Init()
        {
            //this.BackgroundImage = Util.GetBackgroundImage((byte)Util.emBackImage.grpActive);
            msgMng = StMsgDataMng.GetMsgMng();

            #region List Header
            ColumnHeader h0 = new ColumnHeader();
            h0.Text  = "";
            h0.Width = 35;
            lvMsg.Columns.Add(h0);

            ColumnHeader h2 = new ColumnHeader();
            h2.Text  = LangPack.GetMsgNum();
            h2.Width = 80;
            lvMsg.Columns.Add(h2);

            ColumnHeader h1 = new ColumnHeader();
            h1.Text  = LangPack.GetMsgName();
            h1.Width = 160;
            lvMsg.Columns.Add(h1);
            #endregion
        }
Example #5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            InitLang();
            this.stoMsg = StMsgDataMng.GetMsgMng();

            foreach (KeyValuePair <string, MsgInfo> pair in stoMsg.dicMsg)
            {
                MsgInfo msg = pair.Value;

                comboBox1.Items.Add("(" + msg.msgNum + ")" + msg.msgName);
                comboBox2.Items.Add("(" + msg.msgNum + ")" + msg.msgName);
            }

            this.numericUpDown1.Value = (decimal)Util.autoInfo.intensity;

            if (Util.autoInfo.highAuto)
            {
                this.radioButton1.Checked = true;
                RadioButton rb = new RadioButton();
                rb.Tag     = "ha";
                rb.Checked = true;
                this.radioButton1_CheckedChanged((object)rb, new EventArgs());
            }
            else
            {
                this.radioButton2.Checked = true;
                RadioButton rb = new RadioButton();
                rb.Tag     = "hm";
                rb.Checked = true;
                this.radioButton1_CheckedChanged((object)rb, new EventArgs());
            }

            if (Util.autoInfo.lowAuto)
            {
                this.radioButton3.Checked = true;
                RadioButton rb = new RadioButton();
                rb.Tag     = "la";
                rb.Checked = true;
                this.radioButton3_CheckedChanged((object)rb, new EventArgs());
            }
            else
            {
                this.radioButton4.Checked = true;
                RadioButton rb = new RadioButton();
                rb.Tag     = "lm";
                rb.Checked = true;
                this.radioButton3_CheckedChanged((object)rb, new EventArgs());
            }

            if (Util.autoInfo.highMsg != string.Empty)
            {
                this.comboBox1.SelectedItem = Util.autoInfo.highMsg;
            }

            if (Util.autoInfo.lowMsg != string.Empty)
            {
                this.comboBox2.SelectedItem = Util.autoInfo.lowMsg;
            }

            this.numericUpDown2.Value = Util.autoInfo.highTime;
            this.numericUpDown3.Value = Util.autoInfo.lowTime;
            this.checkBox1.Checked    = Util.autoInfo.highCBSUse;
            this.checkBox2.Checked    = Util.autoInfo.lowCBSUse;
        }