Пример #1
0
 void Disconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     Dispatcher.Invoke(() =>
     {
         Close();
     });
 }
Пример #2
0
 private void DispatchRefreshGameControllers(object sender, DeviceDisconnectedEventArgs e)
 {
     ThreadCreator.Create("Device list refresh delay", (token) =>
     {
         Thread.Sleep(1000);
         dispatcher.Invoke(RefreshGameControllers);
     }).Start();
 }
Пример #3
0
 private void DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     if (this.ShowDeviceConnectivityBalloons &&
         DateTime.UtcNow - this.syncthingManager.StartedTime > syncedDeadTime)
     {
         this.taskbarIcon.HideBalloonTip();
         this.taskbarIcon.ShowBalloonTip(Resources.TrayIcon_Balloon_DeviceDisconnected_Title, Localizer.F(Resources.TrayIcon_Balloon_DeviceDisconnected_Message, e.Device.Name), BalloonIcon.Info);
     }
 }
Пример #4
0
        void OnDeviceDisconnected(byte[] deviceMacAddress)
        {
            this.ConnectedDeviceCount--;

            if (DeviceDisconnected != null)
            {
                var args = new DeviceDisconnectedEventArgs(deviceMacAddress);
                DeviceDisconnected(this, args);
            }
        }
Пример #5
0
 private void Instance_DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     if (e != null)
     {
         if (e.Device is CoinValidator)
         {
             logger.Log($"{DateTime.Now}==>Device disconnected:{e.Device.DeviceType}-{e.Device.SerialNumber}");
             RemoveDevice((CoinValidator)e.Device);
         }
     }
 }
        private void DispatchRefreshGameControllers(object sender, DeviceDisconnectedEventArgs e)
        {
            Thread delayThread = new Thread(() =>
            {
                Thread.Sleep(1000);
                dispatcher.Invoke(RefreshGameControllers);
            });

            delayThread.Name         = "Device list refresh delay";
            delayThread.IsBackground = true;
            delayThread.Start();
        }
Пример #7
0
 private void DispatchRefreshGameControllers(object sender, DeviceDisconnectedEventArgs e)
 {
     Thread delayThread = ThreadHelper.CreateAndStart(new ThreadStartParameters
     {
         Name         = "Device list refresh delay",
         IsBackground = true,
         Task         = () => {
             Thread.Sleep(1000);
             dispatcher.Invoke(RefreshGameControllers);
         },
     });
 }
Пример #8
0
 protected void InvokeClosedEvent(DeviceDisconnectedEventArgs args)
 {
     Closed?.Invoke(this, args);
 }
Пример #9
0
 private void InputDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     e.Device.InputChanged += InputChanged;
 }
 private void RfidMgr_DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     _accessReadBtn.Enabled = false;
     _bleScanListAdapter.NotifyDataSetChanged();
     _connectionHandler.RemoveMessages(BleMsgConsts.MSG_DEALY_CREATE_READER);
 }
Пример #11
0
 private void DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     // Not sure what to do here - this is caused by the pausing. We can't unpause it otherwise
     // we'll get stuck in a cycle of connected/disconnected.
 }
Пример #12
0
 /// <summary>
 /// SDK detected device disconnected
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Clover_DeviceDisconnected(object sender, DeviceDisconnectedEventArgs e)
 {
     e.Handled = true;
     Output($"Device Disconnected");
 }
Пример #13
0
        void OnDeviceDisconnected(byte[] deviceMacAddress)
        {
            this.ConnectedDeviceCount--;

            if (DeviceDisconnected != null)
            {
                var args = new DeviceDisconnectedEventArgs(deviceMacAddress);
                DeviceDisconnected(this, args);
            }
        }