private void btnChoose_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string fullPath = ofd.FileName; string fileName = ofd.SafeFileName; string path = fullPath.Replace(fileName, ""); txtPath.Text = fullPath; setPath = fullPath; realmlistPath = path + "\\realmlist.wtf"; } var ini = new ini(classVars.s_settingspath); ini.Write("path", setPath); }
private void button1_Click(object sender, EventArgs e) { if (checkBox1.Checked == true) { s_show_pw = "true"; } else { s_show_pw = "false"; } if (checkBox4.Checked == true) { s_autologin = "******"; } else { s_autologin = "******"; } if (checkBox5.Checked == true) { s_autoclear = "true"; } else { s_autoclear = "false"; } if (chk_OfflineMode.Checked == true) { classVars.s_lanmode = "true"; } else if (chk_OfflineMode.Checked == false) { classVars.s_lanmode = "false"; } if (checkBox3.Checked == true) { s_playandclose = "true"; } else if (checkBox3.Checked == false) { s_playandclose = "false"; } string input = textBox2.Text; string encoded = Crypto.Atom128.Encode(input); var ini = new ini(classVars.s_settingspath); classVars.s_realmlistFullContent = textBox3.Text; classVars.cl_version = comboBox1.Text; ini.Write("path", setPath); ini.Write("user", textBox1.Text); ini.Write("pass", encoded); ini.Write("show_pw", s_show_pw); ini.Write("update_checks", s_update_checks); ini.Write("playandclose", s_playandclose); ini.Write("autologin", s_autologin); ini.Write("autoclear", s_autoclear); ini.Write("clVersion", classVars.cl_version); ini.Write("lanmode", classVars.s_lanmode); ini.Write("fullrealmlist", classVars.s_realmlistFullContent); MessageBox.Show("Settings saved!"); this.Close(); }