SEBWIN-342: Moved settings to separate assembly.

This commit is contained in:
dbuechel 2019-09-06 09:39:28 +02:00
parent 5f5209622e
commit 367ebf1329
111 changed files with 482 additions and 275 deletions

View file

@ -19,9 +19,10 @@ using SafeExamBrowser.Browser.Events;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; using BrowserSettings = SafeExamBrowser.Settings.Browser.BrowserSettings;
namespace SafeExamBrowser.Browser namespace SafeExamBrowser.Browser
{ {

View file

@ -14,7 +14,7 @@ using SafeExamBrowser.Browser.Contracts.Events;
using SafeExamBrowser.Browser.Events; using SafeExamBrowser.Browser.Events;
using SafeExamBrowser.Browser.Handlers; using SafeExamBrowser.Browser.Handlers;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts;

View file

@ -7,7 +7,7 @@
*/ */
using System; using System;
using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Settings.Browser;
namespace SafeExamBrowser.Browser.Filters namespace SafeExamBrowser.Browser.Filters
{ {

View file

@ -14,7 +14,7 @@ using CefSharp;
using SafeExamBrowser.Browser.Contracts.Events; using SafeExamBrowser.Browser.Contracts.Events;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; using BrowserSettings = SafeExamBrowser.Settings.Browser.BrowserSettings;
namespace SafeExamBrowser.Browser.Handlers namespace SafeExamBrowser.Browser.Handlers
{ {

View file

@ -10,7 +10,7 @@ using CefSharp;
using SafeExamBrowser.Browser.Filters; using SafeExamBrowser.Browser.Filters;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; using BrowserSettings = SafeExamBrowser.Settings.Browser.BrowserSettings;
namespace SafeExamBrowser.Browser.Handlers namespace SafeExamBrowser.Browser.Handlers
{ {

View file

@ -11,7 +11,7 @@ using System.Collections.Specialized;
using CefSharp; using CefSharp;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.Browser.BrowserSettings; using BrowserSettings = SafeExamBrowser.Settings.Browser.BrowserSettings;
namespace SafeExamBrowser.Browser.Handlers namespace SafeExamBrowser.Browser.Handlers
{ {

View file

@ -110,6 +110,10 @@
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.UserInterface.Contracts\SafeExamBrowser.UserInterface.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.UserInterface.Contracts\SafeExamBrowser.UserInterface.Contracts.csproj">
<Project>{c7889e97-6ff6-4a58-b7cb-521ed276b316}</Project> <Project>{c7889e97-6ff6-4a58-b7cb-521ed276b316}</Project>
<Name>SafeExamBrowser.UserInterface.Contracts</Name> <Name>SafeExamBrowser.UserInterface.Contracts</Name>

View file

@ -10,7 +10,6 @@ using System;
using SafeExamBrowser.Browser.Contracts; using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
namespace SafeExamBrowser.Client.Contracts namespace SafeExamBrowser.Client.Contracts
{ {
@ -42,7 +41,7 @@ namespace SafeExamBrowser.Client.Contracts
/// <summary> /// <summary>
/// The settings to be used during application execution. /// The settings to be used during application execution.
/// </summary> /// </summary>
Settings Settings { set; } Settings.ApplicationSettings Settings { set; }
/// <summary> /// <summary>
/// Reverts any changes, releases all used resources and terminates the client. /// Reverts any changes, releases all used resources and terminates the client.

View file

@ -75,6 +75,10 @@
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project> <Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name> <Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View file

@ -17,7 +17,7 @@ using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
@ -49,7 +49,7 @@ namespace SafeExamBrowser.Client.UnitTests
private Mock<IOperationSequence> operationSequence; private Mock<IOperationSequence> operationSequence;
private Mock<IRuntimeProxy> runtimeProxy; private Mock<IRuntimeProxy> runtimeProxy;
private Guid sessionId; private Guid sessionId;
private Settings settings; private ApplicationSettings settings;
private Mock<Action> shutdown; private Mock<Action> shutdown;
private Mock<ITaskbar> taskbar; private Mock<ITaskbar> taskbar;
private Mock<ITerminationActivator> terminationActivator; private Mock<ITerminationActivator> terminationActivator;
@ -75,7 +75,7 @@ namespace SafeExamBrowser.Client.UnitTests
operationSequence = new Mock<IOperationSequence>(); operationSequence = new Mock<IOperationSequence>();
runtimeProxy = new Mock<IRuntimeProxy>(); runtimeProxy = new Mock<IRuntimeProxy>();
sessionId = Guid.NewGuid(); sessionId = Guid.NewGuid();
settings = new Settings(); settings = new ApplicationSettings();
shutdown = new Mock<Action>(); shutdown = new Mock<Action>();
taskbar = new Mock<ITaskbar>(); taskbar = new Mock<ITaskbar>();
terminationActivator = new Mock<ITerminationActivator>(); terminationActivator = new Mock<ITerminationActivator>();

View file

@ -13,7 +13,7 @@ using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Communication.Contracts.Data; using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
@ -46,7 +46,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
{ {
AppConfig = new AppConfig(), AppConfig = new AppConfig(),
SessionId = Guid.NewGuid(), SessionId = Guid.NewGuid(),
Settings = new Settings() Settings = new ApplicationSettings()
} }
}; };

View file

@ -9,7 +9,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Client.Operations; using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Processes; using SafeExamBrowser.Monitoring.Contracts.Processes;
@ -20,7 +20,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
{ {
private Mock<ILogger> logger; private Mock<ILogger> logger;
private Mock<IProcessMonitor> processMonitor; private Mock<IProcessMonitor> processMonitor;
private Settings settings; private ApplicationSettings settings;
private ProcessMonitorOperation sut; private ProcessMonitorOperation sut;
[TestInitialize] [TestInitialize]
@ -28,7 +28,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
{ {
logger = new Mock<ILogger>(); logger = new Mock<ILogger>();
processMonitor = new Mock<IProcessMonitor>(); processMonitor = new Mock<IProcessMonitor>();
settings = new Settings(); settings = new ApplicationSettings();
sut = new ProcessMonitorOperation(logger.Object, processMonitor.Object,settings); sut = new ProcessMonitorOperation(logger.Object, processMonitor.Object,settings);
} }

View file

@ -11,7 +11,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Client.Operations; using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts; using SafeExamBrowser.SystemComponents.Contracts;

View file

@ -9,7 +9,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Client.Operations; using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Windows; using SafeExamBrowser.Monitoring.Contracts.Windows;

View file

@ -155,6 +155,10 @@
<Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project> <Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project>
<Name>SafeExamBrowser.Monitoring.Contracts</Name> <Name>SafeExamBrowser.Monitoring.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -17,7 +17,7 @@ using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
@ -56,7 +56,7 @@ namespace SafeExamBrowser.Client
public IBrowserApplication Browser { private get; set; } public IBrowserApplication Browser { private get; set; }
public IClientHost ClientHost { private get; set; } public IClientHost ClientHost { private get; set; }
public Guid SessionId { private get; set; } public Guid SessionId { private get; set; }
public Settings Settings { private get; set; } public ApplicationSettings Settings { private get; set; }
public AppConfig AppConfig public AppConfig AppConfig
{ {

View file

@ -23,7 +23,7 @@ using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Communication.Hosts; using SafeExamBrowser.Communication.Hosts;
using SafeExamBrowser.Communication.Proxies; using SafeExamBrowser.Communication.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
using SafeExamBrowser.Configuration.Cryptography; using SafeExamBrowser.Configuration.Cryptography;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.OperationModel; using SafeExamBrowser.Core.OperationModel;
@ -52,6 +52,7 @@ using SafeExamBrowser.WindowsApi;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
using Desktop = SafeExamBrowser.UserInterface.Desktop; using Desktop = SafeExamBrowser.UserInterface.Desktop;
using Mobile = SafeExamBrowser.UserInterface.Mobile; using Mobile = SafeExamBrowser.UserInterface.Mobile;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Client namespace SafeExamBrowser.Client
{ {

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
@ -19,12 +19,12 @@ namespace SafeExamBrowser.Client.Operations
{ {
private ILogger logger; private ILogger logger;
private IProcessMonitor processMonitor; private IProcessMonitor processMonitor;
private Settings settings; private ApplicationSettings settings;
public event ActionRequiredEventHandler ActionRequired { add { } remove { } } public event ActionRequiredEventHandler ActionRequired { add { } remove { } }
public event StatusChangedEventHandler StatusChanged; public event StatusChangedEventHandler StatusChanged;
public ProcessMonitorOperation(ILogger logger, IProcessMonitor processMonitor, Settings settings) public ProcessMonitorOperation(ILogger logger, IProcessMonitor processMonitor, ApplicationSettings settings)
{ {
this.logger = logger; this.logger = logger;
this.processMonitor = processMonitor; this.processMonitor = processMonitor;

View file

@ -8,7 +8,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;

View file

@ -8,10 +8,11 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace SafeExamBrowser.Client.Properties { namespace SafeExamBrowser.Client.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {

View file

@ -184,6 +184,10 @@
<Project>{EF563531-4EB5-44B9-A5EC-D6D6F204469B}</Project> <Project>{EF563531-4EB5-44B9-A5EC-D6D6F204469B}</Project>
<Name>SafeExamBrowser.Monitoring</Name> <Name>SafeExamBrowser.Monitoring</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -29,6 +29,6 @@ namespace SafeExamBrowser.Configuration.Contracts
/// <summary> /// <summary>
/// The application settings to be used by the client. /// The application settings to be used by the client.
/// </summary> /// </summary>
public Settings.Settings Settings { get; set; } public Settings.ApplicationSettings Settings { get; set; }
} }
} }

View file

@ -36,7 +36,7 @@ namespace SafeExamBrowser.Configuration.Contracts
/// <summary> /// <summary>
/// Loads the default settings. /// Loads the default settings.
/// </summary> /// </summary>
Settings.Settings LoadDefaultSettings(); Settings.ApplicationSettings LoadDefaultSettings();
/// <summary> /// <summary>
/// Registers the specified <see cref="IDataParser"/> to be used to parse configuration data. /// Registers the specified <see cref="IDataParser"/> to be used to parse configuration data.
@ -61,6 +61,6 @@ namespace SafeExamBrowser.Configuration.Contracts
/// <summary> /// <summary>
/// Attempts to load settings from the specified resource. /// Attempts to load settings from the specified resource.
/// </summary> /// </summary>
LoadStatus TryLoadSettings(Uri resource, out Settings.Settings settings, PasswordParameters password = null); LoadStatus TryLoadSettings(Uri resource, out Settings.ApplicationSettings settings, PasswordParameters password = null);
} }
} }

View file

@ -76,27 +76,11 @@
<Compile Include="SaveStatus.cs" /> <Compile Include="SaveStatus.cs" />
<Compile Include="ServiceConfiguration.cs" /> <Compile Include="ServiceConfiguration.cs" />
<Compile Include="SessionConfiguration.cs" /> <Compile Include="SessionConfiguration.cs" />
<Compile Include="Settings\UserInterface\ActionCenterSettings.cs" />
<Compile Include="Settings\SystemComponents\AudioSettings.cs" />
<Compile Include="Settings\Browser\BrowserSettings.cs" />
<Compile Include="Settings\Browser\BrowserWindowSettings.cs" />
<Compile Include="Settings\Browser\FilterResult.cs" />
<Compile Include="Settings\Browser\FilterRule.cs" />
<Compile Include="Settings\Browser\FilterType.cs" />
<Compile Include="Settings\ConfigurationMode.cs" />
<Compile Include="Settings\Monitoring\KeyboardSettings.cs" />
<Compile Include="Settings\KioskMode.cs" />
<Compile Include="Settings\Monitoring\MouseSettings.cs" />
<Compile Include="Settings\Service\ServicePolicy.cs" />
<Compile Include="Settings\Service\ServiceSettings.cs" />
<Compile Include="Settings\Settings.cs" />
<Compile Include="Settings\UserInterface\TaskbarSettings.cs" />
<Compile Include="Settings\UserInterface\UserInterfaceMode.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Settings</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -29,7 +29,7 @@ namespace SafeExamBrowser.Configuration.Contracts
/// <summary> /// <summary>
/// The application settings to be used by the service. /// The application settings to be used by the service.
/// </summary> /// </summary>
public Settings.Settings Settings { get; set; } public Settings.ApplicationSettings Settings { get; set; }
/// <summary> /// <summary>
/// The user name of the currently logged in user. /// The user name of the currently logged in user.

View file

@ -33,6 +33,6 @@ namespace SafeExamBrowser.Configuration.Contracts
/// <summary> /// <summary>
/// The settings used for this session. /// The settings used for this session.
/// </summary> /// </summary>
public Settings.Settings Settings { get; set; } public Settings.ApplicationSettings Settings { get; set; }
} }
} }

View file

@ -122,6 +122,10 @@
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="DataFormats\XmlTestData.xml"> <EmbeddedResource Include="DataFormats\XmlTestData.xml">

View file

@ -6,13 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapInitialVolumeLevel(Settings settings, object value) private void MapInitialVolumeLevel(ApplicationSettings settings, object value)
{ {
if (value is int volume) if (value is int volume)
{ {
@ -20,7 +20,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapMuteAudio(Settings settings, object value) private void MapMuteAudio(ApplicationSettings settings, object value)
{ {
if (value is bool mute) if (value is bool mute)
{ {
@ -28,7 +28,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapSetInitialVolumeLevel(Settings settings, object value) private void MapSetInitialVolumeLevel(ApplicationSettings settings, object value)
{ {
if (value is bool initialize) if (value is bool initialize)
{ {

View file

@ -7,15 +7,15 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapAllowAddressBar(Settings settings, object value) private void MapAllowAddressBar(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -23,7 +23,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowAddressBarAdditionalWindow(Settings settings, object value) private void MapAllowAddressBarAdditionalWindow(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -31,7 +31,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowConfigurationDownloads(Settings settings, object value) private void MapAllowConfigurationDownloads(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -39,7 +39,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowDeveloperConsole(Settings settings, object value) private void MapAllowDeveloperConsole(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -48,7 +48,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowDownloads(Settings settings, object value) private void MapAllowDownloads(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -56,7 +56,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowNavigation(Settings settings, object value) private void MapAllowNavigation(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -65,7 +65,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowNavigationAdditionalWindow(Settings settings, object value) private void MapAllowNavigationAdditionalWindow(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -74,7 +74,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowPageZoom(Settings settings, object value) private void MapAllowPageZoom(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -82,7 +82,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowPopups(Settings settings, object value) private void MapAllowPopups(ApplicationSettings settings, object value)
{ {
if (value is bool block) if (value is bool block)
{ {
@ -90,7 +90,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowReload(Settings settings, object value) private void MapAllowReload(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -98,7 +98,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAllowReloadAdditionalWindow(Settings settings, object value) private void MapAllowReloadAdditionalWindow(ApplicationSettings settings, object value)
{ {
if (value is bool allow) if (value is bool allow)
{ {
@ -106,7 +106,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableContentRequestFilter(Settings settings, object value) private void MapEnableContentRequestFilter(ApplicationSettings settings, object value)
{ {
if (value is bool filter) if (value is bool filter)
{ {
@ -114,7 +114,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableMainRequestFilter(Settings settings, object value) private void MapEnableMainRequestFilter(ApplicationSettings settings, object value)
{ {
if (value is bool filter) if (value is bool filter)
{ {
@ -122,7 +122,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapUrlFilterRules(Settings settings, object value) private void MapUrlFilterRules(ApplicationSettings settings, object value)
{ {
const int ALLOW = 1; const int ALLOW = 1;
@ -155,7 +155,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapMainWindowMode(Settings settings, object value) private void MapMainWindowMode(ApplicationSettings settings, object value)
{ {
const int FULLSCREEN = 1; const int FULLSCREEN = 1;
@ -165,7 +165,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapShowReloadWarning(Settings settings, object value) private void MapShowReloadWarning(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -173,7 +173,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapShowReloadWarningAdditionalWindow(Settings settings, object value) private void MapShowReloadWarningAdditionalWindow(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -181,7 +181,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapUserAgentMode(IDictionary<string, object> rawData, Settings settings) private void MapUserAgentMode(IDictionary<string, object> rawData, ApplicationSettings settings)
{ {
const int DEFAULT = 0; const int DEFAULT = 0;

View file

@ -6,13 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapConfigurationMode(Settings settings, object value) private void MapConfigurationMode(ApplicationSettings settings, object value)
{ {
const int CONFIGURE_CLIENT = 1; const int CONFIGURE_CLIENT = 1;

View file

@ -7,14 +7,14 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapAdminPasswordHash(Settings settings, object value) private void MapAdminPasswordHash(ApplicationSettings settings, object value)
{ {
if (value is string hash) if (value is string hash)
{ {
@ -22,7 +22,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapApplicationLogAccess(IDictionary<string, object> rawData, Settings settings) private void MapApplicationLogAccess(IDictionary<string, object> rawData, ApplicationSettings settings)
{ {
var hasValue = rawData.TryGetValue(Keys.General.AllowApplicationLog, out var value); var hasValue = rawData.TryGetValue(Keys.General.AllowApplicationLog, out var value);
@ -42,7 +42,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapLogLevel(Settings settings, object value) private void MapLogLevel(ApplicationSettings settings, object value)
{ {
const int ERROR = 0, WARNING = 1, INFO = 2; const int ERROR = 0, WARNING = 1, INFO = 2;
@ -52,7 +52,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapQuitPasswordHash(Settings settings, object value) private void MapQuitPasswordHash(ApplicationSettings settings, object value)
{ {
if (value is string hash) if (value is string hash)
{ {
@ -60,7 +60,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapStartUrl(Settings settings, object value) private void MapStartUrl(ApplicationSettings settings, object value)
{ {
if (value is string url) if (value is string url)
{ {

View file

@ -6,13 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapEnableAltEsc(Settings settings, object value) private void MapEnableAltEsc(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -20,7 +20,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableAltF4(Settings settings, object value) private void MapEnableAltF4(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -28,7 +28,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableAltTab(Settings settings, object value) private void MapEnableAltTab(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -36,7 +36,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableCtrlEsc(Settings settings, object value) private void MapEnableCtrlEsc(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -44,7 +44,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableEsc(Settings settings, object value) private void MapEnableEsc(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -52,7 +52,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF1(Settings settings, object value) private void MapEnableF1(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -60,7 +60,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF2(Settings settings, object value) private void MapEnableF2(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -68,7 +68,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF3(Settings settings, object value) private void MapEnableF3(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -76,7 +76,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF4(Settings settings, object value) private void MapEnableF4(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -84,7 +84,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF5(Settings settings, object value) private void MapEnableF5(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -92,7 +92,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF6(Settings settings, object value) private void MapEnableF6(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -100,7 +100,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF7(Settings settings, object value) private void MapEnableF7(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -108,7 +108,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF8(Settings settings, object value) private void MapEnableF8(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -116,7 +116,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF9(Settings settings, object value) private void MapEnableF9(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -124,7 +124,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF10(Settings settings, object value) private void MapEnableF10(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -132,7 +132,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF11(Settings settings, object value) private void MapEnableF11(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -140,7 +140,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableF12(Settings settings, object value) private void MapEnableF12(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -148,7 +148,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnablePrintScreen(Settings settings, object value) private void MapEnablePrintScreen(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -156,7 +156,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableSystemKey(Settings settings, object value) private void MapEnableSystemKey(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {
@ -164,7 +164,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapEnableRightMouse(Settings settings, object value) private void MapEnableRightMouse(ApplicationSettings settings, object value)
{ {
if (value is bool enabled) if (value is bool enabled)
{ {

View file

@ -7,14 +7,14 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapKioskMode(IDictionary<string, object> rawData, Settings settings) private void MapKioskMode(IDictionary<string, object> rawData, ApplicationSettings settings)
{ {
var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop); var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop);
var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell); var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell);
@ -35,7 +35,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapServicePolicy(Settings settings, object value) private void MapServicePolicy(ApplicationSettings settings, object value)
{ {
const int WARN = 1; const int WARN = 1;
const int FORCE = 2; const int FORCE = 2;

View file

@ -6,14 +6,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
private void MapApplicationLogButton(Settings settings, object value) private void MapApplicationLogButton(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -21,7 +21,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapAudio(Settings settings, object value) private void MapAudio(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -30,7 +30,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapClock(Settings settings, object value) private void MapClock(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -39,7 +39,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapKeyboardLayout(Settings settings, object value) private void MapKeyboardLayout(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -48,7 +48,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapWirelessNetwork(Settings settings, object value) private void MapWirelessNetwork(ApplicationSettings settings, object value)
{ {
if (value is bool show) if (value is bool show)
{ {
@ -57,7 +57,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapUserInterfaceMode(Settings settings, object value) private void MapUserInterfaceMode(ApplicationSettings settings, object value)
{ {
if (value is bool mobile) if (value is bool mobile)
{ {

View file

@ -7,13 +7,13 @@
*/ */
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
internal partial class DataMapper internal partial class DataMapper
{ {
internal void MapRawDataToSettings(IDictionary<string, object> rawData, Settings settings) internal void MapRawDataToSettings(IDictionary<string, object> rawData, ApplicationSettings settings)
{ {
foreach (var item in rawData) foreach (var item in rawData)
{ {
@ -31,7 +31,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
MapUserAgentMode(rawData, settings); MapUserAgentMode(rawData, settings);
} }
private void MapAudioSettings(string key, object value, Settings settings) private void MapAudioSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -47,7 +47,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapBrowserSettings(string key, object value, Settings settings) private void MapBrowserSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -105,7 +105,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapConfigurationFileSettings(string key, object value, Settings settings) private void MapConfigurationFileSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -115,7 +115,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapGeneralSettings(string key, object value, Settings settings) private void MapGeneralSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -134,7 +134,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapInputSettings(string key, object value, Settings settings) private void MapInputSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -201,7 +201,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapSecuritySettings(string key, object value, Settings settings) private void MapSecuritySettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {
@ -211,7 +211,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
} }
} }
private void MapUserInterfaceSettings(string key, object value, Settings settings) private void MapUserInterfaceSettings(string key, object value, ApplicationSettings settings)
{ {
switch (key) switch (key)
{ {

View file

@ -9,10 +9,11 @@
using System; using System;
using System.IO; using System.IO;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.UserInterface;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Configuration.ConfigurationData namespace SafeExamBrowser.Configuration.ConfigurationData
{ {
@ -98,9 +99,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
return configuration; return configuration;
} }
internal Settings LoadDefaultSettings() internal ApplicationSettings LoadDefaultSettings()
{ {
var settings = new Settings(); var settings = new ApplicationSettings();
settings.ActionCenter.EnableActionCenter = true; settings.ActionCenter.EnableActionCenter = true;
settings.ActionCenter.ShowApplicationInfo = true; settings.ActionCenter.ShowApplicationInfo = true;

View file

@ -15,7 +15,7 @@ using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.DataFormats; using SafeExamBrowser.Configuration.Contracts.DataFormats;
using SafeExamBrowser.Configuration.Contracts.DataResources; using SafeExamBrowser.Configuration.Contracts.DataResources;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Configuration namespace SafeExamBrowser.Configuration
@ -100,7 +100,7 @@ namespace SafeExamBrowser.Configuration
return dataValues.InitializeSessionConfiguration(); return dataValues.InitializeSessionConfiguration();
} }
public Settings LoadDefaultSettings() public ApplicationSettings LoadDefaultSettings()
{ {
return dataValues.LoadDefaultSettings(); return dataValues.LoadDefaultSettings();
} }
@ -125,7 +125,7 @@ namespace SafeExamBrowser.Configuration
resourceSavers.Add(saver); resourceSavers.Add(saver);
} }
public LoadStatus TryLoadSettings(Uri resource, out Settings settings, PasswordParameters password = null) public LoadStatus TryLoadSettings(Uri resource, out ApplicationSettings settings, PasswordParameters password = null)
{ {
logger.Info($"Attempting to load '{resource}'..."); logger.Info($"Attempting to load '{resource}'...");

View file

@ -107,6 +107,10 @@
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View file

@ -7,6 +7,7 @@
*/ */
using System; using System;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging.Contracts namespace SafeExamBrowser.Logging.Contracts
{ {

View file

@ -8,6 +8,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging.Contracts namespace SafeExamBrowser.Logging.Contracts
{ {

View file

@ -1,21 +0,0 @@
/*
* Copyright (c) 2019 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/.
*/
namespace SafeExamBrowser.Logging.Contracts
{
/// <summary>
/// Defines all possible severity levels supported by the application's <see cref="ILogger"/>.
/// </summary>
public enum LogLevel
{
Debug,
Info,
Warning,
Error
}
}

View file

@ -61,8 +61,13 @@
<Compile Include="ILogText.cs" /> <Compile Include="ILogText.cs" />
<Compile Include="IModuleLogger.cs" /> <Compile Include="IModuleLogger.cs" />
<Compile Include="IThreadInfo.cs" /> <Compile Include="IThreadInfo.cs" />
<Compile Include="LogLevel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View file

@ -8,7 +8,7 @@
using System; using System;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging.UnitTests namespace SafeExamBrowser.Logging.UnitTests
{ {

View file

@ -11,6 +11,7 @@ using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging.UnitTests namespace SafeExamBrowser.Logging.UnitTests
{ {

View file

@ -10,6 +10,7 @@ using System;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging.UnitTests namespace SafeExamBrowser.Logging.UnitTests
{ {

View file

@ -105,6 +105,10 @@
<Project>{e107026c-2011-4552-a7d8-3a0d37881df6}</Project> <Project>{e107026c-2011-4552-a7d8-3a0d37881df6}</Project>
<Name>SafeExamBrowser.Logging</Name> <Name>SafeExamBrowser.Logging</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -8,6 +8,7 @@
using System; using System;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging namespace SafeExamBrowser.Logging
{ {

View file

@ -12,6 +12,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging namespace SafeExamBrowser.Logging
{ {

View file

@ -9,6 +9,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Logging namespace SafeExamBrowser.Logging
{ {

View file

@ -68,6 +68,10 @@
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View file

@ -9,7 +9,7 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Windows.Input; using System.Windows.Input;
using SafeExamBrowser.Configuration.Contracts.Settings.Monitoring; using SafeExamBrowser.Settings.Monitoring;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Keyboard; using SafeExamBrowser.Monitoring.Contracts.Keyboard;

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings.Monitoring; using SafeExamBrowser.Settings.Monitoring;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Mouse; using SafeExamBrowser.Monitoring.Contracts.Mouse;

View file

@ -65,10 +65,6 @@
<Compile Include="Windows\WindowMonitor.cs" /> <Compile Include="Windows\WindowMonitor.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Configuration.Contracts\SafeExamBrowser.Configuration.Contracts.csproj">
<Project>{7d74555e-63e1-4c46-bd0a-8580552368c8}</Project>
<Name>SafeExamBrowser.Configuration.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
@ -77,6 +73,10 @@
<Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project> <Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project>
<Name>SafeExamBrowser.Monitoring.Contracts</Name> <Name>SafeExamBrowser.Monitoring.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -9,11 +9,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using SafeExamBrowser.Lockdown.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Lockdown; using SafeExamBrowser.Lockdown;
using SafeExamBrowser.Lockdown.Contracts;
using SafeExamBrowser.Logging; using SafeExamBrowser.Logging;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.ResetUtility.Procedure; using SafeExamBrowser.ResetUtility.Procedure;
using SafeExamBrowser.Settings.Logging;
using SafeExamBrowser.SystemComponents; using SafeExamBrowser.SystemComponents;
namespace SafeExamBrowser.ResetUtility namespace SafeExamBrowser.ResetUtility

View file

@ -9,6 +9,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.ResetUtility.Procedure namespace SafeExamBrowser.ResetUtility.Procedure
{ {

View file

@ -104,6 +104,10 @@
<Project>{e107026c-2011-4552-a7d8-3a0d37881df6}</Project> <Project>{e107026c-2011-4552-a7d8-3a0d37881df6}</Project>
<Name>SafeExamBrowser.Logging</Name> <Name>SafeExamBrowser.Logging</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -15,7 +15,7 @@ using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Events; using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Runtime.Communication; using SafeExamBrowser.Runtime.Communication;
using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.MessageBox;
@ -171,7 +171,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Communication
public void MustHandleConfigurationRequestCorrectly() public void MustHandleConfigurationRequestCorrectly()
{ {
var args = default(ClientConfigurationEventArgs); var args = default(ClientConfigurationEventArgs);
var configuration = new ClientConfiguration { Settings = new Settings { AdminPasswordHash = "12345" } }; var configuration = new ClientConfiguration { Settings = new ApplicationSettings { AdminPasswordHash = "12345" } };
sut.AllowConnection = true; sut.AllowConnection = true;
sut.ClientConfigurationNeeded += (a) => { args = a; args.ClientConfiguration = configuration; }; sut.ClientConfigurationNeeded += (a) => { args = a; args.ClientConfiguration = configuration; };

View file

@ -15,7 +15,7 @@ using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
@ -37,7 +37,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
private Mock<IRuntimeHost> runtimeHost; private Mock<IRuntimeHost> runtimeHost;
private SessionConfiguration session; private SessionConfiguration session;
private SessionContext sessionContext; private SessionContext sessionContext;
private Settings settings; private ApplicationSettings settings;
private ClientOperation sut; private ClientOperation sut;
[TestInitialize] [TestInitialize]
@ -53,7 +53,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
runtimeHost = new Mock<IRuntimeHost>(); runtimeHost = new Mock<IRuntimeHost>();
session = new SessionConfiguration(); session = new SessionConfiguration();
sessionContext = new SessionContext(); sessionContext = new SessionContext();
settings = new Settings(); settings = new ApplicationSettings();
terminated = new Action(() => terminated = new Action(() =>
{ {
runtimeHost.Raise(h => h.ClientDisconnected += null); runtimeHost.Raise(h => h.ClientDisconnected += null);

View file

@ -13,7 +13,7 @@ using Moq;
using SafeExamBrowser.Communication.Contracts.Data; using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Runtime.Operations; using SafeExamBrowser.Runtime.Operations;
@ -56,7 +56,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustUseCommandLineArgumentAs1stPrio() public void Perform_MustUseCommandLineArgumentAs1stPrio()
{ {
var settings = new Settings { ConfigurationMode = ConfigurationMode.Exam }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.Exam };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
@ -77,7 +77,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustUseProgramDataAs2ndPrio() public void Perform_MustUseProgramDataAs2ndPrio()
{ {
var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
var settings = default(Settings); var settings = default(ApplicationSettings);
appConfig.ProgramDataFilePath = location; appConfig.ProgramDataFilePath = location;
@ -94,7 +94,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustUseAppDataAs3rdPrio() public void Perform_MustUseAppDataAs3rdPrio()
{ {
var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
var settings = default(Settings); var settings = default(ApplicationSettings);
appConfig.AppDataFilePath = location; appConfig.AppDataFilePath = location;
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success);
@ -109,7 +109,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustTestdatalyHandleBrowserResource() public void Perform_MustTestdatalyHandleBrowserResource()
{ {
var settings = new Settings { ConfigurationMode = ConfigurationMode.Exam }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.Exam };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
nextSession.Settings = settings; nextSession.Settings = settings;
@ -125,7 +125,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustFallbackToDefaultsAsLastPrio() public void Perform_MustFallbackToDefaultsAsLastPrio()
{ {
var defaultSettings = new Settings(); var defaultSettings = new ApplicationSettings();
repository.Setup(r => r.LoadDefaultSettings()).Returns(defaultSettings); repository.Setup(r => r.LoadDefaultSettings()).Returns(defaultSettings);
@ -141,7 +141,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustAbortIfWishedByUser() public void Perform_MustAbortIfWishedByUser()
{ {
var settings = new Settings(); var settings = new ApplicationSettings();
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
sessionContext.Current = null; sessionContext.Current = null;
@ -166,7 +166,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustNotAbortIfNotWishedByUser() public void Perform_MustNotAbortIfNotWishedByUser()
{ {
var settings = new Settings(); var settings = new ApplicationSettings();
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
settings.ConfigurationMode = ConfigurationMode.ConfigureClient; settings.ConfigurationMode = ConfigurationMode.ConfigureClient;
@ -191,7 +191,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustInformAboutClientConfigurationError() public void Perform_MustInformAboutClientConfigurationError()
{ {
var informed = false; var informed = false;
var settings = new Settings(); var settings = new ApplicationSettings();
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
settings.ConfigurationMode = ConfigurationMode.ConfigureClient; settings.ConfigurationMode = ConfigurationMode.ConfigureClient;
@ -216,7 +216,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustNotAllowToAbortIfNotInConfigureClientMode() public void Perform_MustNotAllowToAbortIfNotInConfigureClientMode()
{ {
var settings = new Settings(); var settings = new ApplicationSettings();
settings.ConfigurationMode = ConfigurationMode.Exam; settings.ConfigurationMode = ConfigurationMode.Exam;
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success);
@ -238,7 +238,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustNotFailWithoutCommandLineArgs() public void Perform_MustNotFailWithoutCommandLineArgs()
{ {
var defaultSettings = new Settings(); var defaultSettings = new ApplicationSettings();
var result = OperationResult.Failed; var result = OperationResult.Failed;
repository.Setup(r => r.LoadDefaultSettings()).Returns(defaultSettings); repository.Setup(r => r.LoadDefaultSettings()).Returns(defaultSettings);
@ -272,8 +272,8 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustOnlyAllowToEnterAdminPasswordFiveTimes() public void Perform_MustOnlyAllowToEnterAdminPasswordFiveTimes()
{ {
var count = 0; var count = 0;
var localSettings = new Settings { AdminPasswordHash = "1234" }; var localSettings = new ApplicationSettings { AdminPasswordHash = "1234" };
var settings = new Settings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient }; var settings = new ApplicationSettings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
appConfig.AppDataFilePath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); appConfig.AppDataFilePath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
@ -302,7 +302,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustOnlyAllowToEnterSettingsPasswordFiveTimes() public void Perform_MustOnlyAllowToEnterSettingsPasswordFiveTimes()
{ {
var count = 0; var count = 0;
var settings = default(Settings); var settings = default(ApplicationSettings);
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded);
@ -329,8 +329,8 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustSucceedIfAdminPasswordTestdata() public void Perform_MustSucceedIfAdminPasswordTestdata()
{ {
var password = "test"; var password = "test";
var currentSettings = new Settings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient }; var currentSettings = new ApplicationSettings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient };
var nextSettings = new Settings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient }; var nextSettings = new ApplicationSettings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
nextSession.Settings = nextSettings; nextSession.Settings = nextSettings;
@ -359,8 +359,8 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustNotAuthenticateIfSameAdminPassword() public void Perform_MustNotAuthenticateIfSameAdminPassword()
{ {
var currentSettings = new Settings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient }; var currentSettings = new ApplicationSettings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient };
var nextSettings = new Settings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient }; var nextSettings = new ApplicationSettings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
nextSession.Settings = nextSettings; nextSession.Settings = nextSettings;
@ -388,7 +388,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustSucceedIfSettingsPasswordTestdata() public void Perform_MustSucceedIfSettingsPasswordTestdata()
{ {
var password = "test"; var password = "test";
var settings = new Settings { ConfigurationMode = ConfigurationMode.Exam }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.Exam };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded);
@ -416,7 +416,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
{ {
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); var location = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
var settings = new Settings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.Exam }; var settings = new ApplicationSettings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.Exam };
appConfig.AppDataFilePath = location; appConfig.AppDataFilePath = location;
@ -442,8 +442,8 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Perform_MustAbortAskingForAdminPasswordIfDecidedByUser() public void Perform_MustAbortAskingForAdminPasswordIfDecidedByUser()
{ {
var password = "test"; var password = "test";
var currentSettings = new Settings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient }; var currentSettings = new ApplicationSettings { AdminPasswordHash = "1234", ConfigurationMode = ConfigurationMode.ConfigureClient };
var nextSettings = new Settings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient }; var nextSettings = new ApplicationSettings { AdminPasswordHash = "9876", ConfigurationMode = ConfigurationMode.ConfigureClient };
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
appConfig.AppDataFilePath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME); appConfig.AppDataFilePath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), nameof(Operations), "Testdata", FILE_NAME);
@ -472,7 +472,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Perform_MustAbortAskingForSettingsPasswordIfDecidedByUser() public void Perform_MustAbortAskingForSettingsPasswordIfDecidedByUser()
{ {
var settings = default(Settings); var settings = default(ApplicationSettings);
var url = @"http://www.safeexambrowser.org/whatever.seb"; var url = @"http://www.safeexambrowser.org/whatever.seb";
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.PasswordNeeded);
@ -494,10 +494,10 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Repeat_MustPerformForExamWithTestdataUri() public void Repeat_MustPerformForExamWithTestdataUri()
{ {
var currentSettings = new Settings(); var currentSettings = new ApplicationSettings();
var location = Path.GetDirectoryName(GetType().Assembly.Location); var location = Path.GetDirectoryName(GetType().Assembly.Location);
var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME)); var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME));
var settings = new Settings { ConfigurationMode = ConfigurationMode.Exam }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.Exam };
currentSession.Settings = currentSettings; currentSession.Settings = currentSettings;
sessionContext.ReconfigurationFilePath = resource.LocalPath; sessionContext.ReconfigurationFilePath = resource.LocalPath;
@ -515,10 +515,10 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Repeat_MustPerformForClientConfigurationWithTestdataUri() public void Repeat_MustPerformForClientConfigurationWithTestdataUri()
{ {
var currentSettings = new Settings(); var currentSettings = new ApplicationSettings();
var location = Path.GetDirectoryName(GetType().Assembly.Location); var location = Path.GetDirectoryName(GetType().Assembly.Location);
var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME)); var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME));
var settings = new Settings { ConfigurationMode = ConfigurationMode.ConfigureClient }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.ConfigureClient };
currentSession.Settings = currentSettings; currentSession.Settings = currentSettings;
sessionContext.ReconfigurationFilePath = resource.LocalPath; sessionContext.ReconfigurationFilePath = resource.LocalPath;
@ -538,7 +538,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Repeat_MustFailWithInvalidUri() public void Repeat_MustFailWithInvalidUri()
{ {
var resource = new Uri("file:///C:/does/not/exist.txt"); var resource = new Uri("file:///C:/does/not/exist.txt");
var settings = default(Settings); var settings = default(ApplicationSettings);
sessionContext.ReconfigurationFilePath = null; sessionContext.ReconfigurationFilePath = null;
repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success); repository.Setup(r => r.TryLoadSettings(It.IsAny<Uri>(), out settings, It.IsAny<PasswordParameters>())).Returns(LoadStatus.Success);
@ -559,10 +559,10 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
[TestMethod] [TestMethod]
public void Repeat_MustAbortForSettingsPasswordIfWishedByUser() public void Repeat_MustAbortForSettingsPasswordIfWishedByUser()
{ {
var currentSettings = new Settings(); var currentSettings = new ApplicationSettings();
var location = Path.GetDirectoryName(GetType().Assembly.Location); var location = Path.GetDirectoryName(GetType().Assembly.Location);
var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME)); var resource = new Uri(Path.Combine(location, nameof(Operations), "Testdata", FILE_NAME));
var settings = new Settings { ConfigurationMode = ConfigurationMode.ConfigureClient }; var settings = new ApplicationSettings { ConfigurationMode = ConfigurationMode.ConfigureClient };
currentSession.Settings = currentSettings; currentSession.Settings = currentSettings;
sessionContext.ReconfigurationFilePath = resource.LocalPath; sessionContext.ReconfigurationFilePath = resource.LocalPath;

View file

@ -9,7 +9,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
@ -21,12 +21,12 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public class KioskModeOperationTests public class KioskModeOperationTests
{ {
private SessionConfiguration currentSession; private SessionConfiguration currentSession;
private Settings currentSettings; private ApplicationSettings currentSettings;
private Mock<IDesktopFactory> desktopFactory; private Mock<IDesktopFactory> desktopFactory;
private Mock<IExplorerShell> explorerShell; private Mock<IExplorerShell> explorerShell;
private Mock<ILogger> logger; private Mock<ILogger> logger;
private SessionConfiguration nextSession; private SessionConfiguration nextSession;
private Settings nextSettings; private ApplicationSettings nextSettings;
private Mock<IProcessFactory> processFactory; private Mock<IProcessFactory> processFactory;
private SessionContext sessionContext; private SessionContext sessionContext;
@ -36,12 +36,12 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
public void Initialize() public void Initialize()
{ {
currentSession = new SessionConfiguration(); currentSession = new SessionConfiguration();
currentSettings = new Settings(); currentSettings = new ApplicationSettings();
desktopFactory = new Mock<IDesktopFactory>(); desktopFactory = new Mock<IDesktopFactory>();
explorerShell = new Mock<IExplorerShell>(); explorerShell = new Mock<IExplorerShell>();
logger = new Mock<ILogger>(); logger = new Mock<ILogger>();
nextSession = new SessionConfiguration(); nextSession = new SessionConfiguration();
nextSettings = new Settings(); nextSettings = new ApplicationSettings();
processFactory = new Mock<IProcessFactory>(); processFactory = new Mock<IProcessFactory>();
sessionContext = new SessionContext(); sessionContext = new SessionContext();

View file

@ -13,8 +13,8 @@ using Moq;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Runtime.Operations; using SafeExamBrowser.Runtime.Operations;
@ -34,7 +34,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
private EventWaitHandle serviceEvent; private EventWaitHandle serviceEvent;
private SessionConfiguration session; private SessionConfiguration session;
private SessionContext sessionContext; private SessionContext sessionContext;
private Settings settings; private ApplicationSettings settings;
private Mock<IUserInfo> userInfo; private Mock<IUserInfo> userInfo;
private ServiceOperation sut; private ServiceOperation sut;
@ -50,7 +50,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
serviceEvent = new EventWaitHandle(false, EventResetMode.AutoReset, serviceEventName); serviceEvent = new EventWaitHandle(false, EventResetMode.AutoReset, serviceEventName);
session = new SessionConfiguration(); session = new SessionConfiguration();
sessionContext = new SessionContext(); sessionContext = new SessionContext();
settings = new Settings(); settings = new ApplicationSettings();
userInfo = new Mock<IUserInfo>(); userInfo = new Mock<IUserInfo>();
appConfig.ServiceEventName = serviceEventName; appConfig.ServiceEventName = serviceEventName;

View file

@ -9,10 +9,11 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Runtime.Operations; using SafeExamBrowser.Runtime.Operations;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Runtime.UnitTests.Operations namespace SafeExamBrowser.Runtime.UnitTests.Operations
{ {
@ -22,7 +23,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
private SessionConfiguration currentSession; private SessionConfiguration currentSession;
private Mock<ILogger> logger; private Mock<ILogger> logger;
private SessionConfiguration nextSession; private SessionConfiguration nextSession;
private Settings nextSettings; private ApplicationSettings nextSettings;
private SessionContext sessionContext; private SessionContext sessionContext;
private SessionActivationOperation sut; private SessionActivationOperation sut;
@ -33,7 +34,7 @@ namespace SafeExamBrowser.Runtime.UnitTests.Operations
currentSession = new SessionConfiguration(); currentSession = new SessionConfiguration();
logger = new Mock<ILogger>(); logger = new Mock<ILogger>();
nextSession = new SessionConfiguration(); nextSession = new SessionConfiguration();
nextSettings = new Settings(); nextSettings = new ApplicationSettings();
sessionContext = new SessionContext(); sessionContext = new SessionContext();
nextSession.Settings = nextSettings; nextSession.Settings = nextSettings;

View file

@ -14,8 +14,8 @@ using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
@ -36,11 +36,11 @@ namespace SafeExamBrowser.Runtime.UnitTests
private Mock<IProcess> clientProcess; private Mock<IProcess> clientProcess;
private Mock<IClientProxy> clientProxy; private Mock<IClientProxy> clientProxy;
private SessionConfiguration currentSession; private SessionConfiguration currentSession;
private Settings currentSettings; private ApplicationSettings currentSettings;
private Mock<ILogger> logger; private Mock<ILogger> logger;
private Mock<IMessageBox> messageBox; private Mock<IMessageBox> messageBox;
private SessionConfiguration nextSession; private SessionConfiguration nextSession;
private Settings nextSettings; private ApplicationSettings nextSettings;
private Mock<Action> shutdown; private Mock<Action> shutdown;
private Mock<IText> text; private Mock<IText> text;
private Mock<IUserInterfaceFactory> uiFactory; private Mock<IUserInterfaceFactory> uiFactory;
@ -58,11 +58,11 @@ namespace SafeExamBrowser.Runtime.UnitTests
clientProcess = new Mock<IProcess>(); clientProcess = new Mock<IProcess>();
clientProxy = new Mock<IClientProxy>(); clientProxy = new Mock<IClientProxy>();
currentSession = new SessionConfiguration(); currentSession = new SessionConfiguration();
currentSettings = new Settings(); currentSettings = new ApplicationSettings();
logger = new Mock<ILogger>(); logger = new Mock<ILogger>();
messageBox = new Mock<IMessageBox>(); messageBox = new Mock<IMessageBox>();
nextSession = new SessionConfiguration(); nextSession = new SessionConfiguration();
nextSettings = new Settings(); nextSettings = new ApplicationSettings();
runtimeHost = new Mock<IRuntimeHost>(); runtimeHost = new Mock<IRuntimeHost>();
service = new Mock<IServiceProxy>(); service = new Mock<IServiceProxy>();
sessionContext = new SessionContext(); sessionContext = new SessionContext();
@ -134,7 +134,7 @@ namespace SafeExamBrowser.Runtime.UnitTests
var args = new ClientConfigurationEventArgs(); var args = new ClientConfigurationEventArgs();
var nextAppConfig = new AppConfig(); var nextAppConfig = new AppConfig();
var nextSessionId = Guid.NewGuid(); var nextSessionId = Guid.NewGuid();
var nextSettings = new Settings(); var nextSettings = new ApplicationSettings();
nextSession.AppConfig = nextAppConfig; nextSession.AppConfig = nextAppConfig;
nextSession.SessionId = nextSessionId; nextSession.SessionId = nextSessionId;

View file

@ -134,6 +134,10 @@
<Project>{e3aed2f8-b5df-45d1-ac19-48066923d6d8}</Project> <Project>{e3aed2f8-b5df-45d1-ac19-48066923d6d8}</Project>
<Name>SafeExamBrowser.Runtime</Name> <Name>SafeExamBrowser.Runtime</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -34,6 +34,7 @@ using SafeExamBrowser.Runtime.Operations;
using SafeExamBrowser.SystemComponents; using SafeExamBrowser.SystemComponents;
using SafeExamBrowser.UserInterface.Desktop; using SafeExamBrowser.UserInterface.Desktop;
using SafeExamBrowser.WindowsApi; using SafeExamBrowser.WindowsApi;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Runtime namespace SafeExamBrowser.Runtime
{ {

View file

@ -11,7 +11,7 @@ using System.IO;
using SafeExamBrowser.Communication.Contracts.Data; using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography; using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
@ -107,7 +107,7 @@ namespace SafeExamBrowser.Runtime.Operations
{ {
var currentPassword = default(string); var currentPassword = default(string);
var passwordParams = default(PasswordParameters); var passwordParams = default(PasswordParameters);
var settings = default(Settings); var settings = default(ApplicationSettings);
var status = default(LoadStatus?); var status = default(LoadStatus?);
if (source == UriSource.CommandLine) if (source == UriSource.CommandLine)
@ -161,7 +161,7 @@ namespace SafeExamBrowser.Runtime.Operations
} }
} }
private OperationResult DetermineLoadResult(Uri uri, UriSource source, Settings settings, LoadStatus status, PasswordParameters passwordParams, string currentPassword = default(string)) private OperationResult DetermineLoadResult(Uri uri, UriSource source, ApplicationSettings settings, LoadStatus status, PasswordParameters passwordParams, string currentPassword = default(string))
{ {
if (status == LoadStatus.LoadWithBrowser || status == LoadStatus.Success) if (status == LoadStatus.LoadWithBrowser || status == LoadStatus.Success)
{ {
@ -218,7 +218,7 @@ namespace SafeExamBrowser.Runtime.Operations
return OperationResult.Failed; return OperationResult.Failed;
} }
private LoadStatus? TryLoadSettings(Uri uri, UriSource source, out PasswordParameters passwordParams, out Settings settings, string currentPassword = default(string)) private LoadStatus? TryLoadSettings(Uri uri, UriSource source, out PasswordParameters passwordParams, out ApplicationSettings settings, string currentPassword = default(string))
{ {
passwordParams = new PasswordParameters { Password = string.Empty, IsHash = true }; passwordParams = new PasswordParameters { Password = string.Empty, IsHash = true };

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;

View file

@ -12,7 +12,7 @@ using System.Threading;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;

View file

@ -13,8 +13,8 @@ using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies; using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;

View file

@ -179,6 +179,10 @@
<Project>{5d0136b4-6d21-4f99-ae42-3fb7f478ae0a}</Project> <Project>{5d0136b4-6d21-4f99-ae42-3fb7f478ae0a}</Project>
<Name>SafeExamBrowser.Runtime.Contracts</Name> <Name>SafeExamBrowser.Runtime.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -12,7 +12,7 @@ using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Lockdown.Contracts; using SafeExamBrowser.Lockdown.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
@ -27,7 +27,7 @@ namespace SafeExamBrowser.Service.UnitTests.Operations
private Mock<IFeatureConfigurationFactory> factory; private Mock<IFeatureConfigurationFactory> factory;
private Mock<IFeatureConfigurationMonitor> monitor; private Mock<IFeatureConfigurationMonitor> monitor;
private Mock<ILogger> logger; private Mock<ILogger> logger;
private Settings settings; private ApplicationSettings settings;
private SessionContext sessionContext; private SessionContext sessionContext;
private LockdownOperation sut; private LockdownOperation sut;
@ -38,7 +38,7 @@ namespace SafeExamBrowser.Service.UnitTests.Operations
factory = new Mock<IFeatureConfigurationFactory>(); factory = new Mock<IFeatureConfigurationFactory>();
monitor = new Mock<IFeatureConfigurationMonitor>(); monitor = new Mock<IFeatureConfigurationMonitor>();
logger = new Mock<ILogger>(); logger = new Mock<ILogger>();
settings = new Settings(); settings = new ApplicationSettings();
sessionContext = new SessionContext sessionContext = new SessionContext
{ {
Configuration = new ServiceConfiguration { Settings = settings, UserName = "TestName", UserSid = "S-1-234-TEST" } Configuration = new ServiceConfiguration { Settings = settings, UserName = "TestName", UserSid = "S-1-234-TEST" }

View file

@ -12,11 +12,11 @@ using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq; using Moq;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Lockdown.Contracts; using SafeExamBrowser.Lockdown.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Service.Operations; using SafeExamBrowser.Service.Operations;
using SafeExamBrowser.Settings;
namespace SafeExamBrowser.Service.UnitTests.Operations namespace SafeExamBrowser.Service.UnitTests.Operations
{ {
@ -42,7 +42,7 @@ namespace SafeExamBrowser.Service.UnitTests.Operations
sessionContext.Configuration = new ServiceConfiguration sessionContext.Configuration = new ServiceConfiguration
{ {
AppConfig = new AppConfig { ServiceEventName = $"{nameof(SafeExamBrowser)}-{nameof(SessionInitializationOperationTests)}" }, AppConfig = new AppConfig { ServiceEventName = $"{nameof(SafeExamBrowser)}-{nameof(SessionInitializationOperationTests)}" },
Settings = new Settings() Settings = new ApplicationSettings()
}; };
sut = new SessionInitializationOperation(logger.Object, serviceEventFactory.Object, sessionContext); sut = new SessionInitializationOperation(logger.Object, serviceEventFactory.Object, sessionContext);

View file

@ -127,6 +127,10 @@
<Project>{fa3c6692-dfed-4afa-bd58-9a3da2753c78}</Project> <Project>{fa3c6692-dfed-4afa-bd58-9a3da2753c78}</Project>
<Name>SafeExamBrowser.Service</Name> <Name>SafeExamBrowser.Service</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />

View file

@ -13,10 +13,11 @@ using Moq;
using SafeExamBrowser.Communication.Contracts.Events; using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts; using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Lockdown.Contracts; using SafeExamBrowser.Lockdown.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Settings;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Service.UnitTests namespace SafeExamBrowser.Service.UnitTests
{ {
@ -81,7 +82,7 @@ namespace SafeExamBrowser.Service.UnitTests
{ {
AppConfig = new AppConfig { ServiceLogFilePath = "Test.log" }, AppConfig = new AppConfig { ServiceLogFilePath = "Test.log" },
SessionId = Guid.NewGuid(), SessionId = Guid.NewGuid(),
Settings = new Settings { LogLevel = LogLevel.Warning } Settings = new ApplicationSettings { LogLevel = LogLevel.Warning }
} }
}; };

View file

@ -16,14 +16,15 @@ using SafeExamBrowser.Communication.Hosts;
using SafeExamBrowser.Communication.Proxies; using SafeExamBrowser.Communication.Proxies;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Core.Contracts.OperationModel; using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Service.Contracts;
using SafeExamBrowser.Core.OperationModel; using SafeExamBrowser.Core.OperationModel;
using SafeExamBrowser.Core.Operations; using SafeExamBrowser.Core.Operations;
using SafeExamBrowser.Lockdown; using SafeExamBrowser.Lockdown;
using SafeExamBrowser.Logging; using SafeExamBrowser.Logging;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Service.Communication; using SafeExamBrowser.Service.Communication;
using SafeExamBrowser.Service.Contracts;
using SafeExamBrowser.Service.Operations; using SafeExamBrowser.Service.Operations;
using SafeExamBrowser.Settings.Logging;
namespace SafeExamBrowser.Service namespace SafeExamBrowser.Service
{ {

View file

@ -124,6 +124,10 @@
<Project>{5167820f-2be5-43cf-b1cc-e4874bf83808}</Project> <Project>{5167820f-2be5-43cf-b1cc-e4874bf83808}</Project>
<Name>SafeExamBrowser.Service.Contracts</Name> <Name>SafeExamBrowser.Service.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="SafeExamBrowser.ico" /> <Content Include="SafeExamBrowser.ico" />

View file

@ -7,20 +7,20 @@
*/ */
using System; using System;
using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.Configuration.Contracts.Settings.Monitoring; using SafeExamBrowser.Settings.Logging;
using SafeExamBrowser.Configuration.Contracts.Settings.Service; using SafeExamBrowser.Settings.Monitoring;
using SafeExamBrowser.Configuration.Contracts.Settings.SystemComponents; using SafeExamBrowser.Settings.Service;
using SafeExamBrowser.Configuration.Contracts.Settings.UserInterface; using SafeExamBrowser.Settings.SystemComponents;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Settings.UserInterface;
namespace SafeExamBrowser.Configuration.Contracts.Settings namespace SafeExamBrowser.Settings
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the application. /// Defines all settings for the application.
/// </summary> /// </summary>
[Serializable] [Serializable]
public class Settings public class ApplicationSettings
{ {
/// <summary> /// <summary>
/// All action center-related settings. /// All action center-related settings.
@ -92,7 +92,7 @@ namespace SafeExamBrowser.Configuration.Contracts.Settings
/// </summary> /// </summary>
public UserInterfaceMode UserInterfaceMode { get; set; } public UserInterfaceMode UserInterfaceMode { get; set; }
public Settings() public ApplicationSettings()
{ {
ActionCenter = new ActionCenterSettings(); ActionCenter = new ActionCenterSettings();
Audio = new AudioSettings(); Audio = new AudioSettings();

View file

@ -9,7 +9,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser namespace SafeExamBrowser.Settings.Browser
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the browser engine of the application. /// Defines all configuration options for the browser engine of the application.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser namespace SafeExamBrowser.Settings.Browser
{ {
/// <summary> /// <summary>
/// Defines all configuration options for a window of the browser engine. /// Defines all configuration options for a window of the browser engine.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser namespace SafeExamBrowser.Settings.Browser
{ {
/// <summary> /// <summary>
/// Defines all possible results of a request filter operation. /// Defines all possible results of a request filter operation.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser namespace SafeExamBrowser.Settings.Browser
{ {
/// <summary> /// <summary>
/// Defines a request filter rule. /// Defines a request filter rule.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings.Browser namespace SafeExamBrowser.Settings.Browser
{ {
/// <summary> /// <summary>
/// Defines all possible request filter types. /// Defines all possible request filter types.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings namespace SafeExamBrowser.Settings
{ {
/// <summary> /// <summary>
/// Defines all possible configuration modes for the application. /// Defines all possible configuration modes for the application.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings namespace SafeExamBrowser.Settings
{ {
/// <summary> /// <summary>
/// Defines all kiosk modes which the application supports. /// Defines all kiosk modes which the application supports.

View file

@ -0,0 +1,36 @@
/*
* Copyright (c) 2019 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/.
*/
namespace SafeExamBrowser.Settings.Logging
{
/// <summary>
/// Defines all log levels supported by the application.
/// </summary>
public enum LogLevel
{
/// <summary>
/// All messages are logged.
/// </summary>
Debug,
/// <summary>
/// Only messages with <see cref="Info"/>, <see cref="Warning"/> and <see cref="Error"/> are logged.
/// </summary>
Info,
/// <summary>
/// Only messages with <see cref="Warning"/> and <see cref="Error"/> are logged.
/// </summary>
Warning,
/// <summary>
/// Only messages with <see cref="Error"/> are logged.
/// </summary>
Error
}
}

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.Monitoring namespace SafeExamBrowser.Settings.Monitoring
{ {
/// <summary> /// <summary>
/// Defines all configuration options for monitoring keyboard input. /// Defines all configuration options for monitoring keyboard input.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.Monitoring namespace SafeExamBrowser.Settings.Monitoring
{ {
/// <summary> /// <summary>
/// Defines all configuration options for monitoring mouse input. /// Defines all configuration options for monitoring mouse input.

View file

@ -0,0 +1,33 @@
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.Settings")]
[assembly: AssemblyDescription("Safe Exam Browser")]
[assembly: AssemblyCompany("ETH Zürich")]
[assembly: AssemblyProduct("SafeExamBrowser.Settings")]
[assembly: AssemblyCopyright("Copyright © 2019 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("30b2d907-5861-4f39-abad-c4abf1b3470e")]
// 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")]

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{30B2D907-5861-4F39-ABAD-C4ABF1B3470E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SafeExamBrowser.Settings</RootNamespace>
<AssemblyName>SafeExamBrowser.Settings</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="Browser\BrowserSettings.cs" />
<Compile Include="Browser\BrowserWindowSettings.cs" />
<Compile Include="Browser\FilterResult.cs" />
<Compile Include="Browser\FilterRule.cs" />
<Compile Include="Browser\FilterType.cs" />
<Compile Include="ConfigurationMode.cs" />
<Compile Include="KioskMode.cs" />
<Compile Include="Logging\LogLevel.cs" />
<Compile Include="Monitoring\KeyboardSettings.cs" />
<Compile Include="Monitoring\MouseSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Service\ServicePolicy.cs" />
<Compile Include="Service\ServiceSettings.cs" />
<Compile Include="ApplicationSettings.cs" />
<Compile Include="SystemComponents\AudioSettings.cs" />
<Compile Include="UserInterface\ActionCenterSettings.cs" />
<Compile Include="UserInterface\TaskbarSettings.cs" />
<Compile Include="UserInterface\UserInterfaceMode.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings.Service namespace SafeExamBrowser.Settings.Service
{ {
/// <summary> /// <summary>
/// Defines all possible service policies which the application supports. /// Defines all possible service policies which the application supports.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings.Service namespace SafeExamBrowser.Settings.Service
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the service application component. /// Defines all configuration options for the service application component.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.SystemComponents namespace SafeExamBrowser.Settings.SystemComponents
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the audio device of the computer. /// Defines all configuration options for the audio device of the computer.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.UserInterface namespace SafeExamBrowser.Settings.UserInterface
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the action center. /// Defines all configuration options for the action center.

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Configuration.Contracts.Settings.UserInterface namespace SafeExamBrowser.Settings.UserInterface
{ {
/// <summary> /// <summary>
/// Defines all configuration options for the taskbar. /// Defines all configuration options for the taskbar.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Configuration.Contracts.Settings.UserInterface namespace SafeExamBrowser.Settings.UserInterface
{ {
/// <summary> /// <summary>
/// Defines all possible look &amp; feel options for the application. /// Defines all possible look &amp; feel options for the application.

View file

@ -9,7 +9,7 @@
using System; using System;
using System.Linq; using System.Linq;
using NAudio.CoreAudioApi; using NAudio.CoreAudioApi;
using SafeExamBrowser.Configuration.Contracts.Settings.SystemComponents; using SafeExamBrowser.Settings.SystemComponents;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio; using SafeExamBrowser.SystemComponents.Contracts.Audio;
using SafeExamBrowser.SystemComponents.Contracts.Audio.Events; using SafeExamBrowser.SystemComponents.Contracts.Audio.Events;

View file

@ -77,14 +77,14 @@
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Configuration.Contracts\SafeExamBrowser.Configuration.Contracts.csproj">
<Project>{7d74555e-63e1-4c46-bd0a-8580552368c8}</Project>
<Name>SafeExamBrowser.Configuration.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

View file

@ -9,7 +9,7 @@
using SafeExamBrowser.Applications.Contracts; using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Client.Contracts; using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts; using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings.Browser; using SafeExamBrowser.Settings.Browser;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts.Audio; using SafeExamBrowser.SystemComponents.Contracts.Audio;

View file

@ -107,6 +107,10 @@
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project> <Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name> <Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj"> <ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project> <Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name> <Name>SafeExamBrowser.SystemComponents.Contracts</Name>

Some files were not shown because too many files have changed in this diff Show more