Renamed DeviceEvent to DeviceEventReceived

This commit is contained in:
Eugene Wang
2018-11-15 19:28:59 -05:00
parent 0808270d1a
commit bb37550863
2 changed files with 8 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ namespace NTwain
var rc = DGControl.DeviceEvent.Get(ref de); var rc = DGControl.DeviceEvent.Get(ref de);
if (rc == ReturnCode.Success) if (rc == ReturnCode.Success)
{ {
OnDeviceEvent(new DeviceEventArgs { Data = de }); OnDeviceEventReceived(new DeviceEventArgs { Data = de });
} }
break; break;
case Message.XferReady: case Message.XferReady:

View File

@@ -48,21 +48,19 @@ namespace NTwain
public DGCustom DGCustom { get; set; } public DGCustom DGCustom { get; set; }
/// <summary> /// <summary>
/// Occurs when the source has generated an event. /// Occurs when the source has generated an event.
/// </summary> /// </summary>
public event EventHandler<DeviceEventArgs> DeviceEvent; public event EventHandler<DeviceEventArgs> DeviceEventReceived;
/// <summary> /// <summary>
/// Raises the <see cref="DeviceEvent"/> event. /// Raises the <see cref="DeviceEventReceived"/> event.
/// </summary> /// </summary>
/// <param name="e"></param> /// <param name="e"></param>
protected virtual void OnDeviceEvent(DeviceEventArgs e) protected virtual void OnDeviceEventReceived(DeviceEventArgs e)
{ {
OnDeviceEvent(e); var handler = DeviceEventReceived;
DeviceEvent?.Invoke(this, e); handler?.Invoke(this, e);
} }
@@ -79,8 +77,8 @@ namespace NTwain
/// <param name="propertyName">Name of the property.</param> /// <param name="propertyName">Name of the property.</param>
protected void RaisePropertyChanged(string propertyName) protected void RaisePropertyChanged(string propertyName)
{ {
var handle = PropertyChanged; var handler = PropertyChanged;
handle?.Invoke(this, new PropertyChangedEventArgs(propertyName)); handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
} }
} }
} }