Beispiel #1
0
 /// <summary>
 /// moshakhasate currentDevice ro ruye label ha namayesh bede
 /// currentdevice ro dar comboBox namayesh bede
 /// </summary>
 private void selectDevice()
 {
     if (devices.Count != 0)
     {
         //age currentDevice vojud dasht ama Model ro natunest neshun bede=>debuging active nist & timer_event start she
         if (string.IsNullOrEmpty(currentDevice.Model))
         {
             label_model.Text  = "Please Allow USB Debuging";
             label_serial.Text = "Serial:  " + currentDevice.Serial;
             label_state.Text  = "State: Away";
             button_mobileState.BackgroundImage = AndroidManager_SHW.Properties.Resources.mobileDebugging;
             panel_downLeftSide.BackColor       = Color.Yellow;
             panel_upLeftSide.BackColor         = Color.Ivory;
             IsDebuging    = true;
             currentDevice = null;
             timer_event.Start();
         }
         else
         {
             currentDeviceIsOn();
             panel_downLeftSide.BackColor   = Color.GreenYellow;
             label_model.Text               = "Model:  " + currentDevice.Model;
             label_serial.Text              = "Serial:  " + currentDevice.Serial;
             label_vAndroid.Text            = "Android:  " + currentDevice.AndroidVersion();
             label_battery.Text             = "Battery:  " + currentDevice.BatteryPercentage() + "%";
             label_state.Text               = "State: " + currentDevice.State.ToString();
             comboBox_devices.SelectedIndex = devices.IndexOf(currentDevice);
             panel_upLeftSide.AllowDrop     = true;
         }
     }
 }