Finally did what should have been done a long time ago: Moved contracts from SafeExamBrowser.Contracts to new contracts assembly per namespace.

This commit is contained in:
dbuechel 2019-08-30 09:55:26 +02:00
parent 938afcb4a7
commit fd20d0d638
560 changed files with 4078 additions and 2033 deletions

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Contracts.Applications.Events
namespace SafeExamBrowser.Applications.Contracts.Events
{
/// <summary>
/// Event handler used to indicate that the icon of an <see cref="IApplicationInstance"/> has changed.

View file

@ -6,7 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Applications.Events
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Applications.Contracts.Events
{
/// <summary>
/// Event handler used to indicate that an <see cref="IApplicationInstance"/> with a particular ID has terminated.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Applications.Events
namespace SafeExamBrowser.Applications.Contracts.Events
{
/// <summary>
/// Event handler used to indicate that a name has changed to a new value.

View file

@ -6,9 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.UserInterface.Shell;
namespace SafeExamBrowser.Contracts.Applications
namespace SafeExamBrowser.Applications.Contracts
{
/// <summary>
/// Controls the lifetime and functionality of a (third-party) application which can be accessed via the <see cref="ITaskbar"/>.
@ -20,10 +18,11 @@ namespace SafeExamBrowser.Contracts.Applications
/// </summary>
void Initialize();
/// <summary>
/// Registers an application control for this application.
/// </summary>
void RegisterApplicationControl(IApplicationControl control);
// TODO
///// <summary>
///// Registers an application control for this application.
///// </summary>
//void RegisterApplicationControl(IApplicationControl control);
/// <summary>
/// Starts the execution of the application.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Contracts.Applications
namespace SafeExamBrowser.Applications.Contracts
{
/// <summary>
/// The information about a (third-party) application which can be accessed via the shell.

View file

@ -6,10 +6,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Applications.Events;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Applications.Contracts.Events;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Contracts.Applications
namespace SafeExamBrowser.Applications.Contracts
{
/// <summary>
/// Defines an instance of a (third-party) application which can be accessed via the shell.
@ -41,9 +41,10 @@ namespace SafeExamBrowser.Contracts.Applications
/// </summary>
event NameChangedEventHandler NameChanged;
/// <summary>
/// The main window of the application instance.
/// </summary>
IWindow Window { get; }
// TODO
///// <summary>
///// The main window of the application instance.
///// </summary>
//IWindow Window { get; }
}
}

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.Applications.Contracts")]
[assembly: AssemblyDescription("Safe Exam Browser")]
[assembly: AssemblyCompany("ETH Zürich")]
[assembly: AssemblyProduct("SafeExamBrowser.Applications.Contracts")]
[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("ac77745d-3b41-43e2-8e84-d40e5a4ee77f")]
// 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,71 @@
<?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>{AC77745D-3B41-43E2-8E84-D40E5A4EE77F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SafeExamBrowser.Applications.Contracts</RootNamespace>
<AssemblyName>SafeExamBrowser.Applications.Contracts</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="Events\IconChangedEventHandler.cs" />
<Compile Include="Events\InstanceTerminatedEventHandler.cs" />
<Compile Include="Events\NameChangedEventHandler.cs" />
<Compile Include="IApplicationController.cs" />
<Compile Include="IApplicationInfo.cs" />
<Compile Include="IApplicationInstance.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Core.Contracts\SafeExamBrowser.Core.Contracts.csproj">
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -6,9 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.UserInterface.Browser;
namespace SafeExamBrowser.Contracts.Browser
namespace SafeExamBrowser.Browser.Contracts
{
/// <summary>
/// The event arguments used for all download events.
@ -20,10 +18,11 @@ namespace SafeExamBrowser.Contracts.Browser
/// </summary>
public bool AllowDownload { get; set; }
/// <summary>
/// The browser window from which the download request originated.
/// </summary>
public IBrowserWindow BrowserWindow { get; set; }
// TODO
///// <summary>
///// The browser window from which the download request originated.
///// </summary>
//public IBrowserWindow BrowserWindow { get; set; }
/// <summary>
/// Callback executed once a download has been finished.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Browser
namespace SafeExamBrowser.Browser.Contracts
{
/// <summary>
/// Defines the method signature for callbacks to be executed once a download has been finished. Indicates whether the download was

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Browser
namespace SafeExamBrowser.Browser.Contracts
{
/// <summary>
/// Event handler used to control (e.g. allow or prohibit) download requests.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Applications.Contracts;
namespace SafeExamBrowser.Contracts.Browser
namespace SafeExamBrowser.Browser.Contracts
{
/// <summary>
/// Controls the lifetime and functionality of the browser application.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Browser
namespace SafeExamBrowser.Browser.Contracts
{
/// <summary>
/// Event handler used to indicate the current progress value of the page load process (from <c>0.0</c> to <c>1.0</c>).

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.Browser.Contracts")]
[assembly: AssemblyDescription("Safe Exam Browser")]
[assembly: AssemblyCompany("ETH Zürich")]
[assembly: AssemblyProduct("SafeExamBrowser.Browser.Contracts")]
[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("5fb5273d-277c-41dd-8593-a25ce1aff2e9")]
// 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,70 @@
<?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>{5FB5273D-277C-41DD-8593-A25CE1AFF2E9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SafeExamBrowser.Browser.Contracts</RootNamespace>
<AssemblyName>SafeExamBrowser.Browser.Contracts</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="DownloadEventArgs.cs" />
<Compile Include="DownloadFinishedCallback.cs" />
<Compile Include="DownloadRequestedEventHandler.cs" />
<Compile Include="IBrowserApplicationController.cs" />
<Compile Include="ProgressChangedEventHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Applications.Contracts\SafeExamBrowser.Applications.Contracts.csproj">
<Project>{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}</Project>
<Name>SafeExamBrowser.Applications.Contracts</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -11,16 +11,17 @@ using System.Collections.Generic;
using System.Linq;
using CefSharp;
using CefSharp.WinForms;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Browser.Events;
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using BrowserSettings = SafeExamBrowser.Contracts.Configuration.Settings.BrowserSettings;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Core.Contracts;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.BrowserSettings;
namespace SafeExamBrowser.Browser
{
@ -86,7 +87,7 @@ namespace SafeExamBrowser.Browser
foreach (var instance in instances)
{
instance.Terminated -= Instance_Terminated;
instance.Window.Close();
// TODO instance.Window.Close();
logger.Info($"Terminated browser instance {instance.Id}.");
}
@ -106,20 +107,33 @@ namespace SafeExamBrowser.Browser
instance.Initialize();
instance.ConfigurationDownloadRequested += (fileName, args) => ConfigurationDownloadRequested?.Invoke(fileName, args);
instance.IconChanged += Instance_IconChanged;
instance.NameChanged += Instance_NameChanged;
instance.PopupRequested += Instance_PopupRequested;
instance.Terminated += Instance_Terminated;
foreach (var control in controls)
{
control.RegisterInstance(instance);
}
instances.Add(instance);
instance.Window.Show();
logger.Info($"Created browser instance {instance.Id}.");
}
private void Instance_NameChanged(string name)
{
foreach (var control in controls)
{
// TODO
}
}
private void Instance_IconChanged(IIconResource icon)
{
foreach (var control in controls)
{
// TODO
}
}
private CefSettings InitializeCefSettings()
{
var warning = logger.LogLevel == LogLevel.Warning;
@ -150,7 +164,7 @@ namespace SafeExamBrowser.Browser
}
else
{
instances.FirstOrDefault(i => i.Id == id)?.Window?.BringToForeground();
// TODO instances.FirstOrDefault(i => i.Id == id)?.Window?.BringToForeground();
}
}

View file

@ -6,8 +6,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Browser
{

View file

@ -8,19 +8,20 @@
using System;
using System.Net.Http;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Applications.Contracts.Events;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Browser.Events;
using SafeExamBrowser.Browser.Handlers;
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Contracts.Applications.Events;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Browser;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Browser;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Browser
{
@ -164,7 +165,7 @@ namespace SafeExamBrowser.Browser
{
if (settings.AllowConfigurationDownloads)
{
args.BrowserWindow = window;
// TODO args.BrowserWindow = window;
logger.Debug($"Forwarding download request for configuration file '{fileName}'.");
ConfigurationDownloadRequested?.Invoke(fileName, args);
}

View file

@ -8,8 +8,8 @@
using CefSharp;
using CefSharp.WinForms;
using SafeExamBrowser.Contracts.UserInterface.Browser;
using SafeExamBrowser.Contracts.UserInterface.Browser.Events;
using SafeExamBrowser.UserInterface.Contracts.Browser;
using SafeExamBrowser.UserInterface.Contracts.Browser.Events;
namespace SafeExamBrowser.Browser
{

View file

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

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Browser
{

View file

@ -11,7 +11,7 @@ using System.Linq;
using CefSharp;
using CefSharp.Structs;
using SafeExamBrowser.Browser.Events;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Browser.Contracts;
namespace SafeExamBrowser.Browser.Handlers
{

View file

@ -11,10 +11,10 @@ using System.Collections.Concurrent;
using System.IO;
using System.Threading.Tasks;
using CefSharp;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Logging;
using BrowserSettings = SafeExamBrowser.Contracts.Configuration.Settings.BrowserSettings;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Logging.Contracts;
using BrowserSettings = SafeExamBrowser.Configuration.Contracts.Settings.BrowserSettings;
namespace SafeExamBrowser.Browser.Handlers
{

View file

@ -8,7 +8,7 @@
using System.Windows.Forms;
using CefSharp;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.UserInterface.Contracts;
namespace SafeExamBrowser.Browser.Handlers
{

View file

@ -7,7 +7,7 @@
*/
using CefSharp;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Browser.Handlers
{

View file

@ -9,7 +9,7 @@
using System;
using System.Collections.Specialized;
using CefSharp;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Browser.Handlers
{

View file

@ -85,9 +85,33 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Contracts\SafeExamBrowser.Contracts.csproj">
<Project>{47DA5933-BEF8-4729-94E6-ABDE2DB12262}</Project>
<Name>SafeExamBrowser.Contracts</Name>
<ProjectReference Include="..\SafeExamBrowser.Applications.Contracts\SafeExamBrowser.Applications.Contracts.csproj">
<Project>{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}</Project>
<Name>SafeExamBrowser.Applications.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Browser.Contracts\SafeExamBrowser.Browser.Contracts.csproj">
<Project>{5fb5273d-277c-41dd-8593-a25ce1aff2e9}</Project>
<Name>SafeExamBrowser.Browser.Contracts</Name>
</ProjectReference>
<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.Core.Contracts\SafeExamBrowser.Core.Contracts.csproj">
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.I18n.Contracts\SafeExamBrowser.I18n.Contracts.csproj">
<Project>{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}</Project>
<Name>SafeExamBrowser.I18n.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.UserInterface.Contracts\SafeExamBrowser.UserInterface.Contracts.csproj">
<Project>{c7889e97-6ff6-4a58-b7cb-521ed276b316}</Project>
<Name>SafeExamBrowser.UserInterface.Contracts</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View file

@ -7,12 +7,12 @@
*/
using System;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
namespace SafeExamBrowser.Contracts.Client
namespace SafeExamBrowser.Client.Contracts
{
/// <summary>
/// Controls the lifetime and is responsible for the event handling of the client application component.

View file

@ -6,19 +6,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.UserInterface.Shell;
namespace SafeExamBrowser.Contracts.Client
namespace SafeExamBrowser.Client.Contracts
{
/// <summary>
/// Controls the lifetime and functionality of a notification which is part of the <see cref="ITaskbar"/>.
/// </summary>
public interface INotificationController
{
/// <summary>
/// Registers the taskbar notification.
/// </summary>
void RegisterNotification(INotificationControl notification);
// TODO
///// <summary>
///// Registers the taskbar notification.
///// </summary>
//void RegisterNotification(INotificationControl notification);
/// <summary>
/// Instructs the controller to shut down and release all used resources.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Contracts.Client
namespace SafeExamBrowser.Client.Contracts
{
/// <summary>
/// The information about a notification.

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.Client.Contracts")]
[assembly: AssemblyDescription("Safe Exam Browser")]
[assembly: AssemblyCompany("ETH Zürich")]
[assembly: AssemblyProduct("SafeExamBrowser.Client.Contracts")]
[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("d39aea14-9d5e-404d-be39-a552e1bd2c7d")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]

View file

@ -0,0 +1,80 @@
<?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>{D39AEA14-9D5E-404D-BE39-A552E1BD2C7D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SafeExamBrowser.Client.Contracts</RootNamespace>
<AssemblyName>SafeExamBrowser.Client.Contracts</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="IClientController.cs" />
<Compile Include="INotificationController.cs" />
<Compile Include="INotificationInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Browser.Contracts\SafeExamBrowser.Browser.Contracts.csproj">
<Project>{5fb5273d-277c-41dd-8593-a25ce1aff2e9}</Project>
<Name>SafeExamBrowser.Browser.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Communication.Contracts\SafeExamBrowser.Communication.Contracts.csproj">
<Project>{0cd2c5fe-711a-4c32-afe0-bb804fe8b220}</Project>
<Name>SafeExamBrowser.Communication.Contracts</Name>
</ProjectReference>
<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.Core.Contracts\SafeExamBrowser.Core.Contracts.csproj">
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View file

@ -9,24 +9,24 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Contracts.Communication.Events;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Cryptography;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Windows;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.UnitTests
{
@ -113,8 +113,9 @@ namespace SafeExamBrowser.Client.UnitTests
{
var args = new MessageBoxRequestEventArgs
{
Action = MessageBoxAction.YesNo,
Icon = MessageBoxIcon.Question,
// TODO
//Action = MessageBoxAction.YesNo,
//Icon = MessageBoxIcon.Question,
Message = "Some question to be answered",
RequestId = Guid.NewGuid(),
Title = "A Title"
@ -122,17 +123,18 @@ namespace SafeExamBrowser.Client.UnitTests
messageBox.Setup(m => m.Show(
It.Is<string>(s => s == args.Message),
It.Is<string>(s => s == args.Title),
It.Is<MessageBoxAction>(a => a == args.Action),
It.Is<MessageBoxIcon>(i => i == args.Icon),
It.IsAny<IWindow>())).Returns(MessageBoxResult.No);
It.Is<string>(s => s == args.Title), default(MessageBoxAction), default(MessageBoxIcon), null
// TODO
//It.Is<MessageBoxAction>(a => a == args.Action),
//It.Is<MessageBoxIcon>(i => i == args.Icon),
/*It.IsAny<IWindow>()*/)).Returns(MessageBoxResult.No);
sut.TryStart();
clientHost.Raise(c => c.MessageBoxRequested += null, args);
runtimeProxy.Verify(p => p.SubmitMessageBoxResult(
It.Is<Guid>(g => g == args.RequestId),
It.Is<MessageBoxResult>(r => r == MessageBoxResult.No)), Times.Once);
It.Is<Guid>(g => g == args.RequestId)// TODO ,
/*It.Is<MessageBoxResult>(r => r == MessageBoxResult.No)*/), Times.Once);
}
[TestMethod]

View file

@ -11,12 +11,12 @@ using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Communication;
using SafeExamBrowser.Contracts.Communication;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Communication.Contracts;
using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
namespace SafeExamBrowser.Client.UnitTests.Communication
{
@ -164,13 +164,15 @@ namespace SafeExamBrowser.Client.UnitTests.Communication
sut.MessageBoxRequested += (args) =>
{
messageBoxRequested = args.Action == action && args.Icon == icon && args.Message == message && args.RequestId == requestId && args.Title == title;
// TODO
messageBoxRequested = /*args.Action == action && args.Icon == icon &&*/ args.Message == message && args.RequestId == requestId && args.Title == title;
resetEvent.Set();
};
sut.AuthenticationToken = Guid.Empty;
var token = sut.Connect(Guid.Empty).CommunicationToken.Value;
var request = new MessageBoxRequestMessage(action, icon, message, requestId, title) { CommunicationToken = token };
// TODO
var request = new MessageBoxRequestMessage(/*action, icon, */message, requestId, title) { CommunicationToken = token };
var response = sut.Send(request);
resetEvent.WaitOne();
@ -280,7 +282,8 @@ namespace SafeExamBrowser.Client.UnitTests.Communication
var token = sut.Connect(Guid.Empty).CommunicationToken.Value;
sut.Send(new MessageBoxRequestMessage(default(MessageBoxAction), default(MessageBoxIcon), "", Guid.Empty, "") { CommunicationToken = token });
// TODO
sut.Send(new MessageBoxRequestMessage(/*default(MessageBoxAction), default(MessageBoxIcon), */"", Guid.Empty, "") { CommunicationToken = token });
sut.Send(new PasswordRequestMessage(default(PasswordRequestPurpose), Guid.Empty) { CommunicationToken = token });
sut.Send(new ReconfigurationDeniedMessage("") { CommunicationToken = token });
sut.Send(new SimpleMessage(SimpleMessagePurport.Shutdown) { CommunicationToken = token });

View file

@ -9,9 +9,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Notifications;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.UnitTests.Notifications
{

View file

@ -9,9 +9,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Notifications;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.UnitTests.Notifications
{

View file

@ -6,8 +6,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.UserInterface.Shell.Events;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Shell.Events;
namespace SafeExamBrowser.Client.UnitTests.Notifications
{

View file

@ -8,11 +8,11 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.UnitTests.Operations
{
@ -47,7 +47,7 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
sut.Perform();
controller.Verify(c => c.Initialize(), Times.Once);
controller.Verify(c => c.RegisterApplicationControl(It.IsAny<IApplicationControl>()), Times.Exactly(2));
// TODO controller.Verify(c => c.RegisterApplicationControl(It.IsAny<IApplicationControl>()), Times.Exactly(2));
actionCenter.Verify(a => a.AddApplicationControl(It.IsAny<IApplicationControl>()), Times.Once);
taskbar.Verify(t => t.AddApplicationControl(It.IsAny<IApplicationControl>()), Times.Once);
}

View file

@ -12,9 +12,9 @@ using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -9,8 +9,8 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -10,12 +10,12 @@ using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -9,9 +9,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -9,9 +9,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -9,9 +9,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

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

View file

@ -10,9 +10,9 @@ using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{

View file

@ -9,15 +9,15 @@
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.SystemComponents;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.UnitTests.Operations
{
@ -34,10 +34,11 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
private Mock<INotificationController> aboutController;
private Mock<INotificationInfo> logInfo;
private Mock<INotificationController> logController;
private Mock<ISystemComponent<ISystemAudioControl>> audio;
private Mock<ISystemComponent<ISystemKeyboardLayoutControl>> keyboardLayout;
private Mock<ISystemComponent<ISystemPowerSupplyControl>> powerSupply;
private Mock<ISystemComponent<ISystemWirelessNetworkControl>> wirelessNetwork;
// TODO
//private Mock<ISystemComponent<ISystemAudioControl>> audio;
//private Mock<ISystemComponent<ISystemKeyboardLayoutControl>> keyboardLayout;
//private Mock<ISystemComponent<ISystemPowerSupplyControl>> powerSupply;
//private Mock<ISystemComponent<ISystemWirelessNetworkControl>> wirelessNetwork;
private Mock<ISystemInfo> systemInfo;
private Mock<ITaskbar> taskbar;
private Mock<IText> text;
@ -56,10 +57,11 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
aboutController = new Mock<INotificationController>();
logInfo = new Mock<INotificationInfo>();
logController = new Mock<INotificationController>();
audio = new Mock<ISystemComponent<ISystemAudioControl>>();
keyboardLayout = new Mock<ISystemComponent<ISystemKeyboardLayoutControl>>();
powerSupply = new Mock<ISystemComponent<ISystemPowerSupplyControl>>();
wirelessNetwork = new Mock<ISystemComponent<ISystemWirelessNetworkControl>>();
// TODO
//audio = new Mock<ISystemComponent<ISystemAudioControl>>();
//keyboardLayout = new Mock<ISystemComponent<ISystemKeyboardLayoutControl>>();
//powerSupply = new Mock<ISystemComponent<ISystemPowerSupplyControl>>();
//wirelessNetwork = new Mock<ISystemComponent<ISystemWirelessNetworkControl>>();
systemInfo = new Mock<ISystemInfo>();
taskbar = new Mock<ITaskbar>();
taskbarSettings = new TaskbarSettings();
@ -78,10 +80,11 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
aboutController.Object,
logInfo.Object,
logController.Object,
audio.Object,
keyboardLayout.Object,
powerSupply.Object,
wirelessNetwork.Object,
// TODO
//audio.Object,
//keyboardLayout.Object,
//powerSupply.Object,
//wirelessNetwork.Object,
systemInfo.Object,
taskbar.Object,
taskbarSettings,
@ -199,10 +202,11 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
sut.Perform();
audio.Verify(a => a.Initialize(), Times.Once);
keyboardLayout.Verify(k => k.Initialize(), Times.Once);
powerSupply.Verify(p => p.Initialize(), Times.Once);
wirelessNetwork.Verify(w => w.Initialize(), Times.Once);
// TODO
//audio.Verify(a => a.Initialize(), Times.Once);
//keyboardLayout.Verify(k => k.Initialize(), Times.Once);
//powerSupply.Verify(p => p.Initialize(), Times.Once);
//wirelessNetwork.Verify(w => w.Initialize(), Times.Once);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemAudioControl>()), Times.Once);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemKeyboardLayoutControl>()), Times.Once);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemPowerSupplyControl>()), Times.Once);
@ -233,10 +237,11 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
sut.Perform();
audio.Verify(a => a.Initialize(), Times.Once);
keyboardLayout.Verify(k => k.Initialize(), Times.Once);
powerSupply.Verify(p => p.Initialize(), Times.Once);
wirelessNetwork.Verify(w => w.Initialize(), Times.Once);
// TODO
//audio.Verify(a => a.Initialize(), Times.Once);
//keyboardLayout.Verify(k => k.Initialize(), Times.Once);
//powerSupply.Verify(p => p.Initialize(), Times.Once);
//wirelessNetwork.Verify(w => w.Initialize(), Times.Once);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemAudioControl>()), Times.Never);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemKeyboardLayoutControl>()), Times.Never);
actionCenter.Verify(a => a.AddSystemControl(It.IsAny<ISystemPowerSupplyControl>()), Times.Never);
@ -296,11 +301,12 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
sut.Revert();
aboutController.Verify(c => c.Terminate(), Times.Once);
audio.Verify(a => a.Terminate(), Times.Once);
logController.Verify(c => c.Terminate(), Times.Once);
keyboardLayout.Verify(k => k.Terminate(), Times.Once);
powerSupply.Verify(p => p.Terminate(), Times.Once);
wirelessNetwork.Verify(w => w.Terminate(), Times.Once);
// TODO
//audio.Verify(a => a.Terminate(), Times.Once);
//keyboardLayout.Verify(k => k.Terminate(), Times.Once);
//powerSupply.Verify(p => p.Terminate(), Times.Once);
//wirelessNetwork.Verify(w => w.Terminate(), Times.Once);
}
}
}

View file

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

View file

@ -108,22 +108,66 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Applications.Contracts\SafeExamBrowser.Applications.Contracts.csproj">
<Project>{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}</Project>
<Name>SafeExamBrowser.Applications.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Browser.Contracts\SafeExamBrowser.Browser.Contracts.csproj">
<Project>{5fb5273d-277c-41dd-8593-a25ce1aff2e9}</Project>
<Name>SafeExamBrowser.Browser.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Client.Contracts\SafeExamBrowser.Client.Contracts.csproj">
<Project>{d39aea14-9d5e-404d-be39-a552e1bd2c7d}</Project>
<Name>SafeExamBrowser.Client.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Client\SafeExamBrowser.Client.csproj">
<Project>{7CC5A895-E0D3-4E43-9B39-CCEC05A5A6A7}</Project>
<Name>SafeExamBrowser.Client</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Communication.Contracts\SafeExamBrowser.Communication.Contracts.csproj">
<Project>{0cd2c5fe-711a-4c32-afe0-bb804fe8b220}</Project>
<Name>SafeExamBrowser.Communication.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Communication\SafeExamBrowser.Communication.csproj">
<Project>{c9416a62-0623-4d38-96aa-92516b32f02f}</Project>
<Name>SafeExamBrowser.Communication</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Contracts\SafeExamBrowser.Contracts.csproj">
<Project>{47DA5933-BEF8-4729-94E6-ABDE2DB12262}</Project>
<Name>SafeExamBrowser.Contracts</Name>
<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.Core.Contracts\SafeExamBrowser.Core.Contracts.csproj">
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Core\SafeExamBrowser.Core.csproj">
<Project>{3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}</Project>
<Name>SafeExamBrowser.Core</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.I18n.Contracts\SafeExamBrowser.I18n.Contracts.csproj">
<Project>{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}</Project>
<Name>SafeExamBrowser.I18n.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Monitoring.Contracts\SafeExamBrowser.Monitoring.Contracts.csproj">
<Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project>
<Name>SafeExamBrowser.Monitoring.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.UserInterface.Contracts\SafeExamBrowser.UserInterface.Contracts.csproj">
<Project>{c7889e97-6ff6-4a58-b7cb-521ed276b316}</Project>
<Name>SafeExamBrowser.UserInterface.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.WindowsApi.Contracts\SafeExamBrowser.WindowsApi.Contracts.csproj">
<Project>{7016f080-9aa5-41b2-a225-385ad877c171}</Project>
<Name>SafeExamBrowser.WindowsApi.Contracts</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -9,7 +9,7 @@
using System;
using System.Threading;
using System.Windows;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Client
{

View file

@ -8,25 +8,25 @@
using System;
using System.IO;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Contracts.Communication.Events;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Cryptography;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Windows;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client
{
@ -231,7 +231,7 @@ namespace SafeExamBrowser.Client
var message = TextKey.MessageBox_ReconfigurationQuestion;
var title = TextKey.MessageBox_ReconfigurationQuestionTitle;
var result = messageBox.Show(message, title, MessageBoxAction.YesNo, MessageBoxIcon.Question, args.BrowserWindow);
var result = messageBox.Show(message, title, MessageBoxAction.YesNo, MessageBoxIcon.Question/*// TODO , args.BrowserWindow*/);
var reconfigure = result == MessageBoxResult.Yes;
logger.Info($"The user chose to {(reconfigure ? "start" : "abort")} the reconfiguration.");
@ -246,7 +246,7 @@ namespace SafeExamBrowser.Client
else
{
logger.Info($"Denied download request for configuration file '{fileName}' due to '{Settings.ConfigurationMode}' mode.");
messageBox.Show(TextKey.MessageBox_ReconfigurationDenied, TextKey.MessageBox_ReconfigurationDeniedTitle, parent: args.BrowserWindow);
messageBox.Show(TextKey.MessageBox_ReconfigurationDenied, TextKey.MessageBox_ReconfigurationDeniedTitle/*,// TODO parent: args.BrowserWindow*/);
}
}
@ -282,9 +282,9 @@ namespace SafeExamBrowser.Client
{
logger.Info($"Received message box request with id '{args.RequestId}'.");
var result = messageBox.Show(args.Message, args.Title, args.Action, args.Icon, parent: splashScreen);
var result = messageBox.Show(args.Message, args.Title/*,// TODO args.Action, args.Icon*/, parent: splashScreen);
runtime.SubmitMessageBoxResult(args.RequestId, result);
runtime.SubmitMessageBoxResult(args.RequestId/*// TODO , result*/);
logger.Info($"Message box request with id '{args.RequestId}' yielded result '{result}'.");
}

View file

@ -7,12 +7,12 @@
*/
using System;
using SafeExamBrowser.Communication.Contracts;
using SafeExamBrowser.Communication.Contracts.Data;
using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Hosts;
using SafeExamBrowser.Contracts.Communication;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Contracts.Communication.Events;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.Communication
{
@ -69,7 +69,7 @@ namespace SafeExamBrowser.Client.Communication
switch (message)
{
case MessageBoxRequestMessage m:
MessageBoxRequested?.InvokeAsync(new MessageBoxRequestEventArgs { Action = m.Action, Icon = m.Icon, Message = m.Message, RequestId = m.RequestId, Title = m.Title });
MessageBoxRequested?.InvokeAsync(new MessageBoxRequestEventArgs { /*// TODO Action = m.Action, Icon = m.Icon,*/ Message = m.Message, RequestId = m.RequestId, Title = m.Title });
return new SimpleResponse(SimpleResponsePurport.Acknowledged);
case PasswordRequestMessage m:
PasswordRequested?.InvokeAsync(new PasswordRequestEventArgs { Purpose = m.Purpose, RequestId = m.RequestId });

View file

@ -12,39 +12,39 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
using SafeExamBrowser.Browser;
using SafeExamBrowser.Browser.Contracts;
using SafeExamBrowser.Client.Communication;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Client.Notifications;
using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Communication.Contracts;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Communication.Hosts;
using SafeExamBrowser.Communication.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Configuration.Cryptography;
using SafeExamBrowser.Contracts.Browser;
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Communication;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.SystemComponents;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.OperationModel;
using SafeExamBrowser.Core.Operations;
using SafeExamBrowser.I18n;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.Monitoring.Display;
using SafeExamBrowser.Monitoring.Keyboard;
using SafeExamBrowser.Monitoring.Mouse;
using SafeExamBrowser.Monitoring.Processes;
using SafeExamBrowser.Monitoring.Windows;
using SafeExamBrowser.SystemComponents;
using SafeExamBrowser.SystemComponents.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.WindowsApi;
using SafeExamBrowser.WindowsApi.Contracts;
using Desktop = SafeExamBrowser.UserInterface.Desktop;
using Mobile = SafeExamBrowser.UserInterface.Mobile;
@ -275,10 +275,11 @@ namespace SafeExamBrowser.Client
aboutController,
logInfo,
logController,
audio,
keyboardLayout,
powerSupply,
wirelessNetwork,
// TODO
//audio,
//keyboardLayout,
//powerSupply,
//wirelessNetwork,
systemInfo,
taskbar,
configuration.Settings.Taskbar,

View file

@ -6,11 +6,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -7,7 +7,7 @@
*/
using System;
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Core.Contracts;
using SafeExamBrowser.I18n.Contracts;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -6,11 +6,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.UserInterface.Windows;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.UserInterface.Contracts.Windows;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -7,7 +7,7 @@
*/
using System;
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Core.Contracts;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Core;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Core.Contracts;
using SafeExamBrowser.I18n.Contracts;
namespace SafeExamBrowser.Client.Notifications
{

View file

@ -6,13 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Applications;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Applications.Contracts;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.Operations
{
@ -53,8 +53,9 @@ namespace SafeExamBrowser.Client.Operations
var taskbarControl = uiFactory.CreateApplicationControl(browserInfo, Location.Taskbar);
browserController.Initialize();
browserController.RegisterApplicationControl(actionCenterControl);
browserController.RegisterApplicationControl(taskbarControl);
// TODO
//browserController.RegisterApplicationControl(actionCenterControl);
//browserController.RegisterApplicationControl(taskbarControl);
actionCenter.AddApplicationControl(actionCenterControl);
taskbar.AddApplicationControl(taskbarControl);

View file

@ -7,12 +7,12 @@
*/
using System.Threading;
using SafeExamBrowser.Contracts.Communication.Events;
using SafeExamBrowser.Contracts.Communication.Hosts;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Events;
using SafeExamBrowser.Communication.Contracts.Hosts;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,11 +6,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -7,11 +7,11 @@
*/
using System;
using SafeExamBrowser.Contracts.Communication.Proxies;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Communication.Contracts.Proxies;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -7,16 +7,16 @@
*/
using System.Collections.Generic;
using SafeExamBrowser.Contracts.Client;
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.SystemComponents;
using SafeExamBrowser.Contracts.UserInterface;
using SafeExamBrowser.Contracts.UserInterface.Shell;
using SafeExamBrowser.Contracts.WindowsApi;
using SafeExamBrowser.Client.Contracts;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.SystemComponents.Contracts;
using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.Shell;
using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations
{
@ -30,10 +30,10 @@ namespace SafeExamBrowser.Client.Operations
private INotificationController aboutController;
private INotificationInfo logInfo;
private INotificationController logController;
private ISystemComponent<ISystemAudioControl> audio;
private ISystemComponent<ISystemKeyboardLayoutControl> keyboardLayout;
private ISystemComponent<ISystemPowerSupplyControl> powerSupply;
private ISystemComponent<ISystemWirelessNetworkControl> wirelessNetwork;
// TODO private ISystemComponent<ISystemAudioControl> audio;
// TODO private ISystemComponent<ISystemKeyboardLayoutControl> keyboardLayout;
// TODO private ISystemComponent<ISystemPowerSupplyControl> powerSupply;
// TODO private ISystemComponent<ISystemWirelessNetworkControl> wirelessNetwork;
private ISystemInfo systemInfo;
private ITaskbar taskbar;
private TaskbarSettings taskbarSettings;
@ -53,10 +53,10 @@ namespace SafeExamBrowser.Client.Operations
INotificationController aboutController,
INotificationInfo logInfo,
INotificationController logController,
ISystemComponent<ISystemAudioControl> audio,
ISystemComponent<ISystemKeyboardLayoutControl> keyboardLayout,
ISystemComponent<ISystemPowerSupplyControl> powerSupply,
ISystemComponent<ISystemWirelessNetworkControl> wirelessNetwork,
// TODO ISystemComponent<ISystemAudioControl> audio,
// TODO ISystemComponent<ISystemKeyboardLayoutControl> keyboardLayout,
// TODO ISystemComponent<ISystemPowerSupplyControl> powerSupply,
// TODO ISystemComponent<ISystemWirelessNetworkControl> wirelessNetwork,
ISystemInfo systemInfo,
ITaskbar taskbar,
TaskbarSettings taskbarSettings,
@ -72,16 +72,16 @@ namespace SafeExamBrowser.Client.Operations
this.logger = logger;
this.logInfo = logInfo;
this.logController = logController;
this.audio = audio;
this.keyboardLayout = keyboardLayout;
this.powerSupply = powerSupply;
// TODO this.audio = audio;
// TODO this.keyboardLayout = keyboardLayout;
// TODO this.powerSupply = powerSupply;
this.systemInfo = systemInfo;
this.taskbarSettings = taskbarSettings;
this.terminationActivator = terminationActivator;
this.text = text;
this.taskbar = taskbar;
this.uiFactory = uiFactory;
this.wirelessNetwork = wirelessNetwork;
// TODO this.wirelessNetwork = wirelessNetwork;
}
public OperationResult Perform()
@ -167,10 +167,11 @@ namespace SafeExamBrowser.Client.Operations
private void InitializeSystemComponents()
{
audio.Initialize();
keyboardLayout.Initialize();
powerSupply.Initialize();
wirelessNetwork.Initialize();
// TODO
//audio.Initialize();
//keyboardLayout.Initialize();
//powerSupply.Initialize();
//wirelessNetwork.Initialize();
}
private void InitializeAboutNotificationForActionCenter()
@ -179,7 +180,7 @@ namespace SafeExamBrowser.Client.Operations
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.ActionCenter);
aboutController.RegisterNotification(notification);
// TODO aboutController.RegisterNotification(notification);
actionCenter.AddNotificationControl(notification);
}
}
@ -190,7 +191,7 @@ namespace SafeExamBrowser.Client.Operations
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.Taskbar);
aboutController.RegisterNotification(notification);
// TODO aboutController.RegisterNotification(notification);
taskbar.AddNotificationControl(notification);
}
}
@ -201,7 +202,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateAudioControl(Location.ActionCenter);
audio.Register(control);
// TODO audio.Register(control);
actionCenter.AddSystemControl(control);
}
}
@ -212,7 +213,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateAudioControl(Location.Taskbar);
audio.Register(control);
// TODO audio.Register(control);
taskbar.AddSystemControl(control);
}
}
@ -233,7 +234,7 @@ namespace SafeExamBrowser.Client.Operations
{
var notification = uiFactory.CreateNotificationControl(logInfo, Location.ActionCenter);
logController.RegisterNotification(notification);
// TODO logController.RegisterNotification(notification);
actionCenter.AddNotificationControl(notification);
}
}
@ -244,7 +245,7 @@ namespace SafeExamBrowser.Client.Operations
{
var notification = uiFactory.CreateNotificationControl(logInfo, Location.Taskbar);
logController.RegisterNotification(notification);
// TODO logController.RegisterNotification(notification);
taskbar.AddNotificationControl(notification);
}
}
@ -255,7 +256,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateKeyboardLayoutControl(Location.ActionCenter);
keyboardLayout.Register(control);
// TODO keyboardLayout.Register(control);
actionCenter.AddSystemControl(control);
}
}
@ -266,7 +267,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateKeyboardLayoutControl(Location.Taskbar);
keyboardLayout.Register(control);
// TODO keyboardLayout.Register(control);
taskbar.AddSystemControl(control);
}
}
@ -277,7 +278,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreatePowerSupplyControl(Location.ActionCenter);
powerSupply.Register(control);
// TODO powerSupply.Register(control);
actionCenter.AddSystemControl(control);
}
}
@ -288,7 +289,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreatePowerSupplyControl(Location.Taskbar);
powerSupply.Register(control);
// TODO powerSupply.Register(control);
taskbar.AddSystemControl(control);
}
}
@ -299,7 +300,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateWirelessNetworkControl(Location.ActionCenter);
wirelessNetwork.Register(control);
// TODO wirelessNetwork.Register(control);
actionCenter.AddSystemControl(control);
}
}
@ -310,7 +311,7 @@ namespace SafeExamBrowser.Client.Operations
{
var control = uiFactory.CreateWirelessNetworkControl(Location.Taskbar);
wirelessNetwork.Register(control);
// TODO wirelessNetwork.Register(control);
taskbar.AddSystemControl(control);
}
}
@ -336,10 +337,11 @@ namespace SafeExamBrowser.Client.Operations
private void TerminateSystemComponents()
{
audio.Terminate();
keyboardLayout.Terminate();
powerSupply.Terminate();
wirelessNetwork.Terminate();
// TODO
//audio.Terminate();
//keyboardLayout.Terminate();
//powerSupply.Terminate();
//wirelessNetwork.Terminate();
}
}
}

View file

@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Configuration.Settings;
using SafeExamBrowser.Contracts.Core.OperationModel;
using SafeExamBrowser.Contracts.Core.OperationModel.Events;
using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging;
using SafeExamBrowser.Contracts.Monitoring;
using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts;
namespace SafeExamBrowser.Client.Operations
{

View file

@ -120,42 +120,82 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SafeExamBrowser.Applications.Contracts\SafeExamBrowser.Applications.Contracts.csproj">
<Project>{ac77745d-3b41-43e2-8e84-d40e5a4ee77f}</Project>
<Name>SafeExamBrowser.Applications.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Browser.Contracts\SafeExamBrowser.Browser.Contracts.csproj">
<Project>{5fb5273d-277c-41dd-8593-a25ce1aff2e9}</Project>
<Name>SafeExamBrowser.Browser.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Browser\SafeExamBrowser.Browser.csproj">
<Project>{04E653F1-98E6-4E34-9DD7-7F2BC1A8B767}</Project>
<Name>SafeExamBrowser.Browser</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Client.Contracts\SafeExamBrowser.Client.Contracts.csproj">
<Project>{d39aea14-9d5e-404d-be39-a552e1bd2c7d}</Project>
<Name>SafeExamBrowser.Client.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Communication.Contracts\SafeExamBrowser.Communication.Contracts.csproj">
<Project>{0cd2c5fe-711a-4c32-afe0-bb804fe8b220}</Project>
<Name>SafeExamBrowser.Communication.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Communication\SafeExamBrowser.Communication.csproj">
<Project>{c9416a62-0623-4d38-96aa-92516b32f02f}</Project>
<Name>SafeExamBrowser.Communication</Name>
</ProjectReference>
<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.Configuration\SafeExamBrowser.Configuration.csproj">
<Project>{C388C4DD-A159-457D-AF92-89F7AD185109}</Project>
<Name>SafeExamBrowser.Configuration</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Contracts\SafeExamBrowser.Contracts.csproj">
<Project>{47DA5933-BEF8-4729-94E6-ABDE2DB12262}</Project>
<Name>SafeExamBrowser.Contracts</Name>
<ProjectReference Include="..\SafeExamBrowser.Core.Contracts\SafeExamBrowser.Core.Contracts.csproj">
<Project>{fe0e1224-b447-4b14-81e7-ed7d84822aa0}</Project>
<Name>SafeExamBrowser.Core.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Core\SafeExamBrowser.Core.csproj">
<Project>{3D6FDBB6-A4AF-4626-BB2B-BF329D44F9CC}</Project>
<Name>SafeExamBrowser.Core</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.I18n.Contracts\SafeExamBrowser.I18n.Contracts.csproj">
<Project>{1858ddf3-bc2a-4bff-b663-4ce2ffeb8b7d}</Project>
<Name>SafeExamBrowser.I18n.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.I18n\SafeExamBrowser.I18n.csproj">
<Project>{10c62628-8e6a-45aa-9d97-339b119ad21d}</Project>
<Name>SafeExamBrowser.I18n</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging.Contracts\SafeExamBrowser.Logging.Contracts.csproj">
<Project>{64ea30fb-11d4-436a-9c2b-88566285363e}</Project>
<Name>SafeExamBrowser.Logging.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Logging\SafeExamBrowser.Logging.csproj">
<Project>{e107026c-2011-4552-a7d8-3a0d37881df6}</Project>
<Name>SafeExamBrowser.Logging</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Monitoring.Contracts\SafeExamBrowser.Monitoring.Contracts.csproj">
<Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project>
<Name>SafeExamBrowser.Monitoring.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Monitoring\SafeExamBrowser.Monitoring.csproj">
<Project>{EF563531-4EB5-44B9-A5EC-D6D6F204469B}</Project>
<Name>SafeExamBrowser.Monitoring</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents.Contracts\SafeExamBrowser.SystemComponents.Contracts.csproj">
<Project>{903129c6-e236-493b-9ad6-c6a57f647a3a}</Project>
<Name>SafeExamBrowser.SystemComponents.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.SystemComponents\SafeExamBrowser.SystemComponents.csproj">
<Project>{ACEE2EF1-14D2-4B52-8994-5C053055BB51}</Project>
<Name>SafeExamBrowser.SystemComponents</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.UserInterface.Contracts\SafeExamBrowser.UserInterface.Contracts.csproj">
<Project>{c7889e97-6ff6-4a58-b7cb-521ed276b316}</Project>
<Name>SafeExamBrowser.UserInterface.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.UserInterface.Desktop\SafeExamBrowser.UserInterface.Desktop.csproj">
<Project>{A502DF54-7169-4647-94BD-18B192924866}</Project>
<Name>SafeExamBrowser.UserInterface.Desktop</Name>
@ -164,6 +204,10 @@
<Project>{89bc24dd-ff31-496e-9816-a160b686a3d4}</Project>
<Name>SafeExamBrowser.UserInterface.Mobile</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.WindowsApi.Contracts\SafeExamBrowser.WindowsApi.Contracts.csproj">
<Project>{7016f080-9aa5-41b2-a225-385ad877c171}</Project>
<Name>SafeExamBrowser.WindowsApi.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.WindowsApi\SafeExamBrowser.WindowsApi.csproj">
<Project>{73724659-4150-4792-A94E-42F5F3C1B696}</Project>
<Name>SafeExamBrowser.WindowsApi</Name>

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The response to be used to reply to an authentication request (see <see cref="SimpleMessagePurport.Authenticate"/>).

View file

@ -7,9 +7,9 @@
*/
using System;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The response to be used to reply to a configuration request (see <see cref="SimpleMessagePurport.ConfigurationNeeded"/>).

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The response to a connection request (see <see cref="ICommunication.Connect(Guid?)"/>).

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This is the last message transmitted from a component to its interlocutor in order to terminate a communication session.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The response transmitted to a <see cref="DisconnectionMessage"/>

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The base class for messages, from which a message must inherit in order to be sent to an interlocutor via <see cref="ICommunication.Send(Message)"/>.

View file

@ -7,9 +7,8 @@
*/
using System;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The reply to a <see cref="MessageBoxRequestMessage"/>.
@ -22,15 +21,16 @@ namespace SafeExamBrowser.Contracts.Communication.Data
/// </summary>
public Guid RequestId { get; private set; }
/// <summary>
/// The result of the interaction.
/// </summary>
public MessageBoxResult Result { get; private set; }
// TODO
///// <summary>
///// The result of the interaction.
///// </summary>
//public MessageBoxResult Result { get; private set; }
public MessageBoxReplyMessage(Guid requestId, MessageBoxResult result)
public MessageBoxReplyMessage(Guid requestId)// TODO, MessageBoxResult result)
{
RequestId = requestId;
Result = result;
// TODOResult = result;
}
}
}

View file

@ -7,9 +7,8 @@
*/
using System;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted to the client to request a message box input by the user.
@ -17,15 +16,16 @@ namespace SafeExamBrowser.Contracts.Communication.Data
[Serializable]
public class MessageBoxRequestMessage : Message
{
/// <summary>
/// The action to be displayed.
/// </summary>
public MessageBoxAction Action { get; private set; }
// TODO
///// <summary>
///// The action to be displayed.
///// </summary>
//public MessageBoxAction Action { get; private set; }
/// <summary>
/// The icon to be displayed.
/// </summary>
public MessageBoxIcon Icon { get; private set; }
///// <summary>
///// The icon to be displayed.
///// </summary>
//public MessageBoxIcon Icon { get; private set; }
/// <summary>
/// The message to be displayed.
@ -42,10 +42,11 @@ namespace SafeExamBrowser.Contracts.Communication.Data
/// </summary>
public string Title { get; private set; }
public MessageBoxRequestMessage(MessageBoxAction action, MessageBoxIcon icon, string message, Guid requestId, string title)
public MessageBoxRequestMessage(/*MessageBoxAction action, MessageBoxIcon icon, */string message, Guid requestId, string title)
{
Action = action;
Icon = icon;
// TODO
//Action = action;
//Icon = icon;
Message = message;
RequestId = requestId;
Title = title;

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The reply to a <see cref="PasswordRequestMessage"/>.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted to the client to request a password input by the user.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// Defines all possible reasons for a <see cref="PasswordRequestMessage"/>.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted from the runtime to the client in order to inform the latter that a reconfiguration request was denied.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted to the runtime to request that the application be reconfigured.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The base class for respones, from which a response must inherit in order to be sent to an interlocutor as reply to <see cref="ICommunication.Send(Message)"/>.

View file

@ -7,9 +7,9 @@
*/
using System;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted to the service to request the initialization of a new session.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// This message is transmitted to the service to request the termination of a currently running session.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// A generic message to send simple purports without data to an interlocutor.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The possible purports of a <see cref="SimpleMessage"/>.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// A generic response to reply simple purports without data to an interlocutor.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Data
namespace SafeExamBrowser.Communication.Contracts.Data
{
/// <summary>
/// The possible purports of a <see cref="SimpleResponse"/>.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the client configuration event fired by the <see cref="Hosts.IRuntimeHost"/>.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// Base class which must be used for all event parameters <c>T</c> of <see cref="CommunicationEventHandler{T}"/>.

View file

@ -8,7 +8,7 @@
using System.Threading.Tasks;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The default handler for communication events of an interlocutor.

View file

@ -7,9 +7,8 @@
*/
using System;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the message box reply event fired by the <see cref="Hosts.IRuntimeHost"/>.
@ -21,9 +20,10 @@ namespace SafeExamBrowser.Contracts.Communication.Events
/// </summary>
public Guid RequestId { get; set; }
/// <summary>
/// The result of the interaction.
/// </summary>
public MessageBoxResult Result { get; set; }
// TODO
///// <summary>
///// The result of the interaction.
///// </summary>
//public MessageBoxResult Result { get; set; }
}
}

View file

@ -7,24 +7,24 @@
*/
using System;
using SafeExamBrowser.Contracts.UserInterface.MessageBox;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the message box request event fired by the <see cref="Hosts.IClientHost"/>.
/// </summary>
public class MessageBoxRequestEventArgs : CommunicationEventArgs
{
/// <summary>
/// The action to be displayed.
/// </summary>
public MessageBoxAction Action { get; set; }
// TODO
///// <summary>
///// The action to be displayed.
///// </summary>
//public MessageBoxAction Action { get; set; }
/// <summary>
/// The icon to be displayed.
/// </summary>
public MessageBoxIcon Icon { get; set; }
///// <summary>
///// The icon to be displayed.
///// </summary>
//public MessageBoxIcon Icon { get; set; }
/// <summary>
/// The message to be displayed.

View file

@ -8,7 +8,7 @@
using System;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the password input event fired by the <see cref="Hosts.IRuntimeHost"/>.

View file

@ -7,9 +7,9 @@
*/
using System;
using SafeExamBrowser.Contracts.Communication.Data;
using SafeExamBrowser.Communication.Contracts.Data;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the password request event fired by the <see cref="Hosts.IClientHost"/>.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the reconfiguration event fired by the <see cref="Hosts.IRuntimeHost"/>.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Configuration.Contracts;
namespace SafeExamBrowser.Contracts.Communication.Events
namespace SafeExamBrowser.Communication.Contracts.Events
{
/// <summary>
/// The event arguments used for the session start event fired by the <see cref="Hosts.IServiceHost"/>.

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