ntwain/NTwain/Triplets/DGControl/DGControl.DeviceEvent.cs

19 lines
591 B
C#
Raw Normal View History

2014-04-03 07:13:15 +08:00
using NTwain.Data;
2014-04-21 04:57:38 +08:00
using NTwain.Internals;
2014-04-03 07:01:21 +08:00
namespace NTwain.Triplets
{
2014-04-05 10:19:16 +08:00
/// <summary>
/// Represents <see cref="DataArgumentType.DeviceEvent"/>.
/// </summary>
2014-04-03 07:01:21 +08:00
public sealed class DeviceEvent : OpBase
{
2014-04-06 04:48:28 +08:00
internal DeviceEvent(ITwainStateInternal session) : base(session) { }
2014-04-03 07:01:21 +08:00
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent)
{
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
sourceDeviceEvent = new TWDeviceEvent();
2014-04-16 18:53:05 +08:00
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, sourceDeviceEvent);
2014-04-03 07:01:21 +08:00
}
}
}