Esempio n. 1
0
        protected void OnIdentificationStateChanged(object sender, DeviceIdentificationEventArgs e)
        {
            if (e.State == DeviceIdentificationState.Success)
            {
                Status = DeviceStatus.Identified;

                MsgLogger.WriteLine($"Identified device='{e.Device.Family}' has serial number=0x{e.SerialNumber:X}");

                (Version as EposDeviceVersion)?.Read();
            }
            else if (e.State == DeviceIdentificationState.Failed)
            {
                MsgLogger.WriteLine($"Device: {e.Device.Family} ({(e.Device as EposDevice)?.PortName}) - Identification failed, reason={e.LastErrorCode}");
            }
        }
Esempio n. 2
0
 protected virtual void OnStateChanged(DeviceIdentificationEventArgs e)
 {
     StateChanged?.Invoke(this, e);
 }