void Disconnected(object sender, DeviceDisconnectedEventArgs e) { Dispatcher.Invoke(() => { Close(); }); }
private void DispatchRefreshGameControllers(object sender, DeviceDisconnectedEventArgs e) { ThreadCreator.Create("Device list refresh delay", (token) => { Thread.Sleep(1000); dispatcher.Invoke(RefreshGameControllers); }).Start(); }
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); } }
void OnDeviceDisconnected(byte[] deviceMacAddress) { this.ConnectedDeviceCount--; if (DeviceDisconnected != null) { var args = new DeviceDisconnectedEventArgs(deviceMacAddress); DeviceDisconnected(this, args); } }
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(); }
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); }, }); }
protected void InvokeClosedEvent(DeviceDisconnectedEventArgs args) { Closed?.Invoke(this, args); }
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); }
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. }
/// <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"); }
void OnDeviceDisconnected(byte[] deviceMacAddress) { this.ConnectedDeviceCount--; if (DeviceDisconnected != null) { var args = new DeviceDisconnectedEventArgs(deviceMacAddress); DeviceDisconnected(this, args); } }