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);
|
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:
|
||||||
|
|||||||
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user