1
0
mirror of https://github.com/DarthAffe/CUE.NET.git synced 2025-12-12 16:58:29 +00:00

Renamed Exception-Event

This commit is contained in:
Darth Affe 2016-03-25 18:57:14 +01:00
parent 2cbf4b9894
commit 88ac78f19a
5 changed files with 12 additions and 12 deletions

View File

@ -50,7 +50,7 @@
<Compile Include="Devices\Generic\Enums\CorsairAccessMode.cs" />
<Compile Include="Devices\Generic\Enums\CorsairDeviceCaps.cs" />
<Compile Include="Devices\Generic\Enums\CorsairDeviceType.cs" />
<Compile Include="Devices\Generic\OnExceptionEventArgs.cs" />
<Compile Include="Devices\Generic\ExceptionEventArgs.cs" />
<Compile Include="Brushes\AbstractBrush.cs" />
<Compile Include="Gradients\AbstractGradient.cs" />
<Compile Include="Gradients\GradientStop.cs" />

View File

@ -71,7 +71,7 @@ namespace CUE.NET.Devices.Generic
/// <summary>
/// Occurs when a catched exception is thrown inside the device.
/// </summary>
public event OnExceptionEventHandler OnException;
public event ExceptionEventHandler Exception;
#endregion
@ -290,10 +290,10 @@ namespace CUE.NET.Devices.Generic
/// Handles the needed event-calls for an exception.
/// </summary>
/// <param name="ex"></param>
/// <exception cref="Exception">A delegate callback throws an exception.</exception>
/// <exception cref="System.Exception">A delegate callback throws an exception.</exception>
protected void ManageException(Exception ex)
{
OnException?.Invoke(this, new OnExceptionEventArgs(ex));
Exception?.Invoke(this, new ExceptionEventArgs(ex));
}
/// <summary>

View File

@ -6,9 +6,9 @@ using System;
namespace CUE.NET.Devices.Generic
{
/// <summary>
/// Represents the information supplied with an OnException-event.
/// Represents the information supplied with an Exception-event.
/// </summary>
public class OnExceptionEventArgs : EventArgs
public class ExceptionEventArgs : EventArgs
{
#region Properties & Fields
@ -22,10 +22,10 @@ namespace CUE.NET.Devices.Generic
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="OnExceptionEventArgs"/> class.
/// Initializes a new instance of the <see cref="ExceptionEventArgs"/> class.
/// </summary>
/// <param name="exception">The exception which is responsible for the event-call.</param>
public OnExceptionEventArgs(Exception exception)
public ExceptionEventArgs(Exception exception)
{
this.Exception = exception;
}

View File

@ -7,11 +7,11 @@ using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices
{
/// <summary>
/// Represents the event-handler of the OnException-event.
/// Represents the event-handler of the Exception-event.
/// </summary>
/// <param name="sender">The sender of the event.</param>
/// <param name="args">The arguments provided by the event.</param>
public delegate void OnExceptionEventHandler(object sender, OnExceptionEventArgs args);
public delegate void ExceptionEventHandler(object sender, ExceptionEventArgs args);
/// <summary>
/// Represents a generic cue device.
@ -37,7 +37,7 @@ namespace CUE.NET.Devices
/// <summary>
/// Occurs when a catched exception is thrown inside the device.
/// </summary>
event OnExceptionEventHandler OnException;
event ExceptionEventHandler Exception;
/// <summary>
/// Perform an update for all dirty keys, or all keys if flushLeds is set to true.

View File

@ -53,7 +53,7 @@ namespace Example_AudioAnalyzer_full
//_keyboard.UpdateFrequency = 1f / 60f; // 60 updates per second
// This is useful for debugging-purposes
_keyboard.OnException += (sender, args) => Console.WriteLine(args.Exception.Message);
_keyboard.Exception += (sender, args) => Console.WriteLine(args.Exception.Message);
Console.WriteLine("CUE.NET initialized!");
}