private void checkBoxCleanMode_Checked(object sender, RoutedEventArgs e) { if (!UserSettings.All.ExtractDoNotPromptClean) { var dialog = new AwesomeDialog(); dialog.Title = checkBoxCleanMode.Content as string; dialog.Message = checkBoxCleanMode.ToolTip as string; dialog.AwesomeIcon = FontAwesome.WPF.FontAwesomeIcon.Warning; dialog.ButtonTags = ButtonTag.Cancel | ButtonTag.Confirm; dialog.ShowDoNotPromptCheckBox = true; dialog.ShowDialog(this); UserSettings.All.ExtractDoNotPromptClean = dialog.DoNotPromptResult; if (dialog.Result != ButtonTag.Confirm) { checkBoxCleanMode.IsChecked = false; } } }
private void buttonResetDoNotPrompt_Click(object sender, RoutedEventArgs e) { var all = UserSettings.All; all.ExtractDoNotPromptClean = false; var dialog = new AwesomeDialog(); if (Application.Current.Resources.Contains("Options.ResetDoNotPrompt.Message")) { dialog.Message = (string)Application.Current.FindResource("Options.ResetDoNotPrompt.Message"); } else { dialog.Message = "All Do-Not-Prompt dialogs have been reset."; } dialog.ShowDialog(this); }
private void buttonAutoWSModsDir_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrWhiteSpace(RimWorldHelper.WorkshopModsDir) || !Directory.Exists(RimWorldHelper.WorkshopModsDir)) { var dialog = new AwesomeDialog(); if (Application.Current.Resources.Contains("Options.Message.DirectoryNoFound")) { dialog.Message = (string)Application.Current.FindResource("Options.Message.DirectoryNoFound"); } else { dialog.Message = "RimWorld install directory or Steam Workshop Mods Directory on found. This can be caused by several problems. You could custom in options."; } dialog.ShowDialog(this); } else { UserSettings.All.WorkshopModsDir = RimWorldHelper.WorkshopModsDir; } }
public static void StartUp() { if (string.IsNullOrWhiteSpace(All.RimWorldInstallDir)) { All.RimWorldInstallDir = RimWorldHelper.RimWorldInstallDir; } if (string.IsNullOrWhiteSpace(All.WorkshopModsDir)) { All.WorkshopModsDir = RimWorldHelper.WorkshopModsDir; } if (!All.OptionsDoNotPromptDirNoFound && (string.IsNullOrWhiteSpace(All.RimWorldInstallDir) || !Directory.Exists(All.RimWorldInstallDir) || string.IsNullOrWhiteSpace(All.WorkshopModsDir) || !Directory.Exists(All.WorkshopModsDir))) { var dialog = new AwesomeDialog(); if (Application.Current.Resources.Contains("Common.Warning")) { dialog.Title = (string)Application.Current.FindResource("Common.Warning"); } else { dialog.Title = "Warning"; } if (Application.Current.Resources.Contains("Options.Message.DirectoryNoFound")) { dialog.Message = (string)Application.Current.FindResource("Options.Message.DirectoryNoFound"); } else { dialog.Message = "RimWorld install directory or Steam Workshop Mods Directory on found. This can be caused by several problems. You could custom in options."; } dialog.AwesomeIcon = FontAwesome.WPF.FontAwesomeIcon.Warning; dialog.ButtonTags = ButtonTag.Confirm; dialog.WindowStartupLocation = WindowStartupLocation.CenterScreen; dialog.ShowDoNotPromptCheckBox = true; dialog.ShowDialog(); All.OptionsDoNotPromptDirNoFound = dialog.DoNotPromptResult; } }