internal static void AskIfShowReleasePage(Settings settings, ReleaseInfo releaseInfo) { string message = string.Format("Version:{0}\r\nPublished:{1}\r\nDo you want to show the Terminals home page?", releaseInfo.Version, releaseInfo.Published); YesNoDisableResult answer = YesNoDisableForm.ShowDialog("New release is available", message); if (answer.Result == DialogResult.Yes) { ShowReleasePage(); } if (answer.Disable) { settings.NeverShowTerminalsWindow = true; } }
private bool AskToClose() { if (this.settings.WarnOnConnectionClose) { var message = Program.Resources.GetString("Areyousurethatyouwanttodisconnectfromtheactiveterminal"); var title = Program.Resources.GetString("Terminals"); var answer = YesNoDisableForm.ShowDialog(title, message); if (answer.Disable) { this.settings.WarnOnConnectionClose = false; } return(answer.Result == DialogResult.Yes); } return(true); }