private void buttonUpdate_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure you want to update the paths for ALL profiles?", "Action Confirmation", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Yes) { ControlManagement.SetControls(ControlManagement.GetControls()); SetControlList(); } }
public void ControtSetDefaultTest() { bool success = false; List <Control> defaultControls = ControlManagement.defaultControls; List <Control> oldControls = ControlManagement.GetControls(); ControlManagement.SetControls(); List <Control> newControls = ControlManagement.GetControls(); if (defaultControls.All(newControls.Contains) && defaultControls.Count == newControls.Count) { success = true; } ControlManagement.SetControls(oldControls); Assert.IsTrue(success); }
private void buttonReset_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Warning! This action will delete all of the currently saved profiles!\nAre you sure you would like to proceed", "Warning", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Yes) { ControlManagement.SetControls(); MessageBox.Show("List of profiles were set to default"); } else if (result == DialogResult.No) { MessageBox.Show("No changes were made."); } SetControlView(); SetControlList(); }