private void UsbDeviceNotification(object sender, UsbNotificationEventArgs args) { if (args.DeviceType == DeviceType.DBT_DEVTYP_PORT) { RefreshListbox(); } }
private void OnDeviceArrival(object sender, UsbNotificationEventArgs args) { ScheduleBuildMenu(); // see if this was our active controller and we can reactivate it var ac = ConfigManager.GetActiveController(); if (string.Compare(ac?.DevicePath, args.Name, StringComparison.OrdinalIgnoreCase) == 0) { ac?.Activate(); } }
private void RefreshDeviceList(object sender, UsbNotificationEventArgs e) { lbDevices.DataSource = MuniaController.GetConfigInterfaces().ToList(); }
private void OnDeviceRemoval(object sender, UsbNotificationEventArgs args) { ScheduleBuildMenu(); }
private void UsbDeviceListChanged(object sender, UsbNotificationEventArgs args) { UpdateUI(); }