SEBWIN-342: Separated monitoring contracts into individual namespaces.

This commit is contained in:
dbuechel 2019-09-05 09:00:41 +02:00
parent c282623eb4
commit db390aebaf
35 changed files with 86 additions and 57 deletions

View file

@ -22,6 +22,9 @@ using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts;
using SafeExamBrowser.Monitoring.Contracts.Display;
using SafeExamBrowser.Monitoring.Contracts.Processes;
using SafeExamBrowser.Monitoring.Contracts.Windows;
using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell; using SafeExamBrowser.UserInterface.Contracts.Shell;

View file

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

View file

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

View file

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

View file

@ -11,7 +11,7 @@ using Moq;
using SafeExamBrowser.Client.Operations; using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Processes;
namespace SafeExamBrowser.Client.UnitTests.Operations namespace SafeExamBrowser.Client.UnitTests.Operations
{ {

View file

@ -11,7 +11,7 @@ using Moq;
using SafeExamBrowser.Client.Operations; using SafeExamBrowser.Client.Operations;
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Windows;
namespace SafeExamBrowser.Client.UnitTests.Operations namespace SafeExamBrowser.Client.UnitTests.Operations
{ {

View file

@ -21,7 +21,9 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Display;
using SafeExamBrowser.Monitoring.Contracts.Processes;
using SafeExamBrowser.Monitoring.Contracts.Windows;
using SafeExamBrowser.UserInterface.Contracts; using SafeExamBrowser.UserInterface.Contracts;
using SafeExamBrowser.UserInterface.Contracts.MessageBox; using SafeExamBrowser.UserInterface.Contracts.MessageBox;
using SafeExamBrowser.UserInterface.Contracts.Shell; using SafeExamBrowser.UserInterface.Contracts.Shell;

View file

@ -32,7 +32,8 @@ using SafeExamBrowser.I18n;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging; using SafeExamBrowser.Logging;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Processes;
using SafeExamBrowser.Monitoring.Contracts.Windows;
using SafeExamBrowser.Monitoring.Display; using SafeExamBrowser.Monitoring.Display;
using SafeExamBrowser.Monitoring.Keyboard; using SafeExamBrowser.Monitoring.Keyboard;
using SafeExamBrowser.Monitoring.Mouse; using SafeExamBrowser.Monitoring.Mouse;

View file

@ -10,7 +10,7 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Display;
using SafeExamBrowser.UserInterface.Contracts.Shell; using SafeExamBrowser.UserInterface.Contracts.Shell;
namespace SafeExamBrowser.Client.Operations namespace SafeExamBrowser.Client.Operations

View file

@ -10,7 +10,7 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Keyboard;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations namespace SafeExamBrowser.Client.Operations

View file

@ -10,7 +10,7 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Mouse;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Client.Operations namespace SafeExamBrowser.Client.Operations

View file

@ -11,7 +11,7 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Processes;
namespace SafeExamBrowser.Client.Operations namespace SafeExamBrowser.Client.Operations
{ {

View file

@ -11,7 +11,7 @@ using SafeExamBrowser.Core.Contracts.OperationModel;
using SafeExamBrowser.Core.Contracts.OperationModel.Events; using SafeExamBrowser.Core.Contracts.OperationModel.Events;
using SafeExamBrowser.I18n.Contracts; using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Windows;
namespace SafeExamBrowser.Client.Operations namespace SafeExamBrowser.Client.Operations
{ {

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts.Events namespace SafeExamBrowser.Monitoring.Contracts.Display.Events
{ {
/// <summary> /// <summary>
/// Indicates that the configuration of a display has changed. /// Indicates that the configuration of a display has changed.

View file

@ -6,9 +6,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Display.Events;
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Display
{ {
/// <summary> /// <summary>
/// Monitors the displays of the computer for (setup) changes and provides access to display-related functionality. /// Monitors the displays of the computer for (setup) changes and provides access to display-related functionality.

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Keyboard
{ {
/// <summary> /// <summary>
/// Intercepts all keyboard input (except the Secure Attention Sequence: https://en.wikipedia.org/wiki/Secure_attention_key). /// Intercepts all keyboard input (except the Secure Attention Sequence: https://en.wikipedia.org/wiki/Secure_attention_key).

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Keyboard
{ {
/// <summary> /// <summary>
/// The key modifiers which can be detected by the <see cref="IKeyboardInterceptor"/>. /// The key modifiers which can be detected by the <see cref="IKeyboardInterceptor"/>.

View file

@ -6,10 +6,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Keyboard
{ {
/// <summary> /// <summary>
/// The key states which can be detected by the <see cref="IKeyboardInterceptor"/> or <see cref="IMouseInterceptor"/>. /// The key states which can be detected by the <see cref="IKeyboardInterceptor"/>.
/// </summary> /// </summary>
public enum KeyState public enum KeyState
{ {

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Mouse
{ {
/// <summary> /// <summary>
/// Intercepts all mouse input. /// Intercepts all mouse input.
@ -16,6 +16,6 @@ namespace SafeExamBrowser.Monitoring.Contracts
/// <summary> /// <summary>
/// Returns <c>true</c> if the given button should be blocked, otherwise <c>false</c>. /// Returns <c>true</c> if the given button should be blocked, otherwise <c>false</c>.
/// </summary> /// </summary>
bool Block(MouseButton button, KeyState state); bool Block(MouseButton button, MouseButtonState state);
} }
} }

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Mouse
{ {
/// <summary> /// <summary>
/// The mouse buttons which can be detected by the <see cref="IMouseInterceptor"/>. /// The mouse buttons which can be detected by the <see cref="IMouseInterceptor"/>.

View file

@ -0,0 +1,20 @@
/*
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Monitoring.Contracts.Mouse
{
/// <summary>
/// The mouse button states which can be detected by the <see cref="IMouseInterceptor"/>.
/// </summary>
public enum MouseButtonState
{
Unknown = 0,
Pressed,
Released
}
}

View file

@ -6,7 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
namespace SafeExamBrowser.Monitoring.Contracts.Events namespace SafeExamBrowser.Monitoring.Contracts.Processes.Events
{ {
/// <summary> /// <summary>
/// Indicates that the Windows explorer process has started. /// Indicates that the Windows explorer process has started.

View file

@ -7,9 +7,9 @@
*/ */
using System; using System;
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Processes.Events;
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Processes
{ {
/// <summary> /// <summary>
/// Monitors the processes running on the computer and provides access to process-related functionality. /// Monitors the processes running on the computer and provides access to process-related functionality.

View file

@ -53,17 +53,18 @@
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Events\DisplayChangedEventHandler.cs" /> <Compile Include="Display\Events\DisplayChangedEventHandler.cs" />
<Compile Include="Events\ExplorerStartedEventHandler.cs" /> <Compile Include="Processes\Events\ExplorerStartedEventHandler.cs" />
<Compile Include="Events\WindowChangedEventHandler.cs" /> <Compile Include="Windows\Events\WindowChangedEventHandler.cs" />
<Compile Include="IDisplayMonitor.cs" /> <Compile Include="Display\IDisplayMonitor.cs" />
<Compile Include="IKeyboardInterceptor.cs" /> <Compile Include="Keyboard\IKeyboardInterceptor.cs" />
<Compile Include="IMouseInterceptor.cs" /> <Compile Include="Mouse\MouseButtonState.cs" />
<Compile Include="IProcessMonitor.cs" /> <Compile Include="Mouse\IMouseInterceptor.cs" />
<Compile Include="IWindowMonitor.cs" /> <Compile Include="Processes\IProcessMonitor.cs" />
<Compile Include="KeyModifier.cs" /> <Compile Include="Windows\IWindowMonitor.cs" />
<Compile Include="KeyState.cs" /> <Compile Include="Keyboard\KeyModifier.cs" />
<Compile Include="MouseButton.cs" /> <Compile Include="Keyboard\KeyState.cs" />
<Compile Include="Mouse\MouseButton.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -8,7 +8,7 @@
using System; using System;
namespace SafeExamBrowser.Monitoring.Contracts.Events namespace SafeExamBrowser.Monitoring.Contracts.Windows.Events
{ {
/// <summary> /// <summary>
/// Indicates that the input focus has changed to the window with the specified handle. /// Indicates that the input focus has changed to the window with the specified handle.

View file

@ -7,9 +7,9 @@
*/ */
using System; using System;
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Windows.Events;
namespace SafeExamBrowser.Monitoring.Contracts namespace SafeExamBrowser.Monitoring.Contracts.Windows
{ {
/// <summary> /// <summary>
/// Monitors the windows associated with the current desktop and provides window-related functionality. /// Monitors the windows associated with the current desktop and provides window-related functionality.

View file

@ -10,8 +10,8 @@ using System;
using System.Windows.Forms; using System.Windows.Forms;
using Microsoft.Win32; using Microsoft.Win32;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Display;
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Display.Events;
using SafeExamBrowser.SystemComponents.Contracts; using SafeExamBrowser.SystemComponents.Contracts;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
using OperatingSystem = SafeExamBrowser.SystemComponents.Contracts.OperatingSystem; using OperatingSystem = SafeExamBrowser.SystemComponents.Contracts.OperatingSystem;

View file

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

View file

@ -8,7 +8,7 @@
using SafeExamBrowser.Configuration.Contracts.Settings; using SafeExamBrowser.Configuration.Contracts.Settings;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Mouse;
namespace SafeExamBrowser.Monitoring.Mouse namespace SafeExamBrowser.Monitoring.Mouse
{ {
@ -23,7 +23,7 @@ namespace SafeExamBrowser.Monitoring.Mouse
this.settings = settings; this.settings = settings;
} }
public bool Block(MouseButton button, KeyState state) public bool Block(MouseButton button, MouseButtonState state)
{ {
var block = false; var block = false;

View file

@ -10,8 +10,8 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using System.Management; using System.Management;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Processes;
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Processes.Events;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Monitoring.Processes namespace SafeExamBrowser.Monitoring.Processes

View file

@ -8,8 +8,8 @@
using System; using System;
using SafeExamBrowser.Logging.Contracts; using SafeExamBrowser.Logging.Contracts;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Windows;
using SafeExamBrowser.Monitoring.Contracts.Events; using SafeExamBrowser.Monitoring.Contracts.Windows.Events;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
namespace SafeExamBrowser.Monitoring.Windows namespace SafeExamBrowser.Monitoring.Windows

View file

@ -8,7 +8,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Keyboard;
using SafeExamBrowser.Monitoring.Contracts.Mouse;
using SafeExamBrowser.WindowsApi.Contracts.Events; using SafeExamBrowser.WindowsApi.Contracts.Events;
namespace SafeExamBrowser.WindowsApi.Contracts namespace SafeExamBrowser.WindowsApi.Contracts

View file

@ -8,7 +8,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Keyboard;
using SafeExamBrowser.WindowsApi.Constants; using SafeExamBrowser.WindowsApi.Constants;
using SafeExamBrowser.WindowsApi.Delegates; using SafeExamBrowser.WindowsApi.Delegates;
using SafeExamBrowser.WindowsApi.Types; using SafeExamBrowser.WindowsApi.Types;

View file

@ -8,7 +8,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Mouse;
using SafeExamBrowser.WindowsApi.Constants; using SafeExamBrowser.WindowsApi.Constants;
using SafeExamBrowser.WindowsApi.Delegates; using SafeExamBrowser.WindowsApi.Delegates;
using SafeExamBrowser.WindowsApi.Types; using SafeExamBrowser.WindowsApi.Types;
@ -90,7 +90,7 @@ namespace SafeExamBrowser.WindowsApi.Hooks
} }
} }
private KeyState GetState(int wParam) private MouseButtonState GetState(int wParam)
{ {
switch (wParam) switch (wParam)
{ {
@ -98,14 +98,14 @@ namespace SafeExamBrowser.WindowsApi.Hooks
case Constant.WM_MBUTTONDOWN: case Constant.WM_MBUTTONDOWN:
case Constant.WM_RBUTTONDOWN: case Constant.WM_RBUTTONDOWN:
case Constant.WM_XBUTTONDOWN: case Constant.WM_XBUTTONDOWN:
return KeyState.Pressed; return MouseButtonState.Pressed;
case Constant.WM_LBUTTONUP: case Constant.WM_LBUTTONUP:
case Constant.WM_MBUTTONUP: case Constant.WM_MBUTTONUP:
case Constant.WM_RBUTTONUP: case Constant.WM_RBUTTONUP:
case Constant.WM_XBUTTONUP: case Constant.WM_XBUTTONUP:
return KeyState.Released; return MouseButtonState.Released;
default: default:
return KeyState.Unknown; return MouseButtonState.Unknown;
} }
} }
} }

View file

@ -14,10 +14,11 @@ using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using SafeExamBrowser.Monitoring.Contracts; using SafeExamBrowser.Monitoring.Contracts.Keyboard;
using SafeExamBrowser.Monitoring.Contracts.Mouse;
using SafeExamBrowser.WindowsApi.Constants;
using SafeExamBrowser.WindowsApi.Contracts; using SafeExamBrowser.WindowsApi.Contracts;
using SafeExamBrowser.WindowsApi.Contracts.Events; using SafeExamBrowser.WindowsApi.Contracts.Events;
using SafeExamBrowser.WindowsApi.Constants;
using SafeExamBrowser.WindowsApi.Hooks; using SafeExamBrowser.WindowsApi.Hooks;
using SafeExamBrowser.WindowsApi.Types; using SafeExamBrowser.WindowsApi.Types;