diff --git a/Control/Other/PasswordDialog.xaml.cs b/Control/Other/PasswordDialog.xaml.cs index 143b7e1..76c8457 100644 --- a/Control/Other/PasswordDialog.xaml.cs +++ b/Control/Other/PasswordDialog.xaml.cs @@ -170,25 +170,33 @@ namespace GeekDesk.Control.Other new Thread(() => { Thread.Sleep(time); - Dispatcher.Invoke(() => + try { - if (string.IsNullOrEmpty(P1.Password)) + Dispatcher.Invoke(() => { - P1.Focus(); - return; - } - if (string.IsNullOrEmpty(P2.Password)) - { - P2.Focus(); - return; - } - if (string.IsNullOrEmpty(P3.Password)) - { - P3.Focus(); - return; - } - P4.Focus(); - }); + try + { + if (string.IsNullOrEmpty(P1.Password)) + { + P1.Focus(); + return; + } + if (string.IsNullOrEmpty(P2.Password)) + { + P2.Focus(); + return; + } + if (string.IsNullOrEmpty(P3.Password)) + { + P3.Focus(); + return; + } + P4.Focus(); + } + catch (Exception ex) { } + }); + } + catch (Exception e2) { } }).Start(); } diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 709d9eb..f86b1db 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -77,8 +77,12 @@ namespace GeekDesk private void Window_SourceInitialized(object sender, EventArgs e) { - //禁用窗口最大化 - WindowUtil.DisableMaxWindow(this); + try + { + //禁用窗口最大化 + WindowUtil.DisableMaxWindow(this); + } + catch (Exception) { } } diff --git a/Plugins/ShowSeconds/SecondsWindow.xaml.cs b/Plugins/ShowSeconds/SecondsWindow.xaml.cs index b521795..e1dfd34 100644 --- a/Plugins/ShowSeconds/SecondsWindow.xaml.cs +++ b/Plugins/ShowSeconds/SecondsWindow.xaml.cs @@ -235,7 +235,7 @@ namespace ShowSeconds } } } - catch (Exception) { } + catch (Exception e1) { } })); } diff --git a/Task/ToDoTask.cs b/Task/ToDoTask.cs index 77bfcae..62f7c1e 100644 --- a/Task/ToDoTask.cs +++ b/Task/ToDoTask.cs @@ -49,7 +49,7 @@ namespace GeekDesk.Task } } } - catch (Exception) { } + catch (Exception e1) { } //ClearMemory(); })); }