/// <summary>
        /// Get the device status.
        /// </summary>
        public void OnGetStatus()
        {
            if (deviceCommunication == null)
            {
                return;
            }

            if (deviceState != DeviceState.Disposed && (DateTime.Now - lastGetStatus).TotalSeconds > 2)
            {
                deviceCommunication.GetStatus();
                lastGetStatus = DateTime.Now;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the device status.
        /// </summary>
        public void OnGetStatus()
        {
            if (deviceCommunication == null)
            {
                return;
            }

            DoFirewallCheck();

            if (GetDeviceState() != DeviceState.Disposed && (DateTime.Now - lastGetStatus).TotalSeconds > 5)
            {
                deviceCommunication.GetStatus();
                GetDeviceInformation();
                lastGetStatus = DateTime.Now;
            }
        }