Example #1
0
 private void Monitor_DeviceDisconnected(object sender, DeviceDataEventArgs e)
 {
     if (Device.Equals(e.Device))
     {
         MessageBox.Show(string.Format("{0} has been disconnected unexpectedly", e.Device.Name), "AdbLiveTweaks", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Invoke(new EnableButtonsDelegate((s) =>
         {
             button2.Enabled  = s;
             button3.Enabled  = s;
             button4.Enabled  = s;
             button5.Enabled  = s;
             button6.Enabled  = s;
             button7.Enabled  = s;
             button8.Enabled  = s;
             button9.Enabled  = s;
             button10.Enabled = s;
             button11.Enabled = s;
         }), false);
     }
     else
     {
         MessageBox.Show(string.Format("{0} has been disconnected unexpectedly", e.Device.Name), "AdbLiveTweaks", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }