private void resetButton_Click(object sender, EventArgs e) { var confirmation = MessageBox.Show("Are you sure? This will reset the Application.", "Confirm reset", MessageBoxButtons.YesNo); if (confirmation == DialogResult.Yes) { Properties.Settings.Default.Reset(); logLabel.Text = "Application will reset after restart."; logLabel.ForeColor = Color.Red; EmailrStartForm.LogLabel(logLabel, "Application will reset after restart.", Color.Red); Thread.Sleep(500); this.Close(); } }
private void saveEmailButton_Click(object sender, EventArgs e) { if (ValidateForm()) { SaveEmail(); EmailrStartForm parent = (EmailrStartForm)Owner; parent.InitializeMailSettings(); logLabel.Text = "Save ok."; logLabel.ForeColor = Color.Green; logLabel.Refresh(); Thread.Sleep(500); this.Close(); } }
private void removeSelectedMfromTButton_Click(object sender, EventArgs e) { if (!showTeamsCheckbox.Checked) { if (selectedForTeamListbox.SelectedItem != null) { PersonModel p = (PersonModel)selectedForTeamListbox.SelectedItem; teamMemberList.Remove(p); } } else { if (teamListbox.SelectedItem != null) { if (employeeInTeamListbox.SelectedItem != null) { PersonModel p = (PersonModel)employeeInTeamListbox.SelectedItem; GlobalConfig.Connection.RemoveTeamMemberFromList(p, (TeamModel)teamListbox.SelectedItem); EmailrStartForm.LoadLists(); pm.Remove(p); } } } }