示例#1
0
        private void radioChanged(object sender, EventArgs e)
        {
            switch ((sender as Control).Name)
            {
            case "radioChinese":
                m_select_type = TypeOfSelect.Chinese;
                break;

            case "radioPinyin":
                m_select_type = TypeOfSelect.Pinyin;
                break;

            case "radioThreeCode":
                m_select_type = TypeOfSelect.ThreeCode;
                break;
            }
            InitCitySelect();
        }
示例#2
0
        private void LoadConfig()
        {
            try
            {
                string head = "EASYFORM_";

                m_select_type = (TypeOfSelect)(int.Parse(EagleString.EagleFileIO.ValueOf(head + "CITY_METHOD")));
                InitCitySelect();
                cbCityBeg.Text = EagleString.EagleFileIO.ValueOf(head + "CITYSTART");
                combox_leave_change_select(cbCityBeg);
                cbCityEnd.Text = EagleString.EagleFileIO.ValueOf(head + "CITYEND");
                combox_leave_change_select(cbCityEnd);
                checkDirect.Checked         = (EagleString.EagleFileIO.ValueOf(head + "DIRECT") == "1");
                checkListNoSeatBunk.Checked = (EagleString.EagleFileIO.ValueOf(head + "DISPLAY_NO_SEAT_BUNK") == "1");
                checkSpecBunk.Checked       = (EagleString.EagleFileIO.ValueOf(head + "DISPLAY_SPEC_BUNK") == "1");
                checkInside.Checked         = (EagleString.EagleFileIO.ValueOf(head + "CITY_INSIDE") == "1");
                checkOutside.Checked        = (EagleString.EagleFileIO.ValueOf(head + "CITY_OUTSIDE") == "1");

                switch (m_select_type)
                {
                case TypeOfSelect.ThreeCode:
                    radioThreeCode.Checked = true;
                    radioPinyin.Checked    = false;
                    radioChinese.Checked   = false;
                    break;

                case TypeOfSelect.Pinyin:
                    radioThreeCode.Checked = false;
                    radioPinyin.Checked    = true;
                    radioChinese.Checked   = false;
                    break;

                case TypeOfSelect.Chinese:
                    radioThreeCode.Checked = false;
                    radioPinyin.Checked    = false;
                    radioChinese.Checked   = true;
                    break;
                }
            }
            catch
            {
                SaveConfig();
            }
        }