diff --git a/SafeExamBrowser.Browser/BrowserApplicationController.cs b/SafeExamBrowser.Browser/BrowserApplicationController.cs index 13eb9a6c..bca41ec3 100644 --- a/SafeExamBrowser.Browser/BrowserApplicationController.cs +++ b/SafeExamBrowser.Browser/BrowserApplicationController.cs @@ -21,9 +21,9 @@ namespace SafeExamBrowser.Browser private ITaskbarButton button; private IList instances = new List(); private ISettings settings; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; - public BrowserApplicationController(ISettings settings, IUiElementFactory uiFactory) + public BrowserApplicationController(ISettings settings, IUserInterfaceFactory uiFactory) { this.settings = settings; this.uiFactory = uiFactory; diff --git a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj index b34a3b01..9624e8e7 100644 --- a/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj +++ b/SafeExamBrowser.Contracts/SafeExamBrowser.Contracts.csproj @@ -92,7 +92,7 @@ - + diff --git a/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs b/SafeExamBrowser.Contracts/UserInterface/IUserInterfaceFactory.cs similarity index 95% rename from SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs rename to SafeExamBrowser.Contracts/UserInterface/IUserInterfaceFactory.cs index 615482dd..566a99ea 100644 --- a/SafeExamBrowser.Contracts/UserInterface/IUiElementFactory.cs +++ b/SafeExamBrowser.Contracts/UserInterface/IUserInterfaceFactory.cs @@ -11,7 +11,7 @@ using SafeExamBrowser.Contracts.I18n; namespace SafeExamBrowser.Contracts.UserInterface { - public interface IUiElementFactory : IMessageBox + public interface IUserInterfaceFactory : IMessageBox { /// /// Creates a taskbar button, initialized with the given application information. diff --git a/SafeExamBrowser.Core.UnitTests/Behaviour/ShutdownControllerTests.cs b/SafeExamBrowser.Core.UnitTests/Behaviour/ShutdownControllerTests.cs index 1af3cfea..3215dc4d 100644 --- a/SafeExamBrowser.Core.UnitTests/Behaviour/ShutdownControllerTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Behaviour/ShutdownControllerTests.cs @@ -24,7 +24,7 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour private Mock loggerMock; private Mock settingsMock; private Mock textMock; - private Mock uiFactoryMock; + private Mock uiFactoryMock; private IShutdownController sut; @@ -34,7 +34,7 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour loggerMock = new Mock(); settingsMock = new Mock(); textMock = new Mock(); - uiFactoryMock = new Mock(); + uiFactoryMock = new Mock(); uiFactoryMock.Setup(f => f.CreateSplashScreen(settingsMock.Object, textMock.Object)).Returns(new Mock().Object); diff --git a/SafeExamBrowser.Core.UnitTests/Behaviour/StartupControllerTests.cs b/SafeExamBrowser.Core.UnitTests/Behaviour/StartupControllerTests.cs index 389615d3..169c6073 100644 --- a/SafeExamBrowser.Core.UnitTests/Behaviour/StartupControllerTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Behaviour/StartupControllerTests.cs @@ -25,7 +25,7 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour private Mock loggerMock; private Mock settingsMock; private Mock textMock; - private Mock uiFactoryMock; + private Mock uiFactoryMock; private IStartupController sut; @@ -35,7 +35,7 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour loggerMock = new Mock(); settingsMock = new Mock(); textMock = new Mock(); - uiFactoryMock = new Mock(); + uiFactoryMock = new Mock(); uiFactoryMock.Setup(f => f.CreateSplashScreen(settingsMock.Object, textMock.Object)).Returns(new Mock().Object); diff --git a/SafeExamBrowser.Core/Behaviour/Operations/BrowserOperation.cs b/SafeExamBrowser.Core/Behaviour/Operations/BrowserOperation.cs index 0b159e30..f6030979 100644 --- a/SafeExamBrowser.Core/Behaviour/Operations/BrowserOperation.cs +++ b/SafeExamBrowser.Core/Behaviour/Operations/BrowserOperation.cs @@ -20,7 +20,7 @@ namespace SafeExamBrowser.Core.Behaviour.Operations private IApplicationInfo browserInfo; private ILogger logger; private ITaskbar taskbar; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; public ISplashScreen SplashScreen { private get; set; } @@ -29,7 +29,7 @@ namespace SafeExamBrowser.Core.Behaviour.Operations IApplicationInfo browserInfo, ILogger logger, ITaskbar taskbar, - IUiElementFactory uiFactory) + IUserInterfaceFactory uiFactory) { this.browserController = browserController; this.browserInfo = browserInfo; diff --git a/SafeExamBrowser.Core/Behaviour/Operations/TaskbarOperation.cs b/SafeExamBrowser.Core/Behaviour/Operations/TaskbarOperation.cs index 0308d8de..591eb4e7 100644 --- a/SafeExamBrowser.Core/Behaviour/Operations/TaskbarOperation.cs +++ b/SafeExamBrowser.Core/Behaviour/Operations/TaskbarOperation.cs @@ -18,12 +18,12 @@ namespace SafeExamBrowser.Core.Behaviour.Operations { private ILogger logger; private ITaskbar taskbar; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; private INotificationInfo aboutInfo; public ISplashScreen SplashScreen { private get; set; } - public TaskbarOperation(ILogger logger, INotificationInfo aboutInfo, ITaskbar taskbar, IUiElementFactory uiFactory) + public TaskbarOperation(ILogger logger, INotificationInfo aboutInfo, ITaskbar taskbar, IUserInterfaceFactory uiFactory) { this.logger = logger; this.aboutInfo = aboutInfo; diff --git a/SafeExamBrowser.Core/Behaviour/ShutdownController.cs b/SafeExamBrowser.Core/Behaviour/ShutdownController.cs index 1cd53da7..183bc7ee 100644 --- a/SafeExamBrowser.Core/Behaviour/ShutdownController.cs +++ b/SafeExamBrowser.Core/Behaviour/ShutdownController.cs @@ -23,9 +23,9 @@ namespace SafeExamBrowser.Core.Behaviour private ISettings settings; private ISplashScreen splashScreen; private IText text; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; - public ShutdownController(ILogger logger, ISettings settings, IText text, IUiElementFactory uiFactory) + public ShutdownController(ILogger logger, ISettings settings, IText text, IUserInterfaceFactory uiFactory) { this.logger = logger; this.settings = settings; diff --git a/SafeExamBrowser.Core/Behaviour/StartupController.cs b/SafeExamBrowser.Core/Behaviour/StartupController.cs index b648d69a..4e14a326 100644 --- a/SafeExamBrowser.Core/Behaviour/StartupController.cs +++ b/SafeExamBrowser.Core/Behaviour/StartupController.cs @@ -24,11 +24,11 @@ namespace SafeExamBrowser.Core.Behaviour private ISettings settings; private ISplashScreen splashScreen; private IText text; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; private Stack stack = new Stack(); - public StartupController(ILogger logger, ISettings settings, IText text, IUiElementFactory uiFactory) + public StartupController(ILogger logger, ISettings settings, IText text, IUserInterfaceFactory uiFactory) { this.logger = logger; this.settings = settings; diff --git a/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj b/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj index 6a56eebc..452abed7 100644 --- a/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj +++ b/SafeExamBrowser.UserInterface/SafeExamBrowser.UserInterface.csproj @@ -104,7 +104,7 @@ Taskbar.xaml - + diff --git a/SafeExamBrowser.UserInterface/UiElementFactory.cs b/SafeExamBrowser.UserInterface/UserInterfaceFactory.cs similarity index 97% rename from SafeExamBrowser.UserInterface/UiElementFactory.cs rename to SafeExamBrowser.UserInterface/UserInterfaceFactory.cs index 415df723..3101f714 100644 --- a/SafeExamBrowser.UserInterface/UiElementFactory.cs +++ b/SafeExamBrowser.UserInterface/UserInterfaceFactory.cs @@ -15,7 +15,7 @@ using SafeExamBrowser.UserInterface.Controls; namespace SafeExamBrowser.UserInterface { - public class UiElementFactory : IUiElementFactory + public class UserInterfaceFactory : IUserInterfaceFactory { public ITaskbarButton CreateApplicationButton(IApplicationInfo info) { diff --git a/SafeExamBrowser.WindowsApi/NativeMethods.cs b/SafeExamBrowser.WindowsApi/NativeMethods.cs index 7e88feb2..10f16e22 100644 --- a/SafeExamBrowser.WindowsApi/NativeMethods.cs +++ b/SafeExamBrowser.WindowsApi/NativeMethods.cs @@ -128,8 +128,8 @@ namespace SafeExamBrowser.WindowsApi var handle = User32.SetWinEventHook(Constant.EVENT_SYSTEM_FOREGROUND, Constant.EVENT_SYSTEM_FOREGROUND, IntPtr.Zero, eventProc, 0, 0, Constant.WINEVENT_OUTOFCONTEXT); // IMORTANT: - // Ensures that the callback does not get garbage collected prematurely, as it will be passed to unmanaged code! - // Not doing so will result in a CallbackOnCollectedDelegate error and subsequent application crash. + // Ensures that the callback does not get garbage collected prematurely, as it will be passed to unmanaged code. + // Not doing so will result in a CallbackOnCollectedDelegate error and subsequent application crash! EventDelegates[handle] = eventProc; return handle; @@ -145,8 +145,8 @@ namespace SafeExamBrowser.WindowsApi var handle = User32.SetWinEventHook(Constant.EVENT_SYSTEM_CAPTURESTART, Constant.EVENT_SYSTEM_CAPTURESTART, IntPtr.Zero, eventProc, 0, 0, Constant.WINEVENT_OUTOFCONTEXT); // IMORTANT: - // Ensures that the callback does not get garbage collected prematurely, as it will be passed to unmanaged code! - // Not doing so will result in a CallbackOnCollectedDelegate error and subsequent application crash. + // Ensures that the callback does not get garbage collected prematurely, as it will be passed to unmanaged code. + // Not doing so will result in a CallbackOnCollectedDelegate error and subsequent application crash! EventDelegates[handle] = eventProc; return handle; diff --git a/SafeExamBrowser/CompositionRoot.cs b/SafeExamBrowser/CompositionRoot.cs index 7ad71073..f6852dc2 100644 --- a/SafeExamBrowser/CompositionRoot.cs +++ b/SafeExamBrowser/CompositionRoot.cs @@ -39,7 +39,7 @@ namespace SafeExamBrowser private ISettings settings; private IText text; private ITextResource textResource; - private IUiElementFactory uiFactory; + private IUserInterfaceFactory uiFactory; private IWindowMonitor windowMonitor; private IWorkingArea workingArea; @@ -56,7 +56,7 @@ namespace SafeExamBrowser settings = new Settings(); Taskbar = new Taskbar(); textResource = new XmlTextResource(); - uiFactory = new UiElementFactory(); + uiFactory = new UserInterfaceFactory(); logger.Subscribe(new LogFileWriter(settings));