From c10e141e7fbac613b675e022d645f93f2ece7eca Mon Sep 17 00:00:00 2001 From: dbuechel Date: Fri, 2 Feb 2018 09:30:41 +0100 Subject: [PATCH] SEBWIN-219: Renamed text keys for operations. --- .../Behaviour/Operations/BrowserOperation.cs | 4 +- .../Operations/ClientControllerOperation.cs | 4 +- .../Operations/ClipboardOperation.cs | 2 +- .../Operations/DisplayMonitorOperation.cs | 4 +- .../KeyboardInterceptorOperation.cs | 4 +- .../Operations/MouseInterceptorOperation.cs | 4 +- .../Operations/ProcessMonitorOperation.cs | 8 +- .../Behaviour/Operations/TaskbarOperation.cs | 4 +- .../Operations/WindowMonitorOperation.cs | 4 +- SafeExamBrowser.Contracts/I18n/TextKey.cs | 50 +++--- SafeExamBrowser.Core/I18n/Text.xml | 150 +++++++++--------- .../Operations/ConfigurationOperation.cs | 2 +- .../Operations/KioskModeOperation.cs | 4 +- .../Behaviour/Operations/ServiceOperation.cs | 4 +- 14 files changed, 124 insertions(+), 124 deletions(-) diff --git a/SafeExamBrowser.Client/Behaviour/Operations/BrowserOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/BrowserOperation.cs index 9975cfaa..f2def3b3 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/BrowserOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/BrowserOperation.cs @@ -44,7 +44,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Initializing browser..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeBrowser, true); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeBrowser, true); var browserButton = uiFactory.CreateApplicationButton(browserInfo); @@ -62,7 +62,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Terminating browser..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_TerminateBrowser, true); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_TerminateBrowser, true); browserController.Terminate(); } diff --git a/SafeExamBrowser.Client/Behaviour/Operations/ClientControllerOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/ClientControllerOperation.cs index d5c44a44..a6d223b2 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/ClientControllerOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/ClientControllerOperation.cs @@ -31,7 +31,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Starting event handling..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StartEventHandling); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StartEventHandling); controller.Start(); } @@ -44,7 +44,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Stopping event handling..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StopEventHandling); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StopEventHandling); controller.Stop(); } diff --git a/SafeExamBrowser.Client/Behaviour/Operations/ClipboardOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/ClipboardOperation.cs index f418c0c7..748afcdc 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/ClipboardOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/ClipboardOperation.cs @@ -46,7 +46,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations private void EmptyClipboard() { logger.Info("Emptying clipboard..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_EmptyClipboard); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_EmptyClipboard); nativeMethods.EmptyClipboard(); } diff --git a/SafeExamBrowser.Client/Behaviour/Operations/DisplayMonitorOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/DisplayMonitorOperation.cs index 305ae813..fcd887f0 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/DisplayMonitorOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/DisplayMonitorOperation.cs @@ -34,7 +34,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Initializing working area..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeWorkingArea); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeWorkingArea); displayMonitor.PreventSleepMode(); displayMonitor.InitializePrimaryDisplay(taskbar.GetAbsoluteHeight()); @@ -49,7 +49,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Restoring working area..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_RestoreWorkingArea); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_RestoreWorkingArea); displayMonitor.StopMonitoringDisplayChanges(); displayMonitor.ResetPrimaryDisplay(); diff --git a/SafeExamBrowser.Client/Behaviour/Operations/KeyboardInterceptorOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/KeyboardInterceptorOperation.cs index f33d57bb..abb70169 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/KeyboardInterceptorOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/KeyboardInterceptorOperation.cs @@ -37,7 +37,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Starting keyboard interception..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StartKeyboardInterception); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StartKeyboardInterception); nativeMethods.RegisterKeyboardHook(keyboardInterceptor); } @@ -50,7 +50,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Stopping keyboard interception..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StopKeyboardInterception); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StopKeyboardInterception); nativeMethods.DeregisterKeyboardHook(keyboardInterceptor); } diff --git a/SafeExamBrowser.Client/Behaviour/Operations/MouseInterceptorOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/MouseInterceptorOperation.cs index fd238313..15f8e330 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/MouseInterceptorOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/MouseInterceptorOperation.cs @@ -37,7 +37,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Starting mouse interception..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StartMouseInterception); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StartMouseInterception); nativeMethods.RegisterMouseHook(mouseInterceptor); } @@ -50,7 +50,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Stopping mouse interception..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StopMouseInterception); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StopMouseInterception); nativeMethods.DeregisterMouseHook(mouseInterceptor); } diff --git a/SafeExamBrowser.Client/Behaviour/Operations/ProcessMonitorOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/ProcessMonitorOperation.cs index 9225eefb..cb967e94 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/ProcessMonitorOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/ProcessMonitorOperation.cs @@ -31,12 +31,12 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Initializing process monitoring..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_WaitExplorerTermination, true); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_WaitExplorerTermination, true); processMonitor.CloseExplorerShell(); processMonitor.StartMonitoringExplorer(); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeProcessMonitoring); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeProcessMonitoring); // TODO } @@ -49,11 +49,11 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Stopping process monitoring..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StopProcessMonitoring); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StopProcessMonitoring); // TODO - ProgressIndicator?.UpdateText(TextKey.SplashScreen_WaitExplorerStartup, true); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_WaitExplorerStartup, true); processMonitor.StopMonitoringExplorer(); processMonitor.StartExplorerShell(); diff --git a/SafeExamBrowser.Client/Behaviour/Operations/TaskbarOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/TaskbarOperation.cs index 52842a33..06cbc4ec 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/TaskbarOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/TaskbarOperation.cs @@ -60,7 +60,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Initializing taskbar..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeTaskbar); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeTaskbar); if (settings.AllowApplicationLog) { @@ -91,7 +91,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Terminating taskbar..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_TerminateTaskbar); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_TerminateTaskbar); if (settings.AllowApplicationLog) { diff --git a/SafeExamBrowser.Client/Behaviour/Operations/WindowMonitorOperation.cs b/SafeExamBrowser.Client/Behaviour/Operations/WindowMonitorOperation.cs index 221d5cf4..514b3269 100644 --- a/SafeExamBrowser.Client/Behaviour/Operations/WindowMonitorOperation.cs +++ b/SafeExamBrowser.Client/Behaviour/Operations/WindowMonitorOperation.cs @@ -31,7 +31,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Perform() { logger.Info("Initializing window monitoring..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeWindowMonitoring); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeWindowMonitoring); windowMonitor.HideAllWindows(); windowMonitor.StartMonitoringWindows(); @@ -45,7 +45,7 @@ namespace SafeExamBrowser.Client.Behaviour.Operations public void Revert() { logger.Info("Stopping window monitoring..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_StopWindowMonitoring); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_StopWindowMonitoring); windowMonitor.StopMonitoringWindows(); windowMonitor.RestoreHiddenWindows(); diff --git a/SafeExamBrowser.Contracts/I18n/TextKey.cs b/SafeExamBrowser.Contracts/I18n/TextKey.cs index 180e3fb5..d5cf4ee6 100644 --- a/SafeExamBrowser.Contracts/I18n/TextKey.cs +++ b/SafeExamBrowser.Contracts/I18n/TextKey.cs @@ -25,34 +25,34 @@ namespace SafeExamBrowser.Contracts.I18n MessageBox_StartupErrorTitle, Notification_AboutTooltip, Notification_LogTooltip, + ProgressIndicator_CloseServiceConnection, + ProgressIndicator_EmptyClipboard, + ProgressIndicator_InitializeBrowser, + ProgressIndicator_InitializeConfiguration, + ProgressIndicator_InitializeKioskMode, + ProgressIndicator_InitializeProcessMonitoring, + ProgressIndicator_InitializeServiceConnection, + ProgressIndicator_InitializeTaskbar, + ProgressIndicator_InitializeWindowMonitoring, + ProgressIndicator_InitializeWorkingArea, + ProgressIndicator_RestoreWorkingArea, + ProgressIndicator_RevertKioskMode, + ProgressIndicator_ShutdownProcedure, + ProgressIndicator_StartEventHandling, + ProgressIndicator_StartKeyboardInterception, + ProgressIndicator_StartMouseInterception, + ProgressIndicator_StopEventHandling, + ProgressIndicator_StopKeyboardInterception, + ProgressIndicator_StopMouseInterception, + ProgressIndicator_StopProcessMonitoring, + ProgressIndicator_StopWindowMonitoring, + ProgressIndicator_TerminateBrowser, + ProgressIndicator_TerminateTaskbar, + ProgressIndicator_WaitExplorerStartup, + ProgressIndicator_WaitExplorerTermination, RuntimeWindow_ApplicationRunning, RuntimeWindow_StartSession, RuntimeWindow_StopSession, - SplashScreen_CloseServiceConnection, - SplashScreen_EmptyClipboard, - SplashScreen_InitializeBrowser, - SplashScreen_InitializeConfiguration, - SplashScreen_InitializeKioskMode, - SplashScreen_InitializeProcessMonitoring, - SplashScreen_InitializeServiceConnection, - SplashScreen_InitializeTaskbar, - SplashScreen_InitializeWindowMonitoring, - SplashScreen_InitializeWorkingArea, - SplashScreen_RestoreWorkingArea, - SplashScreen_RevertKioskMode, - SplashScreen_ShutdownProcedure, - SplashScreen_StartEventHandling, - SplashScreen_StartKeyboardInterception, - SplashScreen_StartMouseInterception, - SplashScreen_StopEventHandling, - SplashScreen_StopKeyboardInterception, - SplashScreen_StopMouseInterception, - SplashScreen_StopProcessMonitoring, - SplashScreen_StopWindowMonitoring, - SplashScreen_TerminateBrowser, - SplashScreen_TerminateTaskbar, - SplashScreen_WaitExplorerStartup, - SplashScreen_WaitExplorerTermination, SystemControl_BatteryCharged, SystemControl_BatteryCharging, SystemControl_BatteryChargeCriticalWarning, diff --git a/SafeExamBrowser.Core/I18n/Text.xml b/SafeExamBrowser.Core/I18n/Text.xml index 165de884..77ec31b0 100644 --- a/SafeExamBrowser.Core/I18n/Text.xml +++ b/SafeExamBrowser.Core/I18n/Text.xml @@ -30,6 +30,81 @@ Application Log + + Closing service connection + + + Emptying clipboard + + + Initializing browser + + + Initializing application configuration + + + Initializing kiosk mode + + + Initializing process monitoring + + + Initializing service connection + + + Initializing taskbar + + + Initializing window monitoring + + + Initializing working area + + + Restoring working area + + + Reverting kiosk mode + + + Initiating shutdown procedure + + + Starting event handling + + + Starting keyboard interception + + + Starting mouse interception + + + Stopping event handling + + + Stopping keyboard interception + + + Stopping mouse interception + + + Stopping process monitoring + + + Stopping window monitoring + + + Terminating browser + + + Terminating taskbar + + + Waiting for Windows explorer to start up + + + Waiting for Windows explorer to shut down + The application is running. @@ -39,81 +114,6 @@ Stopping current session - - Closing service connection - - - Emptying clipboard - - - Initializing browser - - - Initializing application configuration - - - Initializing kiosk mode - - - Initializing process monitoring - - - Initializing service connection - - - Initializing taskbar - - - Initializing window monitoring - - - Initializing working area - - - Restoring working area - - - Reverting kiosk mode - - - Initiating shutdown procedure - - - Starting event handling - - - Starting keyboard interception - - - Starting mouse interception - - - Stopping event handling - - - Stopping keyboard interception - - - Stopping mouse interception - - - Stopping process monitoring - - - Stopping window monitoring - - - Terminating browser - - - Terminating taskbar - - - Waiting for Windows explorer to start up - - - Waiting for Windows explorer to shut down - Plugged in, charging... (%%CHARGE%%%) diff --git a/SafeExamBrowser.Runtime/Behaviour/Operations/ConfigurationOperation.cs b/SafeExamBrowser.Runtime/Behaviour/Operations/ConfigurationOperation.cs index 7797e8aa..a0ffca2c 100644 --- a/SafeExamBrowser.Runtime/Behaviour/Operations/ConfigurationOperation.cs +++ b/SafeExamBrowser.Runtime/Behaviour/Operations/ConfigurationOperation.cs @@ -48,7 +48,7 @@ namespace SafeExamBrowser.Runtime.Behaviour.Operations public void Perform() { logger.Info("Initializing application configuration..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeConfiguration); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeConfiguration); ISettings settings; var isValidUri = TryGetSettingsUri(out Uri uri); diff --git a/SafeExamBrowser.Runtime/Behaviour/Operations/KioskModeOperation.cs b/SafeExamBrowser.Runtime/Behaviour/Operations/KioskModeOperation.cs index 5874ee8e..04c56dbc 100644 --- a/SafeExamBrowser.Runtime/Behaviour/Operations/KioskModeOperation.cs +++ b/SafeExamBrowser.Runtime/Behaviour/Operations/KioskModeOperation.cs @@ -34,7 +34,7 @@ namespace SafeExamBrowser.Runtime.Behaviour.Operations kioskMode = settingsRepository.Current.KioskMode; logger.Info($"Initializing kiosk mode '{kioskMode}'..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeKioskMode); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeKioskMode); if (kioskMode == KioskMode.CreateNewDesktop) { @@ -54,7 +54,7 @@ namespace SafeExamBrowser.Runtime.Behaviour.Operations public void Revert() { logger.Info($"Reverting kiosk mode '{kioskMode}'..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_RevertKioskMode); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_RevertKioskMode); if (kioskMode == KioskMode.CreateNewDesktop) { diff --git a/SafeExamBrowser.Runtime/Behaviour/Operations/ServiceOperation.cs b/SafeExamBrowser.Runtime/Behaviour/Operations/ServiceOperation.cs index a49a42dd..453779fa 100644 --- a/SafeExamBrowser.Runtime/Behaviour/Operations/ServiceOperation.cs +++ b/SafeExamBrowser.Runtime/Behaviour/Operations/ServiceOperation.cs @@ -39,7 +39,7 @@ namespace SafeExamBrowser.Runtime.Behaviour.Operations public void Perform() { logger.Info($"Initializing service connection..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_InitializeServiceConnection); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_InitializeServiceConnection); try { @@ -71,7 +71,7 @@ namespace SafeExamBrowser.Runtime.Behaviour.Operations public void Revert() { logger.Info("Closing service connection..."); - ProgressIndicator?.UpdateText(TextKey.SplashScreen_CloseServiceConnection); + ProgressIndicator?.UpdateText(TextKey.ProgressIndicator_CloseServiceConnection); if (serviceAvailable) {