Exemplo n.º 1
0
 private void UnhideDeviceBtn_Click(object sender, EventArgs e)
 {
     if (HiddenDevicesListBox.SelectedIndex != -1)
     {
         string hid = HiddenDevicesListBox.SelectedItem.ToString().Split(':')[1];
         HIDGuardianAPI.UnhideDevice(hid);
         MoveSelectedListBoxItem(HiddenDevicesListBox, AvailableDevicesListBox);
         HIDGuardianAPI.ReplugHID(hid);
     }
 }
Exemplo n.º 2
0
        private void UnhideDevices()
        {
            string prevaffecteddevices = HIDGuardianAPI.GetAffectedDevicesList(); // Get a list of available hidden devices from last run.

            foreach (string prevaffecteddevice in prevaffecteddevices.Split(';'))
            {
                HIDGuardianAPI.UnhideDevice(prevaffecteddevice);
                HIDGuardianAPI.ReplugHID(prevaffecteddevice); // Iterate over the list of affected devices from the last run and replug them (to refresh them).
            }
        }
Exemplo n.º 3
0
 private void UnhideAllBtn_Click(object sender, EventArgs e)
 {
     HIDGuardianAPI.UnhideAllDevices();
     foreach (var device in HiddenDevicesListBox.Items)
     {
         string hid = device.ToString().Split(':')[1];
         HIDGuardianAPI.UnhideDevice(hid);
         HIDGuardianAPI.ReplugHID(hid);
     }
     MoveListBoxItems(HiddenDevicesListBox, AvailableDevicesListBox);
 }