mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-06 14:34:05 +02:00
Fix some dialogs not having default enter/escape actions
This commit is contained in:
parent
cf525a3929
commit
dee99caa7d
@ -278,7 +278,7 @@ private void soundNotification_PlaybackError(object sender, PlaybackErrorEventAr
|
||||
e.Ignore = true;
|
||||
|
||||
using(FormMessage form = new FormMessage("Notification Sound Error", "Could not play custom notification sound."+Environment.NewLine+e.Message, MessageBoxIcon.Error)){
|
||||
form.AddButton("Ignore");
|
||||
form.CancelButton = form.AddButton("Ignore");
|
||||
|
||||
Button btnOpenSettings = form.AddButton("Open Settings");
|
||||
btnOpenSettings.Width += 16;
|
||||
|
@ -76,8 +76,8 @@ private static void Main(){
|
||||
}
|
||||
else if (attempt == 20){
|
||||
using(FormMessage form = new FormMessage(BrandName+" Cannot Restart", BrandName+" is taking too long to close.", MessageBoxIcon.Warning)){
|
||||
form.AddButton("Exit");
|
||||
form.AddButton("Retry", DialogResult.Retry);
|
||||
form.CancelButton = form.AddButton("Exit");
|
||||
form.ActiveControl = form.AddButton("Retry", DialogResult.Retry);
|
||||
|
||||
if (form.ShowDialog() == DialogResult.Retry){
|
||||
attempt /= 2;
|
||||
|
11
Reporter.cs
11
Reporter.cs
@ -47,8 +47,13 @@ public void HandleException(string caption, string message, bool canIgnore, Exce
|
||||
bool loggedSuccessfully = Log(e.ToString());
|
||||
|
||||
FormMessage form = new FormMessage(caption, message+"\r\nError: "+e.Message, canIgnore ? MessageBoxIcon.Warning : MessageBoxIcon.Error);
|
||||
form.AddButton("Exit");
|
||||
form.AddButton("Ignore", DialogResult.Ignore).Enabled = canIgnore;
|
||||
|
||||
Button btnExit = form.AddButton("Exit");
|
||||
Button btnIgnore = form.AddButton("Ignore", DialogResult.Ignore);
|
||||
|
||||
btnIgnore.Enabled = canIgnore;
|
||||
form.ActiveControl = canIgnore ? btnIgnore : btnExit;
|
||||
form.CancelButton = btnIgnore;
|
||||
|
||||
Button btnOpenLog = new Button{
|
||||
Anchor = AnchorStyles.Bottom | AnchorStyles.Left,
|
||||
@ -83,7 +88,7 @@ public static void HandleEarlyFailure(string caption, string message){
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
FormMessage form = new FormMessage(caption, message, MessageBoxIcon.Error);
|
||||
form.AddButton("Exit");
|
||||
form.ActiveControl = form.AddButton("Exit");
|
||||
form.ShowDialog();
|
||||
|
||||
try{
|
||||
|
Loading…
Reference in New Issue
Block a user