private void buttonsavesettings_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(textBox1.Text) && textBox2.Text.Equals(textBox1.Text)) { if (!string.IsNullOrWhiteSpace(textBoxemail.Text)) { registry.SetValue("Properties", encryption.EncryptString(textBox2.Text, "2pqB7l4eRM6nHaZPtetkkHePguacGTvrMhvnE4fy")); registry.SetValue("Email", encryption.EncryptString(textBoxemail.Text, "BNKh3wQVQy")); ChangeLanguage(); textBox2.Text = ""; textBoxlocation.Text = ""; textBox1.Text = ""; HelpClass.RestartService("My Spy", 10); MessageBox.Show(ResourcesFiles.ProgramStrings.ConfiguredBody, ResourcesFiles.ProgramStrings.ConfiguredHeader); Application.Exit(); } else { MessageBox.Show(ResourcesFiles.ProgramStrings.NoEmail, ResourcesFiles.ProgramStrings.Error); } } else { MessageBox.Show(ResourcesFiles.ProgramStrings.PasswordsNotEqual, ResourcesFiles.ProgramStrings.Error); } }