diff --git a/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs b/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs
index 58956511..3937cc2b 100644
--- a/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs
+++ b/SafeExamBrowser.Applications.Contracts/Events/IconChangedEventHandler.cs
@@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
namespace SafeExamBrowser.Applications.Contracts.Events
{
diff --git a/SafeExamBrowser.Applications.Contracts/IApplication.cs b/SafeExamBrowser.Applications.Contracts/IApplication.cs
index 78cad9f9..da34f1fa 100644
--- a/SafeExamBrowser.Applications.Contracts/IApplication.cs
+++ b/SafeExamBrowser.Applications.Contracts/IApplication.cs
@@ -9,7 +9,7 @@
using System;
using System.Collections.Generic;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
namespace SafeExamBrowser.Applications.Contracts
{
diff --git a/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs b/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs
index 0f99b0bf..4c1cb947 100644
--- a/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs
+++ b/SafeExamBrowser.Applications.Contracts/IApplicationWindow.cs
@@ -8,7 +8,7 @@
using System;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
namespace SafeExamBrowser.Applications.Contracts
{
diff --git a/SafeExamBrowser.Applications.Contracts/SafeExamBrowser.Applications.Contracts.csproj b/SafeExamBrowser.Applications.Contracts/SafeExamBrowser.Applications.Contracts.csproj
index 5af534be..09a77d78 100644
--- a/SafeExamBrowser.Applications.Contracts/SafeExamBrowser.Applications.Contracts.csproj
+++ b/SafeExamBrowser.Applications.Contracts/SafeExamBrowser.Applications.Contracts.csproj
@@ -61,14 +61,13 @@
-
-
-
-
-
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{30b2d907-5861-4f39-abad-c4abf1b3470e}
SafeExamBrowser.Settings
diff --git a/SafeExamBrowser.Applications/ExternalApplication.cs b/SafeExamBrowser.Applications/ExternalApplication.cs
index e07dd7d9..81426fc9 100644
--- a/SafeExamBrowser.Applications/ExternalApplication.cs
+++ b/SafeExamBrowser.Applications/ExternalApplication.cs
@@ -11,7 +11,7 @@ using System.Collections.Generic;
using System.Linq;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Applications;
using SafeExamBrowser.Settings.Applications;
diff --git a/SafeExamBrowser.Applications/ExternalApplicationInstance.cs b/SafeExamBrowser.Applications/ExternalApplicationInstance.cs
index 99b39ce5..7811a176 100644
--- a/SafeExamBrowser.Applications/ExternalApplicationInstance.cs
+++ b/SafeExamBrowser.Applications/ExternalApplicationInstance.cs
@@ -12,7 +12,7 @@ using System.Linq;
using System.Timers;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.Applications.Events;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
diff --git a/SafeExamBrowser.Applications/ExternalApplicationWindow.cs b/SafeExamBrowser.Applications/ExternalApplicationWindow.cs
index adc27ae7..ce701952 100644
--- a/SafeExamBrowser.Applications/ExternalApplicationWindow.cs
+++ b/SafeExamBrowser.Applications/ExternalApplicationWindow.cs
@@ -9,7 +9,7 @@
using System;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Applications
diff --git a/SafeExamBrowser.Applications/SafeExamBrowser.Applications.csproj b/SafeExamBrowser.Applications/SafeExamBrowser.Applications.csproj
index f35e7e91..1c748536 100644
--- a/SafeExamBrowser.Applications/SafeExamBrowser.Applications.csproj
+++ b/SafeExamBrowser.Applications/SafeExamBrowser.Applications.csproj
@@ -66,6 +66,10 @@
{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
SafeExamBrowser.Applications.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{64ea30fb-11d4-436a-9c2b-88566285363e}
SafeExamBrowser.Logging.Contracts
diff --git a/SafeExamBrowser.Browser/BrowserApplication.cs b/SafeExamBrowser.Browser/BrowserApplication.cs
index dbd99349..f7ddd5dd 100644
--- a/SafeExamBrowser.Browser/BrowserApplication.cs
+++ b/SafeExamBrowser.Browser/BrowserApplication.cs
@@ -14,7 +14,7 @@ using CefSharp;
using CefSharp.WinForms;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Browser.Contracts.Events;
using SafeExamBrowser.Browser.Events;
diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
index 852cd6ff..5fc8e404 100644
--- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
+++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
@@ -12,7 +12,7 @@ using System.Threading.Tasks;
using CefSharp;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.Browser.Contracts.Events;
using SafeExamBrowser.Browser.Contracts.Filters;
using SafeExamBrowser.Browser.Events;
diff --git a/SafeExamBrowser.Browser/BrowserIconResource.cs b/SafeExamBrowser.Browser/BrowserIconResource.cs
index d606e862..a8767834 100644
--- a/SafeExamBrowser.Browser/BrowserIconResource.cs
+++ b/SafeExamBrowser.Browser/BrowserIconResource.cs
@@ -7,7 +7,7 @@
*/
using System;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
namespace SafeExamBrowser.Browser
{
diff --git a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj
index 9c288cc6..bc940745 100644
--- a/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj
+++ b/SafeExamBrowser.Browser/SafeExamBrowser.Browser.csproj
@@ -122,6 +122,10 @@
{7d74555e-63e1-4c46-bd0a-8580552368c8}
SafeExamBrowser.Configuration.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}
SafeExamBrowser.I18n.Contracts
diff --git a/SafeExamBrowser.Client.Contracts/INotificationInfo.cs b/SafeExamBrowser.Client.Contracts/INotificationInfo.cs
deleted file mode 100644
index 5a812634..00000000
--- a/SafeExamBrowser.Client.Contracts/INotificationInfo.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2021 ETH Zürich, Educational Development and Technology (LET)
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
-
-namespace SafeExamBrowser.Client.Contracts
-{
- ///
- /// The information about a notification.
- ///
- public interface INotificationInfo
- {
- ///
- /// The tooltip for the notification.
- ///
- string Tooltip { get; }
-
- ///
- /// The resource providing the notification icon.
- ///
- IconResource IconResource { get; }
- }
-}
diff --git a/SafeExamBrowser.Client.Contracts/Properties/AssemblyInfo.cs b/SafeExamBrowser.Client.Contracts/Properties/AssemblyInfo.cs
deleted file mode 100644
index b5b160aa..00000000
--- a/SafeExamBrowser.Client.Contracts/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("SafeExamBrowser.Client.Contracts")]
-[assembly: AssemblyDescription("Safe Exam Browser")]
-[assembly: AssemblyCompany("ETH Zürich")]
-[assembly: AssemblyProduct("SafeExamBrowser.Client.Contracts")]
-[assembly: AssemblyCopyright("Copyright © 2021 ETH Zürich, Educational Development and Technology (LET)")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("d39aea14-9d5e-404d-be39-a552e1bd2c7d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("1.0.0.0")]
diff --git a/SafeExamBrowser.Client.Contracts/SafeExamBrowser.Client.Contracts.csproj b/SafeExamBrowser.Client.Contracts/SafeExamBrowser.Client.Contracts.csproj
deleted file mode 100644
index 80f71458..00000000
--- a/SafeExamBrowser.Client.Contracts/SafeExamBrowser.Client.Contracts.csproj
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}
- Library
- Properties
- SafeExamBrowser.Client.Contracts
- SafeExamBrowser.Client.Contracts
- v4.7.2
- 512
- true
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- full
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
- MinimumRecommendedRules.ruleset
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
-
-
-
-
-
-
-
-
-
-
-
-
- {ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
- SafeExamBrowser.Applications.Contracts
-
-
- {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
- SafeExamBrowser.Core.Contracts
-
-
-
-
\ No newline at end of file
diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs
index 2d00a05b..1abfda99 100644
--- a/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs
+++ b/SafeExamBrowser.Client.UnitTests/Notifications/AboutNotificationControllerTests.cs
@@ -10,6 +10,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Notifications;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
@@ -19,12 +20,14 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public class AboutNotificationControllerTests
{
private Mock appConfig;
+ private Mock text;
private Mock uiFactory;
[TestInitialize]
public void Initialize()
{
appConfig = new Mock();
+ text = new Mock();
uiFactory = new Mock();
}
@@ -32,7 +35,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public void MustCloseWindowWhenTerminating()
{
var window = new Mock();
- var sut = new AboutNotificationController(appConfig.Object, uiFactory.Object);
+ var sut = new AboutNotification(appConfig.Object, text.Object, uiFactory.Object);
uiFactory.Setup(u => u.CreateAboutWindow(It.IsAny())).Returns(window.Object);
@@ -46,7 +49,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public void MustOpenOnlyOneWindow()
{
var window = new Mock();
- var sut = new AboutNotificationController(appConfig.Object, uiFactory.Object);
+ var sut = new AboutNotification(appConfig.Object, text.Object, uiFactory.Object);
uiFactory.Setup(u => u.CreateAboutWindow(It.IsAny())).Returns(window.Object);
@@ -64,7 +67,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
[TestMethod]
public void MustNotFailToTerminateIfNotStarted()
{
- var sut = new AboutNotificationController(appConfig.Object, uiFactory.Object);
+ var sut = new AboutNotification(appConfig.Object, text.Object, uiFactory.Object);
sut.Terminate();
}
diff --git a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs
index b5110a0a..4d2c382a 100644
--- a/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs
+++ b/SafeExamBrowser.Client.UnitTests/Notifications/LogNotificationControllerTests.cs
@@ -9,6 +9,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Notifications;
+using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
@@ -19,12 +20,14 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public class LogNotificationControllerTests
{
private Mock logger;
+ private Mock text;
private Mock uiFactory;
[TestInitialize]
public void Initialize()
{
logger = new Mock();
+ text = new Mock();
uiFactory = new Mock();
}
@@ -32,7 +35,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public void MustCloseWindowWhenTerminating()
{
var window = new Mock();
- var sut = new LogNotificationController(logger.Object, uiFactory.Object);
+ var sut = new LogNotification(logger.Object, text.Object, uiFactory.Object);
uiFactory.Setup(u => u.CreateLogWindow(It.IsAny())).Returns(window.Object);
@@ -46,7 +49,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
public void MustOpenOnlyOneWindow()
{
var window = new Mock();
- var sut = new LogNotificationController(logger.Object, uiFactory.Object);
+ var sut = new LogNotification(logger.Object, text.Object, uiFactory.Object);
uiFactory.Setup(u => u.CreateLogWindow(It.IsAny())).Returns(window.Object);
@@ -64,7 +67,7 @@ namespace SafeExamBrowser.Client.UnitTests.Notifications
[TestMethod]
public void MustNotFailToTerminateIfNotStarted()
{
- var sut = new LogNotificationController(logger.Object, uiFactory.Object);
+ var sut = new LogNotification(logger.Object, text.Object, uiFactory.Object);
sut.Terminate();
}
diff --git a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs
index 70347102..0cd743a0 100644
--- a/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs
+++ b/SafeExamBrowser.Client.UnitTests/Operations/ShellOperationTests.cs
@@ -9,8 +9,8 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Client.Operations;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings;
@@ -32,11 +32,9 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
private Mock audio;
private ClientContext context;
private Mock logger;
- private Mock aboutInfo;
- private Mock aboutController;
+ private Mock aboutNotification;
private Mock keyboard;
- private Mock logInfo;
- private Mock logController;
+ private Mock logNotification;
private Mock powerSupply;
private Mock systemInfo;
private Mock taskbar;
@@ -54,11 +52,9 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
audio = new Mock();
context = new ClientContext();
logger = new Mock();
- aboutInfo = new Mock();
- aboutController = new Mock();
+ aboutNotification = new Mock();
keyboard = new Mock();
- logInfo = new Mock();
- logController = new Mock();
+ logNotification = new Mock();
powerSupply = new Mock();
systemInfo = new Mock();
taskbar = new Mock();
@@ -70,19 +66,17 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
context.Settings = new AppSettings();
uiFactory
- .Setup(u => u.CreateNotificationControl(It.IsAny(), It.IsAny(), It.IsAny()))
+ .Setup(u => u.CreateNotificationControl(It.IsAny(), It.IsAny()))
.Returns(new Mock().Object);
sut = new ShellOperation(
actionCenter.Object,
audio.Object,
- aboutInfo.Object,
- aboutController.Object,
+ aboutNotification.Object,
context,
keyboard.Object,
logger.Object,
- logInfo.Object,
- logController.Object,
+ logNotification.Object,
powerSupply.Object,
systemInfo.Object,
taskbar.Object,
@@ -272,7 +266,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
context.Settings.Taskbar.ShowApplicationLog = false;
uiFactory
- .Setup(f => f.CreateNotificationControl(It.IsAny(), It.Is(i => i == logInfo.Object), It.IsAny()))
+ .Setup(f => f.CreateNotificationControl(It.IsAny(), It.IsAny()))
.Returns(logControl.Object);
sut.Perform();
@@ -409,9 +403,9 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
{
sut.Revert();
- aboutController.Verify(c => c.Terminate(), Times.Once);
+ aboutNotification.Verify(c => c.Terminate(), Times.Once);
audio.Verify(a => a.Terminate(), Times.Once);
- logController.Verify(c => c.Terminate(), Times.Once);
+ logNotification.Verify(c => c.Terminate(), Times.Once);
powerSupply.Verify(p => p.Terminate(), Times.Once);
keyboard.Verify(k => k.Terminate(), Times.Once);
wirelessAdapter.Verify(w => w.Terminate(), Times.Once);
diff --git a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj
index 1d423724..71509fed 100644
--- a/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj
+++ b/SafeExamBrowser.Client.UnitTests/SafeExamBrowser.Client.UnitTests.csproj
@@ -116,10 +116,6 @@
{5fb5273d-277c-41dd-8593-a25ce1aff2e9}
SafeExamBrowser.Browser.Contracts
-
- {d39aea14-9d5e-404d-be39-a552e1bd2c7d}
- SafeExamBrowser.Client.Contracts
-
{7CC5A895-E0D3-4E43-9B39-CCEC05A5A6A7}
SafeExamBrowser.Client
diff --git a/SafeExamBrowser.Client/CompositionRoot.cs b/SafeExamBrowser.Client/CompositionRoot.cs
index 9346b9c4..5b9d7469 100644
--- a/SafeExamBrowser.Client/CompositionRoot.cs
+++ b/SafeExamBrowser.Client/CompositionRoot.cs
@@ -250,7 +250,7 @@ namespace SafeExamBrowser.Client
private IOperation BuildProctoringOperation()
{
var controller = new ProctoringController(context.AppConfig, new FileSystem(), ModuleLogger(nameof(ProctoringController)), uiFactory);
- var operation = new ProctoringOperation(context, logger, controller);
+ var operation = new ProctoringOperation(actionCenter, context, controller, logger, controller, taskbar, uiFactory);
context.ProctoringController = controller;
@@ -269,22 +269,18 @@ namespace SafeExamBrowser.Client
private IOperation BuildShellOperation()
{
- var aboutInfo = new AboutNotificationInfo(text);
- var aboutController = new AboutNotificationController(context.AppConfig, uiFactory);
+ var aboutNotification = new AboutNotification(context.AppConfig, text, uiFactory);
var audio = new Audio(context.Settings.Audio, ModuleLogger(nameof(Audio)));
var keyboard = new Keyboard(ModuleLogger(nameof(Keyboard)));
- var logInfo = new LogNotificationInfo(text);
- var logController = new LogNotificationController(logger, uiFactory);
+ var logNotification = new LogNotification(logger, text, uiFactory);
var operation = new ShellOperation(
actionCenter,
audio,
- aboutInfo,
- aboutController,
+ aboutNotification,
context,
keyboard,
logger,
- logInfo,
- logController,
+ logNotification,
powerSupply,
systemInfo,
taskbar,
diff --git a/SafeExamBrowser.Client/Notifications/AboutNotificationController.cs b/SafeExamBrowser.Client/Notifications/AboutNotification.cs
similarity index 55%
rename from SafeExamBrowser.Client/Notifications/AboutNotificationController.cs
rename to SafeExamBrowser.Client/Notifications/AboutNotification.cs
index 68d6ec9f..969b81be 100644
--- a/SafeExamBrowser.Client/Notifications/AboutNotificationController.cs
+++ b/SafeExamBrowser.Client/Notifications/AboutNotification.cs
@@ -6,23 +6,35 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-using SafeExamBrowser.Client.Contracts;
+using System;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
+using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.Notifications
{
- internal class AboutNotificationController : INotificationController
+ internal class AboutNotification : INotification
{
- private AppConfig appConfig;
- private IUserInterfaceFactory uiFactory;
+ private readonly AppConfig appConfig;
+ private readonly IText text;
+ private readonly IUserInterfaceFactory uiFactory;
+
private IWindow window;
- public AboutNotificationController(AppConfig appConfig, IUserInterfaceFactory uiFactory)
+ public string Tooltip { get; }
+ public IconResource IconResource { get; }
+
+ public AboutNotification(AppConfig appConfig, IText text, IUserInterfaceFactory uiFactory)
{
this.appConfig = appConfig;
+ this.text = text;
this.uiFactory = uiFactory;
+
+ IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/AboutNotification.xaml") };
+ Tooltip = text.Get(TextKey.Notification_AboutTooltip);
}
public void Activate()
diff --git a/SafeExamBrowser.Client/Notifications/AboutNotificationInfo.cs b/SafeExamBrowser.Client/Notifications/AboutNotificationInfo.cs
deleted file mode 100644
index a3923e6d..00000000
--- a/SafeExamBrowser.Client/Notifications/AboutNotificationInfo.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2021 ETH Zürich, Educational Development and Technology (LET)
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-using System;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
-using SafeExamBrowser.Client.Contracts;
-using SafeExamBrowser.I18n.Contracts;
-
-namespace SafeExamBrowser.Client.Notifications
-{
- internal class AboutNotificationInfo : INotificationInfo
- {
- public string Tooltip { get; }
- public IconResource IconResource { get; }
-
- public AboutNotificationInfo(IText text)
- {
- IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/AboutNotification.xaml") };
- Tooltip = text.Get(TextKey.Notification_AboutTooltip);
- }
- }
-}
diff --git a/SafeExamBrowser.Client/Notifications/LogNotificationController.cs b/SafeExamBrowser.Client/Notifications/LogNotification.cs
similarity index 54%
rename from SafeExamBrowser.Client/Notifications/LogNotificationController.cs
rename to SafeExamBrowser.Client/Notifications/LogNotification.cs
index cfde3d95..e45aac9f 100644
--- a/SafeExamBrowser.Client/Notifications/LogNotificationController.cs
+++ b/SafeExamBrowser.Client/Notifications/LogNotification.cs
@@ -6,23 +6,35 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-using SafeExamBrowser.Client.Contracts;
+using System;
+using SafeExamBrowser.Core.Contracts.Notifications;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
+using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.Notifications
{
- internal class LogNotificationController : INotificationController
+ internal class LogNotification : INotification
{
- private ILogger logger;
- private IUserInterfaceFactory uiFactory;
+ private readonly ILogger logger;
+ private readonly IText text;
+ private readonly IUserInterfaceFactory uiFactory;
+
private IWindow window;
- public LogNotificationController(ILogger logger, IUserInterfaceFactory uiFactory)
+ public string Tooltip { get; }
+ public IconResource IconResource { get; }
+
+ public LogNotification(ILogger logger, IText text, IUserInterfaceFactory uiFactory)
{
this.logger = logger;
+ this.text = text;
this.uiFactory = uiFactory;
+
+ IconResource = new BitmapIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/LogNotification.ico") };
+ Tooltip = text.Get(TextKey.Notification_LogTooltip);
}
public void Activate()
diff --git a/SafeExamBrowser.Client/Notifications/LogNotificationInfo.cs b/SafeExamBrowser.Client/Notifications/LogNotificationInfo.cs
deleted file mode 100644
index 0fde782c..00000000
--- a/SafeExamBrowser.Client/Notifications/LogNotificationInfo.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2021 ETH Zürich, Educational Development and Technology (LET)
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-using System;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
-using SafeExamBrowser.Client.Contracts;
-using SafeExamBrowser.I18n.Contracts;
-
-namespace SafeExamBrowser.Client.Notifications
-{
- internal class LogNotificationInfo : INotificationInfo
- {
- public string Tooltip { get; }
- public IconResource IconResource { get; }
-
- public LogNotificationInfo(IText text)
- {
- IconResource = new BitmapIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/LogNotification.ico") };
- Tooltip = text.Get(TextKey.Notification_LogTooltip);
- }
- }
-}
diff --git a/SafeExamBrowser.Client/Operations/ProctoringOperation.cs b/SafeExamBrowser.Client/Operations/ProctoringOperation.cs
index 598fb3b1..56d7588a 100644
--- a/SafeExamBrowser.Client/Operations/ProctoringOperation.cs
+++ b/SafeExamBrowser.Client/Operations/ProctoringOperation.cs
@@ -6,26 +6,44 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Proctoring.Contracts;
+using SafeExamBrowser.UserInterface.Contracts;
+using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.Operations
{
internal class ProctoringOperation : ClientOperation
{
- private readonly ILogger logger;
+ private readonly IActionCenter actionCenter;
private readonly IProctoringController controller;
+ private readonly ILogger logger;
+ private readonly INotification notification;
+ private readonly ITaskbar taskbar;
+ private readonly IUserInterfaceFactory uiFactory;
public override event ActionRequiredEventHandler ActionRequired { add { } remove { } }
public override event StatusChangedEventHandler StatusChanged;
- public ProctoringOperation(ClientContext context, ILogger logger, IProctoringController controller) : base(context)
+ public ProctoringOperation(
+ IActionCenter actionCenter,
+ ClientContext context,
+ IProctoringController controller,
+ ILogger logger,
+ INotification notification,
+ ITaskbar taskbar,
+ IUserInterfaceFactory uiFactory) : base(context)
{
+ this.actionCenter = actionCenter;
this.controller = controller;
this.logger = logger;
+ this.notification = notification;
+ this.taskbar = taskbar;
+ this.uiFactory = uiFactory;
}
public override OperationResult Perform()
@@ -35,7 +53,13 @@ namespace SafeExamBrowser.Client.Operations
logger.Info("Initializing proctoring...");
StatusChanged?.Invoke(TextKey.OperationStatus_InitializeProctoring);
+ var actionCenterControl = uiFactory.CreateNotificationControl(notification, Location.ActionCenter);
+ var taskbarControl = uiFactory.CreateNotificationControl(notification, Location.Taskbar);
+
controller.Initialize(Context.Settings.Proctoring);
+
+ actionCenter.AddNotificationControl(actionCenterControl);
+ taskbar.AddNotificationControl(taskbarControl);
}
return OperationResult.Success;
@@ -49,6 +73,7 @@ namespace SafeExamBrowser.Client.Operations
StatusChanged?.Invoke(TextKey.OperationStatus_TerminateProctoring);
controller.Terminate();
+ notification.Terminate();
}
return OperationResult.Success;
diff --git a/SafeExamBrowser.Client/Operations/ShellOperation.cs b/SafeExamBrowser.Client/Operations/ShellOperation.cs
index e2c6832e..52ca859a 100644
--- a/SafeExamBrowser.Client/Operations/ShellOperation.cs
+++ b/SafeExamBrowser.Client/Operations/ShellOperation.cs
@@ -7,7 +7,7 @@
*/
using System.Linq;
-using SafeExamBrowser.Client.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
@@ -26,12 +26,10 @@ namespace SafeExamBrowser.Client.Operations
{
private IActionCenter actionCenter;
private IAudio audio;
- private INotificationInfo aboutInfo;
- private INotificationController aboutController;
+ private INotification aboutNotification;
private IKeyboard keyboard;
private ILogger logger;
- private INotificationInfo logInfo;
- private INotificationController logController;
+ private INotification logNotification;
private IPowerSupply powerSupply;
private ISystemInfo systemInfo;
private ITaskbar taskbar;
@@ -46,13 +44,11 @@ namespace SafeExamBrowser.Client.Operations
public ShellOperation(
IActionCenter actionCenter,
IAudio audio,
- INotificationInfo aboutInfo,
- INotificationController aboutController,
+ INotification aboutNotification,
ClientContext context,
IKeyboard keyboard,
ILogger logger,
- INotificationInfo logInfo,
- INotificationController logController,
+ INotification logNotification,
IPowerSupply powerSupply,
ISystemInfo systemInfo,
ITaskbar taskbar,
@@ -61,14 +57,12 @@ namespace SafeExamBrowser.Client.Operations
IUserInterfaceFactory uiFactory,
IWirelessAdapter wirelessAdapter) : base(context)
{
- this.aboutInfo = aboutInfo;
- this.aboutController = aboutController;
+ this.aboutNotification = aboutNotification;
this.actionCenter = actionCenter;
this.audio = audio;
this.keyboard = keyboard;
this.logger = logger;
- this.logInfo = logInfo;
- this.logController = logController;
+ this.logNotification = logNotification;
this.powerSupply = powerSupply;
this.systemInfo = systemInfo;
this.text = text;
@@ -218,7 +212,7 @@ namespace SafeExamBrowser.Client.Operations
{
if (Context.Settings.ActionCenter.ShowApplicationInfo)
{
- actionCenter.AddNotificationControl(uiFactory.CreateNotificationControl(aboutController, aboutInfo, Location.ActionCenter));
+ actionCenter.AddNotificationControl(uiFactory.CreateNotificationControl(aboutNotification, Location.ActionCenter));
}
}
@@ -226,7 +220,7 @@ namespace SafeExamBrowser.Client.Operations
{
if (Context.Settings.Taskbar.ShowApplicationInfo)
{
- taskbar.AddNotificationControl(uiFactory.CreateNotificationControl(aboutController, aboutInfo, Location.Taskbar));
+ taskbar.AddNotificationControl(uiFactory.CreateNotificationControl(aboutNotification, Location.Taskbar));
}
}
@@ -260,7 +254,7 @@ namespace SafeExamBrowser.Client.Operations
{
if (Context.Settings.ActionCenter.ShowApplicationLog)
{
- actionCenter.AddNotificationControl(uiFactory.CreateNotificationControl(logController, logInfo, Location.ActionCenter));
+ actionCenter.AddNotificationControl(uiFactory.CreateNotificationControl(logNotification, Location.ActionCenter));
}
}
@@ -268,7 +262,7 @@ namespace SafeExamBrowser.Client.Operations
{
if (Context.Settings.Taskbar.ShowApplicationLog)
{
- taskbar.AddNotificationControl(uiFactory.CreateNotificationControl(logController, logInfo, Location.Taskbar));
+ taskbar.AddNotificationControl(uiFactory.CreateNotificationControl(logNotification, Location.Taskbar));
}
}
@@ -340,8 +334,8 @@ namespace SafeExamBrowser.Client.Operations
private void TerminateNotifications()
{
- aboutController.Terminate();
- logController.Terminate();
+ aboutNotification.Terminate();
+ logNotification.Terminate();
}
private void TerminateSystemComponents()
diff --git a/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj b/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj
index 15372e38..480164c0 100644
--- a/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj
+++ b/SafeExamBrowser.Client/SafeExamBrowser.Client.csproj
@@ -85,10 +85,8 @@
-
-
-
-
+
+
@@ -143,10 +141,6 @@
{04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}
SafeExamBrowser.Browser
-
- {d39aea14-9d5e-404d-be39-a552e1bd2c7d}
- SafeExamBrowser.Client.Contracts
-
{0cd2c5fe-711a-4c32-afe0-bb804fe8b220}
SafeExamBrowser.Communication.Contracts
diff --git a/SafeExamBrowser.Client.Contracts/INotificationController.cs b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
similarity index 57%
rename from SafeExamBrowser.Client.Contracts/INotificationController.cs
rename to SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
index 9572dcd4..e50f9bb1 100644
--- a/SafeExamBrowser.Client.Contracts/INotificationController.cs
+++ b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
@@ -6,20 +6,32 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-namespace SafeExamBrowser.Client.Contracts
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
+
+namespace SafeExamBrowser.Core.Contracts.Notifications
{
///
/// Controls the lifetime and functionality of a notification which can be activated via the UI.
///
- public interface INotificationController
+ public interface INotification
{
+ ///
+ /// The tooltip for the notification.
+ ///
+ string Tooltip { get; }
+
+ ///
+ /// The resource providing the notification icon.
+ ///
+ IconResource IconResource { get; }
+
///
/// Executes the notification functionality.
///
void Activate();
///
- /// Instructs the controller to shut down and release all used resources.
+ /// Terminates the notification functionality and release all used resources.
///
void Terminate();
}
diff --git a/SafeExamBrowser.Applications.Contracts/Resources/Icons/BitmapIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs
similarity index 90%
rename from SafeExamBrowser.Applications.Contracts/Resources/Icons/BitmapIconResource.cs
rename to SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs
index c4baf86d..750eac76 100644
--- a/SafeExamBrowser.Applications.Contracts/Resources/Icons/BitmapIconResource.cs
+++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/BitmapIconResource.cs
@@ -8,7 +8,7 @@
using System;
-namespace SafeExamBrowser.Applications.Contracts.Resources.Icons
+namespace SafeExamBrowser.Core.Contracts.Resources.Icons
{
///
/// Defines an icon resource which is a bitmap image (i.e. raster graphics).
diff --git a/SafeExamBrowser.Applications.Contracts/Resources/Icons/EmbeddedIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs
similarity index 90%
rename from SafeExamBrowser.Applications.Contracts/Resources/Icons/EmbeddedIconResource.cs
rename to SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs
index deb0705e..e0379c3b 100644
--- a/SafeExamBrowser.Applications.Contracts/Resources/Icons/EmbeddedIconResource.cs
+++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/EmbeddedIconResource.cs
@@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-namespace SafeExamBrowser.Applications.Contracts.Resources.Icons
+namespace SafeExamBrowser.Core.Contracts.Resources.Icons
{
///
/// Defines an icon resource which is a file with embedded icon data (e.g. an executable).
diff --git a/SafeExamBrowser.Applications.Contracts/Resources/Icons/IconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs
similarity index 86%
rename from SafeExamBrowser.Applications.Contracts/Resources/Icons/IconResource.cs
rename to SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs
index b7ef27a1..fde8b6bd 100644
--- a/SafeExamBrowser.Applications.Contracts/Resources/Icons/IconResource.cs
+++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/IconResource.cs
@@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-namespace SafeExamBrowser.Applications.Contracts.Resources.Icons
+namespace SafeExamBrowser.Core.Contracts.Resources.Icons
{
///
/// Defines an icon resource.
diff --git a/SafeExamBrowser.Applications.Contracts/Resources/Icons/NativeIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs
similarity index 89%
rename from SafeExamBrowser.Applications.Contracts/Resources/Icons/NativeIconResource.cs
rename to SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs
index 65c21c29..3495b4ee 100644
--- a/SafeExamBrowser.Applications.Contracts/Resources/Icons/NativeIconResource.cs
+++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/NativeIconResource.cs
@@ -8,7 +8,7 @@
using System;
-namespace SafeExamBrowser.Applications.Contracts.Resources.Icons
+namespace SafeExamBrowser.Core.Contracts.Resources.Icons
{
///
/// Defines an icon resource which is managed by the operating system.
diff --git a/SafeExamBrowser.Applications.Contracts/Resources/Icons/XamlIconResource.cs b/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs
similarity index 90%
rename from SafeExamBrowser.Applications.Contracts/Resources/Icons/XamlIconResource.cs
rename to SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs
index 556e2187..00575c45 100644
--- a/SafeExamBrowser.Applications.Contracts/Resources/Icons/XamlIconResource.cs
+++ b/SafeExamBrowser.Core.Contracts/Resources/Icons/XamlIconResource.cs
@@ -8,7 +8,7 @@
using System;
-namespace SafeExamBrowser.Applications.Contracts.Resources.Icons
+namespace SafeExamBrowser.Core.Contracts.Resources.Icons
{
///
/// Defines an icon resource which consists of XAML markup (i.e. vector graphics).
diff --git a/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj b/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj
index 20b14816..0a7781dd 100644
--- a/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj
+++ b/SafeExamBrowser.Core.Contracts/SafeExamBrowser.Core.Contracts.csproj
@@ -54,6 +54,7 @@
+
@@ -65,6 +66,11 @@
+
+
+
+
+
diff --git a/SafeExamBrowser.Proctoring.Contracts/SafeExamBrowser.Proctoring.Contracts.csproj b/SafeExamBrowser.Proctoring.Contracts/SafeExamBrowser.Proctoring.Contracts.csproj
index 0df5942c..f698b899 100644
--- a/SafeExamBrowser.Proctoring.Contracts/SafeExamBrowser.Proctoring.Contracts.csproj
+++ b/SafeExamBrowser.Proctoring.Contracts/SafeExamBrowser.Proctoring.Contracts.csproj
@@ -58,6 +58,10 @@
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{30b2d907-5861-4f39-abad-c4abf1b3470e}
SafeExamBrowser.Settings
diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs
index 444dc897..a62f2374 100644
--- a/SafeExamBrowser.Proctoring/ProctoringController.cs
+++ b/SafeExamBrowser.Proctoring/ProctoringController.cs
@@ -10,6 +10,8 @@ using System;
using System.IO;
using System.Reflection;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Proctoring.Contracts;
using SafeExamBrowser.Settings.Proctoring;
@@ -19,7 +21,7 @@ using SafeExamBrowser.UserInterface.Contracts.Proctoring;
namespace SafeExamBrowser.Proctoring
{
- public class ProctoringController : IProctoringController
+ public class ProctoringController : IProctoringController, INotification
{
private readonly AppConfig appConfig;
private readonly IFileSystem fileSystem;
@@ -29,6 +31,9 @@ namespace SafeExamBrowser.Proctoring
private string filePath;
private IProctoringWindow window;
+ public string Tooltip => "TODO!!!";
+ public IconResource IconResource => new XamlIconResource();
+
public ProctoringController(AppConfig appConfig, IFileSystem fileSystem, IModuleLogger logger, IUserInterfaceFactory uiFactory)
{
this.appConfig = appConfig;
@@ -37,6 +42,11 @@ namespace SafeExamBrowser.Proctoring
this.uiFactory = uiFactory;
}
+ public void Activate()
+ {
+ window?.Show();
+ }
+
public void Initialize(ProctoringSettings settings)
{
if (settings.JitsiMeet.Enabled || settings.Zoom.Enabled)
diff --git a/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj b/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj
index afd2c5b4..af69e651 100644
--- a/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj
+++ b/SafeExamBrowser.Proctoring/SafeExamBrowser.Proctoring.csproj
@@ -78,6 +78,10 @@
{7d74555e-63e1-4c46-bd0a-8580552368c8}
SafeExamBrowser.Configuration.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{64ea30fb-11d4-436a-9c2b-88566285363e}
SafeExamBrowser.Logging.Contracts
diff --git a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs
index aec3dd69..9e9f340d 100644
--- a/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs
+++ b/SafeExamBrowser.UserInterface.Contracts/Browser/IBrowserWindow.cs
@@ -7,7 +7,7 @@
*/
using System;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Contracts.Browser.Data;
using SafeExamBrowser.UserInterface.Contracts.Browser.Events;
using SafeExamBrowser.UserInterface.Contracts.Windows;
diff --git a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs
index 0d7169b6..d55d4664 100644
--- a/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs
+++ b/SafeExamBrowser.UserInterface.Contracts/IUserInterfaceFactory.cs
@@ -8,8 +8,8 @@
using System.Collections.Generic;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Server.Contracts.Data;
@@ -79,7 +79,7 @@ namespace SafeExamBrowser.UserInterface.Contracts
///
/// Creates a notification control for the given notification, initialized for the specified location.
///
- INotificationControl CreateNotificationControl(INotificationController controller, INotificationInfo info, Location location);
+ INotificationControl CreateNotificationControl(INotification notification, Location location);
///
/// Creates a password dialog with the given message and title.
diff --git a/SafeExamBrowser.UserInterface.Contracts/SafeExamBrowser.UserInterface.Contracts.csproj b/SafeExamBrowser.UserInterface.Contracts/SafeExamBrowser.UserInterface.Contracts.csproj
index 4ab5b7fb..f9ea9dc9 100644
--- a/SafeExamBrowser.UserInterface.Contracts/SafeExamBrowser.UserInterface.Contracts.csproj
+++ b/SafeExamBrowser.UserInterface.Contracts/SafeExamBrowser.UserInterface.Contracts.csproj
@@ -108,14 +108,14 @@
{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
SafeExamBrowser.Applications.Contracts
-
- {d39aea14-9d5e-404d-be39-a552e1bd2c7d}
- SafeExamBrowser.Client.Contracts
-
{7d74555e-63e1-4c46-bd0a-8580552368c8}
SafeExamBrowser.Configuration.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}
SafeExamBrowser.I18n.Contracts
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs
index 759afceb..44cbb896 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/ApplicationButton.xaml.cs
@@ -9,7 +9,7 @@
using System;
using System.Windows.Controls;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs
index f8a4d544..906a843e 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/AudioControl.xaml.cs
@@ -13,7 +13,7 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Threading;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs
index 349d0518..ade141b5 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml.cs
@@ -8,7 +8,7 @@
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Client.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Shared.Utilities;
@@ -16,26 +16,26 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
{
internal partial class NotificationButton : UserControl, INotificationControl
{
- private INotificationController controller;
+ private INotification notification;
- internal NotificationButton(INotificationController controller, INotificationInfo info)
+ internal NotificationButton(INotification notification)
{
- this.controller = controller;
+ this.notification = notification;
InitializeComponent();
- InitializeNotificationIcon(info);
+ InitializeNotification();
}
private void IconButton_Click(object sender, RoutedEventArgs e)
{
- controller.Activate();
+ notification.Activate();
}
- private void InitializeNotificationIcon(INotificationInfo info)
+ private void InitializeNotification()
{
- Icon.Content = IconResourceLoader.Load(info.IconResource);
- IconButton.ToolTip = info.Tooltip;
- Text.Text = info.Tooltip;
+ Icon.Content = IconResourceLoader.Load(notification.IconResource);
+ IconButton.ToolTip = notification.Tooltip;
+ Text.Text = notification.Tooltip;
}
}
}
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs
index 0e82ef85..86639094 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/QuitButton.xaml.cs
@@ -9,7 +9,7 @@
using System;
using System.ComponentModel;
using System.Windows.Controls;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
using SafeExamBrowser.UserInterface.Shared.Utilities;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/WirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
index 4f1f2bb7..c3faf45d 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using FontAwesome.WPF;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.WirelessNetwork;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs
index 03e5bc7f..8e81f715 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/ApplicationWindowButton.xaml.cs
@@ -9,7 +9,7 @@
using System.Windows;
using System.Windows.Controls;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs
index 0dbf0bef..c54e4583 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/AudioControl.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs
index f4e66f11..ed3d8abe 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/NotificationButton.xaml.cs
@@ -8,7 +8,7 @@
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Client.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Shared.Utilities;
@@ -16,25 +16,25 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
{
internal partial class NotificationButton : UserControl, INotificationControl
{
- private INotificationController controller;
+ private INotification notification;
- internal NotificationButton(INotificationController controller, INotificationInfo info)
+ internal NotificationButton(INotification notification)
{
- this.controller = controller;
+ this.notification = notification;
InitializeComponent();
- InitializeNotificationIcon(info);
+ InitializeNotification();
}
private void IconButton_Click(object sender, RoutedEventArgs e)
{
- controller.Activate();
+ notification.Activate();
}
- private void InitializeNotificationIcon(INotificationInfo info)
+ private void InitializeNotification()
{
- IconButton.ToolTip = info.Tooltip;
- IconButton.Content = IconResourceLoader.Load(info.IconResource);
+ IconButton.ToolTip = notification.Tooltip;
+ IconButton.Content = IconResourceLoader.Load(notification.IconResource);
}
}
}
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs
index ededa2a3..1833896b 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/QuitButton.xaml.cs
@@ -10,7 +10,7 @@ using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
using SafeExamBrowser.UserInterface.Shared.Utilities;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/WirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/WirelessNetworkControl.xaml.cs
index 9f34a05d..3e1d6cb4 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/WirelessNetworkControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/WirelessNetworkControl.xaml.cs
@@ -13,7 +13,7 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using FontAwesome.WPF;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.WirelessNetwork;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs
index eaeb03e1..5441cbe8 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskview/WindowControl.xaml.cs
@@ -11,7 +11,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskview
diff --git a/SafeExamBrowser.UserInterface.Desktop/SafeExamBrowser.UserInterface.Desktop.csproj b/SafeExamBrowser.UserInterface.Desktop/SafeExamBrowser.UserInterface.Desktop.csproj
index 50197dc6..2d7e28c8 100644
--- a/SafeExamBrowser.UserInterface.Desktop/SafeExamBrowser.UserInterface.Desktop.csproj
+++ b/SafeExamBrowser.UserInterface.Desktop/SafeExamBrowser.UserInterface.Desktop.csproj
@@ -479,14 +479,14 @@
{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
SafeExamBrowser.Applications.Contracts
-
- {d39aea14-9d5e-404d-be39-a552e1bd2c7d}
- SafeExamBrowser.Client.Contracts
-
{7d74555e-63e1-4c46-bd0a-8580552368c8}
SafeExamBrowser.Configuration.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}
SafeExamBrowser.I18n.Contracts
diff --git a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs
index 1b148e27..bbef2ebf 100644
--- a/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/UserInterfaceFactory.cs
@@ -12,8 +12,8 @@ using System.Windows;
using System.Windows.Media;
using FontAwesome.WPF;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Server.Contracts.Data;
@@ -129,15 +129,15 @@ namespace SafeExamBrowser.UserInterface.Desktop
return window;
}
- public INotificationControl CreateNotificationControl(INotificationController controller, INotificationInfo info, Location location)
+ public INotificationControl CreateNotificationControl(INotification notification, Location location)
{
if (location == Location.ActionCenter)
{
- return new Controls.ActionCenter.NotificationButton(controller, info);
+ return new Controls.ActionCenter.NotificationButton(notification);
}
else
{
- return new Controls.Taskbar.NotificationButton(controller, info);
+ return new Controls.Taskbar.NotificationButton(notification);
}
}
diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs
index c52e9fdc..a529a3c7 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Windows/BrowserWindow.xaml.cs
@@ -14,7 +14,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.UserInterface.Contracts;
diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml
index de7abcb8..7a62d514 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml
+++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml
@@ -5,5 +5,4 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop.Windows"
mc:Ignorable="d" Height="250" Width="350" Topmost="True" WindowStyle="None">
-
diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs
index e8bd9945..81713305 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml.cs
@@ -71,7 +71,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
{
if (control is UIElement element)
{
- ControlContainer.Children.Add(element);
+ Content = element;
}
Closing += ProctoringWindow_Closing;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs
index 3a9c3ff6..bd5c570d 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/ApplicationButton.xaml.cs
@@ -9,7 +9,7 @@
using System;
using System.Windows.Controls;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs
index 69a1a8cb..de0aff02 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/AudioControl.xaml.cs
@@ -13,7 +13,7 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Threading;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs
index 507258b8..ce129e49 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/NotificationButton.xaml.cs
@@ -8,7 +8,7 @@
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Client.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Shared.Utilities;
@@ -16,26 +16,26 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
{
internal partial class NotificationButton : UserControl, INotificationControl
{
- private INotificationController controller;
+ private INotification notification;
- internal NotificationButton(INotificationController controller, INotificationInfo info)
+ internal NotificationButton(INotification notification)
{
- this.controller = controller;
+ this.notification = notification;
InitializeComponent();
- InitializeNotificationIcon(info);
+ InitializeNotification();
}
private void IconButton_Click(object sender, RoutedEventArgs e)
{
- controller.Activate();
+ notification.Activate();
}
- private void InitializeNotificationIcon(INotificationInfo info)
+ private void InitializeNotification()
{
- Icon.Content = IconResourceLoader.Load(info.IconResource);
- IconButton.ToolTip = info.Tooltip;
- Text.Text = info.Tooltip;
+ Icon.Content = IconResourceLoader.Load(notification.IconResource);
+ IconButton.ToolTip = notification.Tooltip;
+ Text.Text = notification.Tooltip;
}
}
}
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs
index 4a7b2df7..7ff191fa 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/QuitButton.xaml.cs
@@ -9,7 +9,7 @@
using System;
using System.ComponentModel;
using System.Windows.Controls;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
using SafeExamBrowser.UserInterface.Shared.Utilities;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/WirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
index 45638101..7cbecd7f 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/WirelessNetworkControl.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using FontAwesome.WPF;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.WirelessNetwork;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs
index a3615c79..6bbf8d9b 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/ApplicationWindowButton.xaml.cs
@@ -9,7 +9,7 @@
using System.Windows;
using System.Windows.Controls;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs
index e8c9c4b5..37e50e12 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/AudioControl.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs
index 8ffd02c4..2d35d09a 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/NotificationButton.xaml.cs
@@ -8,7 +8,7 @@
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Client.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Shared.Utilities;
@@ -16,25 +16,25 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
{
internal partial class NotificationButton : UserControl, INotificationControl
{
- private INotificationController controller;
+ private INotification notification;
- internal NotificationButton(INotificationController controller, INotificationInfo info)
+ internal NotificationButton(INotification notification)
{
- this.controller = controller;
+ this.notification = notification;
InitializeComponent();
- InitializeNotificationIcon(info);
+ InitializeNotification();
}
private void IconButton_Click(object sender, RoutedEventArgs e)
{
- controller.Activate();
+ notification.Activate();
}
- private void InitializeNotificationIcon(INotificationInfo info)
+ private void InitializeNotification()
{
- IconButton.ToolTip = info.Tooltip;
- IconButton.Content = IconResourceLoader.Load(info.IconResource);
+ IconButton.ToolTip = notification.Tooltip;
+ IconButton.Content = IconResourceLoader.Load(notification.IconResource);
}
}
}
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs
index b48a6b62..901375c1 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/QuitButton.xaml.cs
@@ -10,7 +10,7 @@ using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
using SafeExamBrowser.UserInterface.Shared.Utilities;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/WirelessNetworkControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/WirelessNetworkControl.xaml.cs
index eb574883..9263048a 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/WirelessNetworkControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/WirelessNetworkControl.xaml.cs
@@ -13,7 +13,7 @@ using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using FontAwesome.WPF;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.WirelessNetwork;
using SafeExamBrowser.UserInterface.Contracts.Shell;
diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs
index 2f0e974d..42b6f561 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskview/WindowControl.xaml.cs
@@ -10,7 +10,7 @@ using System;
using System.Windows;
using System.Windows.Controls;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.UserInterface.Shared.Utilities;
namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskview
diff --git a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj
index 0dbe86b0..44612cb6 100644
--- a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj
+++ b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj
@@ -198,14 +198,14 @@
{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
SafeExamBrowser.Applications.Contracts
-
- {d39aea14-9d5e-404d-be39-a552e1bd2c7d}
- SafeExamBrowser.Client.Contracts
-
{7d74555e-63e1-4c46-bd0a-8580552368c8}
SafeExamBrowser.Configuration.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
+
{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}
SafeExamBrowser.I18n.Contracts
diff --git a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs
index c4d94527..a35b36eb 100644
--- a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs
@@ -12,8 +12,8 @@ using System.Windows;
using System.Windows.Media;
using FontAwesome.WPF;
using SafeExamBrowser.Applications.Contracts;
-using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts;
+using SafeExamBrowser.Core.Contracts.Notifications;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Server.Contracts.Data;
@@ -129,15 +129,15 @@ namespace SafeExamBrowser.UserInterface.Mobile
return window;
}
- public INotificationControl CreateNotificationControl(INotificationController controller, INotificationInfo info, Location location)
+ public INotificationControl CreateNotificationControl(INotification notification, Location location)
{
if (location == Location.ActionCenter)
{
- return new Controls.ActionCenter.NotificationButton(controller, info);
+ return new Controls.ActionCenter.NotificationButton(notification);
}
else
{
- return new Controls.Taskbar.NotificationButton(controller, info);
+ return new Controls.Taskbar.NotificationButton(notification);
}
}
diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs
index 9126bafb..defd4e7e 100644
--- a/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface.Mobile/Windows/BrowserWindow.xaml.cs
@@ -14,7 +14,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.UserInterface.Contracts;
diff --git a/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj b/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
index e5bf309b..3ea7e132 100644
--- a/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
+++ b/SafeExamBrowser.UserInterface.Shared/SafeExamBrowser.UserInterface.Shared.csproj
@@ -79,9 +79,9 @@
-
- {ac77745d-3b41-43e2-8e84-d40e5a4ee77f}
- SafeExamBrowser.Applications.Contracts
+
+ {fe0e1224-b447-4b14-81e7-ed7d84822aa0}
+ SafeExamBrowser.Core.Contracts
{64ea30fb-11d4-436a-9c2b-88566285363e}
diff --git a/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs b/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs
index 99efa987..92af3b6e 100644
--- a/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs
+++ b/SafeExamBrowser.UserInterface.Shared/Utilities/IconResourceLoader.cs
@@ -16,7 +16,7 @@ using System.Windows.Documents;
using System.Windows.Interop;
using System.Windows.Markup;
using System.Windows.Media.Imaging;
-using SafeExamBrowser.Applications.Contracts.Resources.Icons;
+using SafeExamBrowser.Core.Contracts.Resources.Icons;
using Brushes = System.Windows.Media.Brushes;
using Image = System.Windows.Controls.Image;
diff --git a/SafeExamBrowser.sln b/SafeExamBrowser.sln
index 4164ceec..cd5e444a 100644
--- a/SafeExamBrowser.sln
+++ b/SafeExamBrowser.sln
@@ -72,8 +72,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Browser.Con
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Applications.Contracts", "SafeExamBrowser.Applications.Contracts\SafeExamBrowser.Applications.Contracts.csproj", "{AC77745D-3B41-43E2-8E84-D40E5A4EE77F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Client.Contracts", "SafeExamBrowser.Client.Contracts\SafeExamBrowser.Client.Contracts.csproj", "{D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Communication.Contracts", "SafeExamBrowser.Communication.Contracts\SafeExamBrowser.Communication.Contracts.csproj", "{0CD2C5FE-711A-4C32-AFE0-BB804FE8B220}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SafeExamBrowser.Configuration.Contracts", "SafeExamBrowser.Configuration.Contracts\SafeExamBrowser.Configuration.Contracts.csproj", "{7D74555E-63E1-4C46-BD0A-8580552368C8}"
@@ -334,14 +332,6 @@ Global
{AC77745D-3B41-43E2-8E84-D40E5A4EE77F}.Release|x64.Build.0 = Release|x64
{AC77745D-3B41-43E2-8E84-D40E5A4EE77F}.Release|x86.ActiveCfg = Release|x86
{AC77745D-3B41-43E2-8E84-D40E5A4EE77F}.Release|x86.Build.0 = Release|x86
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Debug|x64.ActiveCfg = Debug|x64
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Debug|x64.Build.0 = Debug|x64
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Debug|x86.ActiveCfg = Debug|x86
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Debug|x86.Build.0 = Debug|x86
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Release|x64.ActiveCfg = Release|x64
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Release|x64.Build.0 = Release|x64
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Release|x86.ActiveCfg = Release|x86
- {D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}.Release|x86.Build.0 = Release|x86
{0CD2C5FE-711A-4C32-AFE0-BB804FE8B220}.Debug|x64.ActiveCfg = Debug|x64
{0CD2C5FE-711A-4C32-AFE0-BB804FE8B220}.Debug|x64.Build.0 = Debug|x64
{0CD2C5FE-711A-4C32-AFE0-BB804FE8B220}.Debug|x86.ActiveCfg = Debug|x86