diff --git a/SafeExamBrowser.Browser/BrowserApplicationController.cs b/SafeExamBrowser.Browser/BrowserApplicationController.cs
index 63d44006..29cee667 100644
--- a/SafeExamBrowser.Browser/BrowserApplicationController.cs
+++ b/SafeExamBrowser.Browser/BrowserApplicationController.cs
@@ -52,7 +52,7 @@ namespace SafeExamBrowser.Browser
public void RegisterApplicationButton(ITaskbarButton button)
{
this.button = button;
- this.button.OnClick += Button_OnClick;
+ this.button.Clicked += Button_OnClick;
}
public void Terminate()
diff --git a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
index 716241c1..f0b13879 100644
--- a/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
+++ b/SafeExamBrowser.Browser/BrowserApplicationInstance.cs
@@ -23,7 +23,7 @@ namespace SafeExamBrowser.Browser
public string Name { get; private set; }
public IWindow Window { get { return window; } }
- public event TerminationEventHandler Terminated;
+ public event TerminatedEventHandler Terminated;
public event NameChangedEventHandler NameChanged;
public BrowserApplicationInstance(IBrowserSettings settings, IText text, IUserInterfaceFactory uiFactory, bool isMainInstance)
diff --git a/SafeExamBrowser.Browser/BrowserControl.cs b/SafeExamBrowser.Browser/BrowserControl.cs
index 7e84efc8..206f5ddd 100644
--- a/SafeExamBrowser.Browser/BrowserControl.cs
+++ b/SafeExamBrowser.Browser/BrowserControl.cs
@@ -16,18 +16,18 @@ namespace SafeExamBrowser.Browser
{
class BrowserControl : ChromiumWebBrowser, IBrowserControl
{
- private AddressChangedHandler addressChanged;
+ private AddressChangedEventHandler addressChanged;
private IBrowserSettings settings;
- private TitleChangedHandler titleChanged;
+ private TitleChangedEventHandler titleChanged;
private IText text;
- event AddressChangedHandler IBrowserControl.AddressChanged
+ event AddressChangedEventHandler IBrowserControl.AddressChanged
{
add { addressChanged += value; }
remove { addressChanged -= value; }
}
- event TitleChangedHandler IBrowserControl.TitleChanged
+ event TitleChangedEventHandler IBrowserControl.TitleChanged
{
add { titleChanged += value; }
remove { titleChanged -= value; }
diff --git a/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs b/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs
index 476dfc7c..5e96ef57 100644
--- a/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs
+++ b/SafeExamBrowser.Contracts/Configuration/IApplicationInstance.cs
@@ -11,7 +11,7 @@ using SafeExamBrowser.Contracts.UserInterface;
namespace SafeExamBrowser.Contracts.Configuration
{
- public delegate void TerminationEventHandler(Guid id);
+ public delegate void TerminatedEventHandler(Guid id);
public delegate void NameChangedEventHandler(string name);
public interface IApplicationInstance
@@ -29,7 +29,7 @@ namespace SafeExamBrowser.Contracts.Configuration
///
/// Event fired when the application instance has been terminated.
///
- event TerminationEventHandler Terminated;
+ event TerminatedEventHandler Terminated;
///
/// Event fired when the name or (document) title of the application instance has changed.
diff --git a/SafeExamBrowser.Contracts/Monitoring/IProcessMonitor.cs b/SafeExamBrowser.Contracts/Monitoring/IProcessMonitor.cs
index ad269baf..58387d07 100644
--- a/SafeExamBrowser.Contracts/Monitoring/IProcessMonitor.cs
+++ b/SafeExamBrowser.Contracts/Monitoring/IProcessMonitor.cs
@@ -10,7 +10,7 @@ using System;
namespace SafeExamBrowser.Contracts.Monitoring
{
- public delegate void ExplorerStartedHandler();
+ public delegate void ExplorerStartedEventHandler();
public interface IProcessMonitor
{
@@ -18,7 +18,7 @@ namespace SafeExamBrowser.Contracts.Monitoring
/// Event fired when the process monitor observes that a new instance of
/// the Windows explorer has been started.
///
- event ExplorerStartedHandler ExplorerStarted;
+ event ExplorerStartedEventHandler ExplorerStarted;
///
/// Performs a check whether the process associated to the given window is allowed.
diff --git a/SafeExamBrowser.Contracts/Monitoring/IWindowMonitor.cs b/SafeExamBrowser.Contracts/Monitoring/IWindowMonitor.cs
index 58480537..ea85cdd0 100644
--- a/SafeExamBrowser.Contracts/Monitoring/IWindowMonitor.cs
+++ b/SafeExamBrowser.Contracts/Monitoring/IWindowMonitor.cs
@@ -10,14 +10,14 @@ using System;
namespace SafeExamBrowser.Contracts.Monitoring
{
- public delegate void WindowChangedHandler(IntPtr window);
+ public delegate void WindowChangedEventHandler(IntPtr window);
public interface IWindowMonitor
{
///
/// Event fired when the window monitor observes that the foreground window has changed.
///
- event WindowChangedHandler WindowChanged;
+ event WindowChangedEventHandler WindowChanged;
///
/// Forcefully closes the specified window.
diff --git a/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs b/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs
index cdb7ece3..b8b0cb5e 100644
--- a/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/IBrowserControl.cs
@@ -8,20 +8,20 @@
namespace SafeExamBrowser.Contracts.UserInterface
{
- public delegate void AddressChangedHandler(string address);
- public delegate void TitleChangedHandler(string title);
+ public delegate void AddressChangedEventHandler(string address);
+ public delegate void TitleChangedEventHandler(string title);
public interface IBrowserControl
{
///
/// Event fired when the address of the browser control changes.
///
- event AddressChangedHandler AddressChanged;
+ event AddressChangedEventHandler AddressChanged;
///
/// Event fired when the current page (and thus the title) of the browser control changes.
///
- event TitleChangedHandler TitleChanged;
+ event TitleChangedEventHandler TitleChanged;
///
/// Navigates to the previous page in the browser control history.
diff --git a/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs b/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs
index 5c200537..e3c458a0 100644
--- a/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/IBrowserWindow.cs
@@ -8,29 +8,29 @@
namespace SafeExamBrowser.Contracts.UserInterface
{
- public delegate void ActionRequestedHandler();
+ public delegate void ActionRequestedEventHandler();
public interface IBrowserWindow : IWindow
{
///
/// Event fired when the user changed the URL.
///
- event AddressChangedHandler AddressChanged;
+ event AddressChangedEventHandler AddressChanged;
///
/// Event fired when the user would like to navigate backwards.
///
- event ActionRequestedHandler BackwardNavigationRequested;
+ event ActionRequestedEventHandler BackwardNavigationRequested;
///
/// Event fired when the user would like to navigate forwards.
///
- event ActionRequestedHandler ForwardNavigationRequested;
+ event ActionRequestedEventHandler ForwardNavigationRequested;
///
/// Event fired when the user would like to reload the current page.
///
- event ActionRequestedHandler ReloadRequested;
+ event ActionRequestedEventHandler ReloadRequested;
///
/// Determines whether this window is the main browser window.
diff --git a/SafeExamBrowser.Contracts/UserInterface/ITaskbar.cs b/SafeExamBrowser.Contracts/UserInterface/ITaskbar.cs
index d463331e..6e80f106 100644
--- a/SafeExamBrowser.Contracts/UserInterface/ITaskbar.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/ITaskbar.cs
@@ -18,8 +18,7 @@ namespace SafeExamBrowser.Contracts.UserInterface
///
/// Adds the given notification button to the taskbar.
///
- ///
- void AddNotification(ITaskbarNotification button);
+ void AddNotification(ITaskbarNotification notification);
///
/// Returns the absolute height of the taskbar (i.e. in physical pixels).
diff --git a/SafeExamBrowser.Contracts/UserInterface/ITaskbarButton.cs b/SafeExamBrowser.Contracts/UserInterface/ITaskbarButton.cs
index c2edd52d..a5066646 100644
--- a/SafeExamBrowser.Contracts/UserInterface/ITaskbarButton.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/ITaskbarButton.cs
@@ -11,18 +11,18 @@ using SafeExamBrowser.Contracts.Configuration;
namespace SafeExamBrowser.Contracts.UserInterface
{
- public delegate void TaskbarButtonClickHandler(Guid? instanceId = null);
+ public delegate void TaskbarButtonClickedEventHandler(Guid? instanceId = null);
public interface ITaskbarButton
{
///
- /// OnClick handler, executed when the user clicks on the application button. If multiple instances of
- /// an application are active, the handler is only executed when the user selects one of the instances.
+ /// Event fired when the user clicked on the application button. If multiple instances of an application
+ /// are active, the handler is only executed when the user selects one of the instances.
///
- event TaskbarButtonClickHandler OnClick;
+ event TaskbarButtonClickedEventHandler Clicked;
///
- /// Registers a new instance of an application, to be displayed if the user clicks the taskbar button.
+ /// Registers a new instance of an application, to be started / displayed if the user clicked the taskbar button.
///
void RegisterInstance(IApplicationInstance instance);
}
diff --git a/SafeExamBrowser.Contracts/UserInterface/ITaskbarNotification.cs b/SafeExamBrowser.Contracts/UserInterface/ITaskbarNotification.cs
index 7271ac96..7986bca7 100644
--- a/SafeExamBrowser.Contracts/UserInterface/ITaskbarNotification.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/ITaskbarNotification.cs
@@ -8,13 +8,13 @@
namespace SafeExamBrowser.Contracts.UserInterface
{
- public delegate void TaskbarNotificationClickHandler();
+ public delegate void TaskbarNotificationClickedEventHandler();
public interface ITaskbarNotification
{
///
- /// OnClick handler, executed when the user clicks on the notification icon.
+ /// Event fired when the user clicked on the notification icon.
///
- event TaskbarNotificationClickHandler OnClick;
+ event TaskbarNotificationClickedEventHandler Clicked;
}
}
diff --git a/SafeExamBrowser.Contracts/UserInterface/IWindow.cs b/SafeExamBrowser.Contracts/UserInterface/IWindow.cs
index 8bb88b77..dc00f7fb 100644
--- a/SafeExamBrowser.Contracts/UserInterface/IWindow.cs
+++ b/SafeExamBrowser.Contracts/UserInterface/IWindow.cs
@@ -8,14 +8,14 @@
namespace SafeExamBrowser.Contracts.UserInterface
{
- public delegate void WindowClosingHandler();
+ public delegate void WindowClosingEventHandler();
public interface IWindow
{
///
/// Event fired when the window is closing.
///
- event WindowClosingHandler Closing;
+ event WindowClosingEventHandler Closing;
///
/// Brings the window to the foreground.
diff --git a/SafeExamBrowser.Monitoring/Processes/ProcessMonitor.cs b/SafeExamBrowser.Monitoring/Processes/ProcessMonitor.cs
index 4e28c3dc..99884f04 100644
--- a/SafeExamBrowser.Monitoring/Processes/ProcessMonitor.cs
+++ b/SafeExamBrowser.Monitoring/Processes/ProcessMonitor.cs
@@ -24,7 +24,7 @@ namespace SafeExamBrowser.Monitoring.Processes
private INativeMethods nativeMethods;
private ManagementEventWatcher explorerWatcher;
- public event ExplorerStartedHandler ExplorerStarted;
+ public event ExplorerStartedEventHandler ExplorerStarted;
public ProcessMonitor(ILogger logger, INativeMethods nativeMethods)
{
diff --git a/SafeExamBrowser.Monitoring/Windows/WindowMonitor.cs b/SafeExamBrowser.Monitoring/Windows/WindowMonitor.cs
index 7edac1c2..1f170474 100644
--- a/SafeExamBrowser.Monitoring/Windows/WindowMonitor.cs
+++ b/SafeExamBrowser.Monitoring/Windows/WindowMonitor.cs
@@ -22,7 +22,7 @@ namespace SafeExamBrowser.Monitoring.Windows
private IList minimizedWindows = new List();
private INativeMethods nativeMethods;
- public event WindowChangedHandler WindowChanged;
+ public event WindowChangedEventHandler WindowChanged;
public WindowMonitor(ILogger logger, INativeMethods nativeMethods)
{
diff --git a/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs b/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs
index 214e7cbe..61d5cf26 100644
--- a/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs
+++ b/SafeExamBrowser.UserInterface/BrowserWindow.xaml.cs
@@ -17,7 +17,7 @@ namespace SafeExamBrowser.UserInterface
{
private bool isMainWindow;
private IBrowserSettings settings;
- public WindowClosingHandler closing;
+ public WindowClosingEventHandler closing;
public bool IsMainWindow
{
@@ -32,12 +32,12 @@ namespace SafeExamBrowser.UserInterface
}
}
- public event AddressChangedHandler AddressChanged;
- public event ActionRequestedHandler BackwardNavigationRequested;
- public event ActionRequestedHandler ForwardNavigationRequested;
- public event ActionRequestedHandler ReloadRequested;
+ public event AddressChangedEventHandler AddressChanged;
+ public event ActionRequestedEventHandler BackwardNavigationRequested;
+ public event ActionRequestedEventHandler ForwardNavigationRequested;
+ public event ActionRequestedEventHandler ReloadRequested;
- event WindowClosingHandler IWindow.Closing
+ event WindowClosingEventHandler IWindow.Closing
{
add { closing += value; }
remove { closing -= value; }
diff --git a/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml.cs b/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml.cs
index ba963f3a..ca80f43a 100644
--- a/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface/Controls/ApplicationButton.xaml.cs
@@ -23,7 +23,7 @@ namespace SafeExamBrowser.UserInterface.Controls
private IApplicationInfo info;
private IList instances = new List();
- public event TaskbarButtonClickHandler OnClick;
+ public event TaskbarButtonClickedEventHandler Clicked;
public ApplicationButton(IApplicationInfo info)
{
@@ -37,7 +37,7 @@ namespace SafeExamBrowser.UserInterface.Controls
{
var instanceButton = new ApplicationInstanceButton(instance, info);
- instanceButton.Click += (id) => OnClick?.Invoke(id);
+ instanceButton.Clicked += (id) => Clicked?.Invoke(id);
instance.Terminated += (id) => Instance_OnTerminated(id, instanceButton);
instances.Add(instance);
@@ -81,7 +81,7 @@ namespace SafeExamBrowser.UserInterface.Controls
{
if (instances.Count <= 1)
{
- OnClick?.Invoke(instances.FirstOrDefault()?.Id);
+ Clicked?.Invoke(instances.FirstOrDefault()?.Id);
}
else
{
diff --git a/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs b/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs
index 38adbd36..8c130c28 100644
--- a/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs
+++ b/SafeExamBrowser.UserInterface/Controls/ApplicationInstanceButton.xaml.cs
@@ -14,14 +14,14 @@ using SafeExamBrowser.UserInterface.Utilities;
namespace SafeExamBrowser.UserInterface.Controls
{
+ internal delegate void InstanceButtonClickedEventHandler(Guid instanceId);
+
public partial class ApplicationInstanceButton : UserControl
{
private IApplicationInfo info;
private IApplicationInstance instance;
- public delegate void OnClickHandler(Guid instanceId);
-
- public event OnClickHandler Click;
+ internal event InstanceButtonClickedEventHandler Clicked;
public ApplicationInstanceButton(IApplicationInstance instance, IApplicationInfo info)
{
@@ -50,7 +50,7 @@ namespace SafeExamBrowser.UserInterface.Controls
private void Button_Click(object sender, RoutedEventArgs e)
{
- Click?.Invoke(instance.Id);
+ Clicked?.Invoke(instance.Id);
}
}
}
diff --git a/SafeExamBrowser.UserInterface/Controls/NotificationIcon.xaml.cs b/SafeExamBrowser.UserInterface/Controls/NotificationIcon.xaml.cs
index 8e81ca5f..ea3294ae 100644
--- a/SafeExamBrowser.UserInterface/Controls/NotificationIcon.xaml.cs
+++ b/SafeExamBrowser.UserInterface/Controls/NotificationIcon.xaml.cs
@@ -6,6 +6,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+using System.Windows;
using System.Windows.Controls;
using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.UserInterface;
@@ -15,7 +16,7 @@ namespace SafeExamBrowser.UserInterface.Controls
{
public partial class NotificationIcon : UserControl, ITaskbarNotification
{
- public event TaskbarNotificationClickHandler OnClick;
+ public event TaskbarNotificationClickedEventHandler Clicked;
public NotificationIcon(INotificationInfo info)
{
@@ -23,9 +24,9 @@ namespace SafeExamBrowser.UserInterface.Controls
InitializeNotificationIcon(info);
}
- private void Icon_Click(object sender, System.Windows.RoutedEventArgs e)
+ private void Icon_Click(object sender, RoutedEventArgs e)
{
- OnClick?.Invoke();
+ Clicked?.Invoke();
}
private void InitializeNotificationIcon(INotificationInfo info)