From d569b3392b1bc4e91956c3099ae7741252bec003 Mon Sep 17 00:00:00 2001 From: Mahmood Ramzani Date: Fri, 16 Oct 2015 17:43:53 +0330 Subject: [PATCH] progress in #41 --- IndustrialMonitoring/ChartLiveData.xaml.cs | 8 -- IndustrialMonitoring/DialogSetTime.xaml.cs | 6 +- IndustrialMonitoring/MainWindow.xaml.cs | 82 +++++++++---------- .../WindowChangePassword.xaml.cs | 2 +- .../WindowChartHistory.xaml.cs | 22 ++--- IndustrialMonitoring/WindowHorn.xaml.cs | 6 +- IndustrialMonitoring/WindowLogin.xaml.cs | 10 +-- .../WindowNotifications.xaml.cs | 16 ++-- 8 files changed, 72 insertions(+), 80 deletions(-) diff --git a/IndustrialMonitoring/ChartLiveData.xaml.cs b/IndustrialMonitoring/ChartLiveData.xaml.cs index c3d4798..f0fd794 100644 --- a/IndustrialMonitoring/ChartLiveData.xaml.cs +++ b/IndustrialMonitoring/ChartLiveData.xaml.cs @@ -147,7 +147,6 @@ private void InitChart() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -160,7 +159,6 @@ private void AIO_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -182,7 +180,6 @@ public void Start() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -197,7 +194,6 @@ public void Stop() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -218,7 +214,6 @@ private void ShowLiveData(object state) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -265,7 +260,6 @@ private void ShowLiveDataUI() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -280,7 +274,6 @@ private void ShowAnimation(object state) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } @@ -306,7 +299,6 @@ private void ShowAnimationUI() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); } } } diff --git a/IndustrialMonitoring/DialogSetTime.xaml.cs b/IndustrialMonitoring/DialogSetTime.xaml.cs index 6e64555..ed124ac 100644 --- a/IndustrialMonitoring/DialogSetTime.xaml.cs +++ b/IndustrialMonitoring/DialogSetTime.xaml.cs @@ -55,7 +55,7 @@ private void ApplyTime() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -69,7 +69,7 @@ private void DialogSetTime_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -83,7 +83,7 @@ private void ButtonApply_OnClick(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } } diff --git a/IndustrialMonitoring/MainWindow.xaml.cs b/IndustrialMonitoring/MainWindow.xaml.cs index 5754d99..f53049b 100644 --- a/IndustrialMonitoring/MainWindow.xaml.cs +++ b/IndustrialMonitoring/MainWindow.xaml.cs @@ -97,7 +97,7 @@ private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -118,7 +118,7 @@ private void Resume() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -136,7 +136,7 @@ private void StartAsync() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -151,7 +151,7 @@ void MainWindow_StartAsyncCompleted(object sender, EventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -177,7 +177,7 @@ private void Start() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -238,7 +238,7 @@ private void GenerateTab(Tab1 tabsViewModel) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -265,7 +265,7 @@ void chartLiveData_MouseDoubleClick(object sender, MouseButtonEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -280,7 +280,7 @@ private void ShowMsgOnStatusBar(string msg) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -293,7 +293,7 @@ private void ClearStatusBar() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -306,7 +306,7 @@ private void StatusBarBottom_OnMouseDoubleClick(object sender, MouseButtonEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -360,7 +360,7 @@ private void MenuItemAddItem_Click(object sender, Telerik.Windows.RadRoutedEvent catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -377,7 +377,7 @@ private void MenuItemClearItems_Click(object sender, Telerik.Windows.RadRoutedEv catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -418,7 +418,7 @@ private void OpenWindowChartHistoryInCompareMode(ChartType chartType) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -445,7 +445,7 @@ private void MenuItemStart_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -462,7 +462,7 @@ private void InitializeHorn() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -519,7 +519,7 @@ private void CheckNotifications(object state) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -543,7 +543,7 @@ private void MenuItemStop_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -584,7 +584,7 @@ private void MenuItemGrid_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -600,7 +600,7 @@ private void MenuItemCompareData_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -621,7 +621,7 @@ private void MenuItemShowNotifications_OnClick(object sender, RadRoutedEventArgs catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -661,7 +661,7 @@ private void MenuItemShowNotificationForCurrentItem_OnClick(object sender, RadRo catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -674,7 +674,7 @@ private void MenuItemLineSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -719,7 +719,7 @@ private void OpenWindowsCharthistory(ChartType chartType) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -732,7 +732,7 @@ private void MenuItemSplineSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -745,7 +745,7 @@ private void MenuItemStepLineSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -758,7 +758,7 @@ private void MenuItemPointSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -771,7 +771,7 @@ private void MenuItemAreaSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -784,7 +784,7 @@ private void MenuItemSplineAreaSeries_OnClick(object sender, RadRoutedEventArgs catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -797,7 +797,7 @@ private void MenuItemStepAreaSeries_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -810,7 +810,7 @@ private void ContextMenuItemLineSeriesCompare_OnClick(object sender, RadRoutedEv catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -823,7 +823,7 @@ private void ContextMenuItemSplineSeriesCompare_OnClick(object sender, RadRouted catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -836,7 +836,7 @@ private void ContextMenuItemStepLineSeriesCompare_OnClick(object sender, RadRout catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -849,7 +849,7 @@ private void ContextMenuItemPointSeriesCompare_OnClick(object sender, RadRoutedE catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -862,7 +862,7 @@ private void ContextMenuItemAreaSeriesCompare_OnClick(object sender, RadRoutedEv catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -875,7 +875,7 @@ private void ContextMenuItemSplineAreaSeriesCompare_OnClick(object sender, RadRo catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -888,7 +888,7 @@ private void ContextMenuItemStepAreaSeriesCompare_OnClick(object sender, RadRout catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -908,7 +908,7 @@ private void MenuItemChangePasswordWindow_OnClick(object sender, RadRoutedEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -931,7 +931,7 @@ private void MenuItemTools_OnSubmenuOpened(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -944,7 +944,7 @@ private void MenuItemIssues_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -957,7 +957,7 @@ private void MenuItemNewIssue_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -972,7 +972,7 @@ private void MenuItemHorn_OnClick(object sender, RadRoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } } diff --git a/IndustrialMonitoring/WindowChangePassword.xaml.cs b/IndustrialMonitoring/WindowChangePassword.xaml.cs index 19febdb..0bc2536 100644 --- a/IndustrialMonitoring/WindowChangePassword.xaml.cs +++ b/IndustrialMonitoring/WindowChangePassword.xaml.cs @@ -103,7 +103,7 @@ private bool ChangePassword() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + return false; } } diff --git a/IndustrialMonitoring/WindowChartHistory.xaml.cs b/IndustrialMonitoring/WindowChartHistory.xaml.cs index 4b70858..9779e82 100644 --- a/IndustrialMonitoring/WindowChartHistory.xaml.cs +++ b/IndustrialMonitoring/WindowChartHistory.xaml.cs @@ -181,7 +181,7 @@ private void InitChart() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -196,7 +196,7 @@ private void WindowChartHistory_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -258,7 +258,7 @@ void WindowChartHistory_ShowDataCompleted(object sender, ShowDataCompletedEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -279,7 +279,7 @@ public void ShowData(bool generateLegend = true) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -295,7 +295,7 @@ private void ShowDataAsync(KeyValuePair itemId, bool generateLegend) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -308,7 +308,7 @@ private void StatusBarBottom_OnMouseDoubleClick(object sender, MouseButtonEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -323,7 +323,7 @@ private void ShowMsgOnStatusBar(string msg) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -336,7 +336,7 @@ private void ClearStatusBar() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -351,7 +351,7 @@ void dialogSetTime_TimeChanged(object sender, Lib.TimeChangedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -394,7 +394,7 @@ private void MenuItemShowSetTimeDialog_OnMouseEnter(object sender, MouseEventArg catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -411,7 +411,7 @@ private void MenuItemShowSetTimeDialog_OnClick(object sender, RadRoutedEventArgs catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } } diff --git a/IndustrialMonitoring/WindowHorn.xaml.cs b/IndustrialMonitoring/WindowHorn.xaml.cs index 87b4bb8..5217af4 100644 --- a/IndustrialMonitoring/WindowHorn.xaml.cs +++ b/IndustrialMonitoring/WindowHorn.xaml.cs @@ -78,7 +78,7 @@ private void WindowHorn_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -98,7 +98,7 @@ private void PowerButtonState_OnValueChanged(object sender, RoutedPropertyChange catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -120,7 +120,7 @@ private void PowerButtonState_OnClick(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } } diff --git a/IndustrialMonitoring/WindowLogin.xaml.cs b/IndustrialMonitoring/WindowLogin.xaml.cs index 2861878..5a9bccc 100644 --- a/IndustrialMonitoring/WindowLogin.xaml.cs +++ b/IndustrialMonitoring/WindowLogin.xaml.cs @@ -63,7 +63,7 @@ private void ButtonLogin_OnClick(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -78,7 +78,7 @@ private void ShowMsgOnStatusBar(string msg) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -91,7 +91,7 @@ private void ClearStatusBar() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -104,7 +104,7 @@ private void StatusBarBottom_OnMouseDoubleClick(object sender, MouseButtonEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -117,7 +117,7 @@ private void WindowLogin_OnLoaded(object sender, RoutedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } } diff --git a/IndustrialMonitoring/WindowNotifications.xaml.cs b/IndustrialMonitoring/WindowNotifications.xaml.cs index 620051d..0d0f25e 100644 --- a/IndustrialMonitoring/WindowNotifications.xaml.cs +++ b/IndustrialMonitoring/WindowNotifications.xaml.cs @@ -80,7 +80,7 @@ private void MenuItemShowSetTimeDialog_OnClick(object sender, Telerik.Windows.Ra catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -96,7 +96,7 @@ void dialogSetTime_TimeChanged(object sender, Lib.TimeChangedEventArgs e) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -140,7 +140,7 @@ private void MenuItemShowSetTimeDialog_OnMouseEnter(object sender, MouseEventArg catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -153,7 +153,7 @@ private void StatusBarBottom_OnMouseDoubleClick(object sender, MouseButtonEventA catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -185,7 +185,7 @@ void WindowNotifications_ShowDataCompleted(object sender, ShowNotificationsCompl catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -207,7 +207,7 @@ public void ShowData() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -242,7 +242,7 @@ private void ShowDataAsync() catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } @@ -257,7 +257,7 @@ private void ShowMsgOnStatusBar(string msg) catch (Exception ex) { Logger.LogIndustrialMonitoring(ex); - MessageBox.Show(ex.Message); + } } }