Exemple #1
0
 void DeviceDisconnected(Automator.Device device)
 {
     RunInMainthread(() => {
         var item = listView_devices.FindItemWithText(device.ADBDevice.SerialNumber);
         if (item != null)
         {
             listView_devices.Items.Remove(item);
         }
     });
 }
Exemple #2
0
        void DeviceConnected(Automator.Device device)
        {
            RunInMainthread(() => {
                if (listView_devices.FindItemWithText(device.ADBDevice.SerialNumber) != null)
                {
                    return;
                }

                ListViewItem item = new ListViewItem(device.ADBDevice.SerialNumber);
                item.SubItems.Add(device.ADBDevice.State.ToString());
                item.SubItems.Add(device.ADBDevice.Model.ToString());
                item.SubItems.Add(device.ADBDevice.Product.ToString());
                item.SubItems.Add(device.ADBDevice.DeviceProperty.ToString());
                listView_devices.Items.Add(item);
            });
        }