Esempio n. 1
0
        private Common.ConfigData GetCurrentConfig()
        {
            Common.ConfigData cdata = new Common.ConfigData();

            if (tbxoutpath.Text.Trim() == "")
            {
                tbxoutpath.Text = Directory.GetCurrentDirectory() + "\\";
            }

            cdata.ResolutionIndex = cbxresolution.SelectedIndex;
            cdata.FPSIndex        = cbxfps.SelectedIndex;
            cdata.Lang            = tbxlang.Text;
            cdata.X_          = (int)num_x.Value;
            cdata.Y_          = (int)num_y.Value;
            cdata.S_          = (int)num_s.Value;
            cdata.M_          = (int)num_m.Value;
            cdata.A_          = cbx_a.Checked;
            cdata.P_          = cbx_p.Checked;
            cdata.B_          = cbx_b.Checked;
            cdata.EBlacka     = (int)num_eblacka.Value;
            cdata.BSup        = cbxensup.Checked;
            cdata.BFirstBlack = cbxfblk.Checked;
            cdata.BEndBlack   = cbxeblk.Checked;
            cdata.BVSMod      = cbxenvsmod.Checked;
            cdata.OutputPath  = tbxoutpath.Text;
            return(cdata);
        }
Esempio n. 2
0
        private void LoadConfig()
        {
            _config.LoadFromFile();
            Common.ConfigData cdata = (Common.ConfigData)_config.ReadKeyO("Config", "Default");

            if (cdata != null)
            {
                UpdateUI(cdata);
            }
        }
Esempio n. 3
0
 private void UpdateUI(Common.ConfigData cdata)
 {
     cbxresolution.SelectedIndex = cdata.ResolutionIndex;
     cbxfps.SelectedIndex        = cdata.FPSIndex;
     tbxlang.Text       = cdata.Lang;
     num_x.Value        = cdata.X_;
     num_y.Value        = cdata.Y_;
     num_s.Value        = cdata.S_;
     num_m.Value        = cdata.M_;
     cbx_a.Checked      = cdata.A_;
     cbx_p.Checked      = cdata.P_;
     cbx_b.Checked      = cdata.B_;
     num_eblacka.Value  = cdata.EBlacka;
     cbxensup.Checked   = cdata.BSup;
     cbxfblk.Checked    = cdata.BFirstBlack;
     cbxeblk.Checked    = cdata.BEndBlack;
     cbxenvsmod.Checked = cdata.BVSMod;
     tbxoutpath.Text    = cdata.OutputPath;
 }
Esempio n. 4
0
 private void SaveConfig()
 {
     Common.ConfigData cdata = GetCurrentConfig();
     _config.WriteKey("Config", "Default", cdata);
     _config.SaveFromFile();
 }