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