示例#1
0
        public SettingForm()
        {
            InitializeComponent();

            _tool = new Lib.Tool();
            try
            {
                _appConfig = (Lib.AppConfig)_tool.LoadConfig(typeof(Lib.AppConfig), _ConfigFileName);
            }
            catch (Exception)
            {
                _appConfig = new Lib.AppConfig();
                _appConfig.LoadDefault();
            }

            try
            {
                numericUpDown10c870.Value = _appConfig.Size10c870;
                numericUpDown80aaff.Value = _appConfig.Size80aaff;
                numericUpDown80ffff.Value = _appConfig.Size80ffff;
                numericUpDownd4d4d4.Value = _appConfig.Sized4d4d4;
                numericUpDownOther.Value = _appConfig.SizeOther;

                textBox10c870.Text = _appConfig.Color10c870;
                textBox80aaff.Text = _appConfig.Color80aaff;
                textBox80ffff.Text = _appConfig.Color80ffff;
                textBoxd4d4d4.Text = _appConfig.Colord4d4d4;
                textBoxOther.Text = _appConfig.ColorOther;

                checkBox10c870.Checked = _appConfig.Enable10c870;
                checkBox80aaff.Checked = _appConfig.Enable80aaff;
                checkBox80ffff.Checked = _appConfig.Enable80ffff;
                checkBoxd4d4d4.Checked = _appConfig.Enabled4d4d4;
                checkBoxOther.Checked = _appConfig.EnableOther;
                checkBoxDate.Checked = _appConfig.EnableDate;
            }
            catch(Exception)
            {
            }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            _tool = new Lib.Tool();
            try
            {
                _appConfig = (Lib.AppConfig)_tool.LoadConfig(typeof(Lib.AppConfig), _ConfigFileName);
            }
            catch (Exception)
            {
                _appConfig = new Lib.AppConfig();
                _appConfig.LoadDefault();
            }

            try
            {
                FileList();

                timer1.Start();
            }
            catch(Exception)
            { }
        }
示例#3
0
        private void SettingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            _tool.SaveConfig(_appConfig, typeof(Lib.AppConfig), _ConfigFileName);

            SettingForm settingForm = new SettingForm();
            settingForm.ShowDialog();

            _appConfig = (Lib.AppConfig)_tool.LoadConfig(typeof(Lib.AppConfig), _ConfigFileName);
        }