コード例 #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);
     }
 }
コード例 #2
0
ファイル: iDeviceClass.cs プロジェクト: chencen2000/test1
 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);
         }
     }
 }