예제 #1
0
파일: Form1.cs 프로젝트: v0icer/poltools
        private void BTN_ECompileSave_Click(object sender, EventArgs e)
        {
            if (ECompileCFG == null)
            {
                try
                {
                    ECompileCFG = new EConfig();
                    ECompileCFG.LoadConfig(Settings.Global.Properties["ECompileCfgPath"]);
                }
                catch (Exception ex)
                {
                    ExceptionBox.ExceptionForm tmp = new ExceptionBox.ExceptionForm(ref ex);
                    tmp.ShowDialog(this);
                }
            }
            foreach (CheckBox ThisBox in PNL_ECompileFlags.Controls)
            {
                ECompileCFG.Option(ThisBox.Name.Substring(15), ThisBox.Checked);
            }

            foreach (TextBox ThisBox in PNL_ECompilePaths.Controls)
            {
                ECompileCFG.Option(ThisBox.Name.Substring(11), ThisBox.Text);
            }

            ECompileCFG.SaveConfig();
        }
예제 #2
0
파일: Form1.cs 프로젝트: v0icer/poltools
        private void BTN_EcompileLoad_Click(object sender, EventArgs e)
        {
            try
            {
                ECompileCFG = new EConfig();
                ECompileCFG.LoadConfig(Settings.Global.Properties["ECompileCfgPath"]);

                foreach (CheckBox ThisBox in PNL_ECompileFlags.Controls)
                {
                    ThisBox.Checked = Settings.Global.ToBoolean(ECompileCFG.Option(ThisBox.Name.Substring(15)));
                    Settings.Global.Ecompile[ThisBox.Name.Substring(15)] = ECompileCFG.Option(ThisBox.Name.Substring(15));
                }
                foreach (TextBox ThisBox in PNL_ECompilePaths.Controls)
                {
                    ThisBox.Text = ECompileCFG.Option(ThisBox.Name.Substring(11));
                    Settings.Global.Ecompile[ThisBox.Name.Substring(11)] = ECompileCFG.Option(ThisBox.Name.Substring(11));
                }
                foreach (TextBox ThisBox in PNL_ECompilePathsEditTBS.Controls)
                {
                    ThisBox.Text = ECompileCFG.Option(ThisBox.Name.Substring(20));
                    Settings.Global.Ecompile[ThisBox.Name.Substring(20)] = ECompileCFG.Option(ThisBox.Name.Substring(20));
                }
            }
            catch (Exception ex)
            {
                ExceptionBox.ExceptionForm tmp = new ExceptionBox.ExceptionForm(ref ex);
                tmp.ShowDialog(this);
            }
        }