Exemple #1
0
 static unsafe void NotifyCallback(ref CFManzana.AMDeviceNotificationCallbackInfo callback)
 {
     Program.logIt("Device NotificationCall Type:" + callback.msg.ToString());
     if (callback.msg == CFManzana.NotificationMessage.Connected)
     {
         addDevices(new IntPtr(callback.dev));
     }
     else if (callback.msg == CFManzana.NotificationMessage.Disconnected)
     {
         string udid = getDeviceUdid(new IntPtr(callback.dev));
         Program.logIt("iDeviceRemove=" + udid);
     }
 }
Exemple #2
0
 static unsafe void NotifyCallback(ref CFManzana.AMDeviceNotificationCallbackInfo callback)
 {
     Program.logIt("Device NotificationCall Type:" + callback.msg.ToString());  
     if (callback.msg == CFManzana.NotificationMessage.Connected)
     {
          addDevices(new IntPtr(callback.dev));
     }
     else if (callback.msg == CFManzana.NotificationMessage.Disconnected)
     {
         string udid = getDeviceUdid(new IntPtr(callback.dev));
         if (Util.ListDeviceInfo.ContainsKey(udid))
         {
             Program.logIt(string.Format("Remove iOS device by udid: {0}", udid));
             ConcurrentDictionary<string, string> value;
             Util.ListDeviceInfo.TryRemove(udid, out value);
         }
     }
 }