Esempio n. 1
0
 private void UsbDeviceNotification(object sender, UsbNotificationEventArgs args)
 {
     if (args.DeviceType == DeviceType.DBT_DEVTYP_PORT)
     {
         RefreshListbox();
     }
 }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
 private void RefreshDeviceList(object sender, UsbNotificationEventArgs e)
 {
     lbDevices.DataSource = MuniaController.GetConfigInterfaces().ToList();
 }
Esempio n. 4
0
 private void OnDeviceRemoval(object sender, UsbNotificationEventArgs args)
 {
     ScheduleBuildMenu();
 }
Esempio n. 5
0
 private void UsbDeviceListChanged(object sender, UsbNotificationEventArgs args)
 {
     UpdateUI();
 }