From 73e0323a4f8d8bc1f3f166ea8c31cd3d3fc191e3 Mon Sep 17 00:00:00 2001 From: ziti-ci Date: Fri, 18 Dec 2020 13:57:30 -0500 Subject: [PATCH] log an exception and remove extraneous code --- DesktopEdge/MainWindow.xaml.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs index ee145be3..6c79680f 100644 --- a/DesktopEdge/MainWindow.xaml.cs +++ b/DesktopEdge/MainWindow.xaml.cs @@ -685,7 +685,7 @@ namespace ZitiDesktopEdge { } private void SetLocation() { - var desktopWorkingArea = System.Windows.SystemParameters.WorkArea; + var desktopWorkingArea = SystemParameters.WorkArea; var height = MainView.ActualHeight; @@ -735,7 +735,7 @@ namespace ZitiDesktopEdge { } } public void Placement() { - var desktopWorkingArea = System.Windows.SystemParameters.WorkArea; + var desktopWorkingArea = SystemParameters.WorkArea; if (_isAttached) { Arrow.Visibility = Visibility.Visible; IdentityMenu.Arrow.Visibility = Visibility.Visible; @@ -845,6 +845,7 @@ namespace ZitiDesktopEdge { logger.Info("Service stopped!"); } } catch(Exception ex) { + logger.Error(ex, "unexpected error: {0}", ex.Message); ShowError("Erorr Disabling Service", "An error occurred while trying to disable the data service. Is the monitor service running?"); } HideLoad(); @@ -856,7 +857,7 @@ namespace ZitiDesktopEdge { LoadingTitle.Content = title; LoadProgress.IsIndeterminate = true; LoadingScreen.Visibility = Visibility.Visible; - ((MainWindow)System.Windows.Application.Current.MainWindow).UpdateLayout(); + UpdateLayout(); }); }