ntwain/NTwain/Triplets/DGControl/DGControl.DeviceEvent.cs
2014-04-20 16:57:38 -04:00

19 lines
591 B
C#

using NTwain.Data;
using NTwain.Internals;
namespace NTwain.Triplets
{
/// <summary>
/// Represents <see cref="DataArgumentType.DeviceEvent"/>.
/// </summary>
public sealed class DeviceEvent : OpBase
{
internal DeviceEvent(ITwainStateInternal session) : base(session) { }
public ReturnCode Get(out TWDeviceEvent sourceDeviceEvent)
{
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
sourceDeviceEvent = new TWDeviceEvent();
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, sourceDeviceEvent);
}
}
}