/// <summary> /// Create an instance of the confirmDeleteForm.xaml /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ResetValues_Button(object sender, RoutedEventArgs e) { ConfirmDelete confirmDeleteForm = new ConfirmDelete("Are you sure you want to delete" + Environment.NewLine + "all values?"); confirmDeleteForm.Topmost = true; confirmDeleteForm.WindowStartupLocation = WindowStartupLocation.CenterScreen; var result = confirmDeleteForm.ShowDialog(); if ((bool)result) { ResetValues.reset(); } }
private void Button1_Click(object sender, RoutedEventArgs e) { //If yes reset all values and close form ResetValues.reset(); this.Close(); }