mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
Renamed DeviceEvent to DeviceEventReceived
This commit is contained in:
@@ -22,7 +22,7 @@ namespace NTwain
|
||||
var rc = DGControl.DeviceEvent.Get(ref de);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
OnDeviceEvent(new DeviceEventArgs { Data = de });
|
||||
OnDeviceEventReceived(new DeviceEventArgs { Data = de });
|
||||
}
|
||||
break;
|
||||
case Message.XferReady:
|
||||
|
||||
@@ -48,21 +48,19 @@ namespace NTwain
|
||||
public DGCustom DGCustom { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the source has generated an event.
|
||||
/// </summary>
|
||||
public event EventHandler<DeviceEventArgs> DeviceEvent;
|
||||
public event EventHandler<DeviceEventArgs> DeviceEventReceived;
|
||||
|
||||
/// <summary>
|
||||
/// Raises the <see cref="DeviceEvent"/> event.
|
||||
/// Raises the <see cref="DeviceEventReceived"/> event.
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected virtual void OnDeviceEvent(DeviceEventArgs e)
|
||||
protected virtual void OnDeviceEventReceived(DeviceEventArgs e)
|
||||
{
|
||||
OnDeviceEvent(e);
|
||||
DeviceEvent?.Invoke(this, e);
|
||||
var handler = DeviceEventReceived;
|
||||
handler?.Invoke(this, e);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,8 +77,8 @@ namespace NTwain
|
||||
/// <param name="propertyName">Name of the property.</param>
|
||||
protected void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
var handle = PropertyChanged;
|
||||
handle?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
var handler = PropertyChanged;
|
||||
handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user