private void AddEmail_Click(object sender, EventArgs e) { EmailInput input = new EmailInput() { Owner = this, HelpText = "Добавление email адреса", Text = "Добавление email адреса" }; input.ShowDialog(); RefreshEmailList(); Properties.Settings.Default.emails = JsonConvert.SerializeObject(Program.emails); Properties.Settings.Default.Save(); }
private void EditEmail_Click(object sender, EventArgs e) { if (EmailList.SelectedItem == null) { return; } Program.emails.Remove(EmailList.SelectedItem.ToString()); EmailInput input = new EmailInput() { Owner = this, HelpText = "Редактирование email адреса", Text = "Редактирование email адреса", Path = EmailList.SelectedItem.ToString() }; input.ShowDialog(); RefreshEmailList(); Properties.Settings.Default.emails = JsonConvert.SerializeObject(Program.emails); Properties.Settings.Default.Save(); }