Exemplo n.º 1
0
 private void Iph_Connect(object sender, ConnectEventArgs args)
 {
     if (iph.IsConnected)
     {
         label4.Text = "Connected to [" + iph.DeviceProductType + "] " + iph.DeviceName + " iOS " + iph.ProductVersion;
         setStatus("Fetching Device Information...");
         Dictionary<string, dynamic> battInfo = iph.RequestBatteryInfo();
         setStatus("Processing Information...");
         /*
         foreach (KeyValuePair<string, dynamic> kvp in battInfo)
         {
             MessageBox.Show(kvp.Key+" : "+kvp.Value.ToString());
         }
         */
         int cyclecount = (int)battInfo["CycleCount"];
         int designcapacity = (int)battInfo["DesignCapacity"];
         int currentcapacity = (int)battInfo["FullChargeCapacity"];
         bool gasgauge = battInfo["GasGaugeCapability"] == true;
         bool fullycharged = battInfo["FullyCharged"] == true;
         bool charging = battInfo["BatteryIsCharging"] == true;
         int currentCharge = (int)battInfo["BatteryCurrentCapacity"];
         label6.Text += cyclecount.ToString();
         label7.Text += designcapacity.ToString();
         label8.Text += currentcapacity.ToString();
         label9.Text += gasgauge.ToString();
         label10.Text += fullycharged.ToString();
         label11.Text += currentCharge.ToString();
         label12.Text += charging.ToString();
         setStatus("Idle.");
     }
 }
Exemplo n.º 2
0
 private static void Mdv_Connect(object sender, MK.MobileDevice.ConnectEventArgs args)
 {
     Console.WriteLine("libimobiledevice.dll Connected [MUX] to " + mdv.DeviceName);
     Console.WriteLine("IsWifiConnect: {0}", mdv.IsWifiConnect);
 }
Exemplo n.º 3
0
 protected void OnDisconnect(ConnectEventArgs args)
 {
     ConnectEventHandler disconnect = this.Disconnect;
     if (disconnect != null)
     {
         disconnect(this, args);
     }
 }
Exemplo n.º 4
0
 private void Iph_Disconnect(object sender, ConnectEventArgs args)
 {
     ResetData();
 }
Exemplo n.º 5
0
        protected void OnConnect(ConnectEventArgs args)
        {

            ConnectEventHandler connect = this.Connect;
            if (connect != null)
            {
                connect(this, args);
            }

        }