Ejemplo n.º 1
0
 public override IDesktopPreferencesView CreatePreferencesView()
 {
     IDesktopPreferencesView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreatePreferencesView();
         });
     }
     return view;
 }
Ejemplo n.º 2
0
 public override ICloudConnectView CreateCloudConnectView()
 {
     ICloudConnectView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateCloudConnectView();
         });
     }
     return view;
 }
Ejemplo n.º 3
0
 public override IStartResumePlaybackView CreateStartResumePlaybackView()
 {
     IStartResumePlaybackView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateStartResumePlaybackView();
         });
     }
     return view;
 }
Ejemplo n.º 4
0
 public override IEditSongMetadataView CreateEditSongMetadataView(AudioFile audioFile)
 {
     IEditSongMetadataView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateEditSongMetadataView(audioFile);
         });
     }
     return view;
 }
Ejemplo n.º 5
0
 public override ISyncWebBrowserView CreateSyncWebBrowserView()
 {
     ISyncWebBrowserView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateSyncWebBrowserView();
         });
     }
     return view;
 }
Ejemplo n.º 6
0
 public override ISyncDownloadView CreateSyncDownloadView(SyncDevice device, IEnumerable<AudioFile> audioFiles)
 {
     ISyncDownloadView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateSyncDownloadView(device, audioFiles);
         });
     }
     return view;
 }
Ejemplo n.º 7
0
 public override ISyncMenuView CreateSyncMenuView(SyncDevice device)
 {
     ISyncMenuView view = null;
     using (var pool = new NSAutoreleasePool())
     {
         pool.InvokeOnMainThread(delegate {
             view = base.CreateSyncMenuView(device);
         });
     }
     return view;
 }
Ejemplo n.º 8
0
        public override ISyncView CreateSyncView()
        {
            ISyncView view = null;
            using (var pool = new NSAutoreleasePool())
            {
                pool.InvokeOnMainThread(delegate {
                    view = base.CreateSyncView();
                });
            }
            return view;

//            if (_syncView == null)
//            {
//                using (var pool = new NSAutoreleasePool())
//                {
//                    pool.InvokeOnMainThread(delegate
//                    {
//                        _syncView = base.CreateSyncView();
//                    });
//                }
//            } 
//            else
//            {
//                _syncView.ShowView(true);
//            }
//            return _syncView;
        }
Ejemplo n.º 9
0
        protected virtual void OnUsageUpdated()
        {
            // Usage info comes from an async request, it could be on any thread
            // So we need to make sure we have a release pool for ObjC code in the thread
            // We also need to ensure we get back on the UI thread to prevent potential cross-thread issues
            using (var pool = new NSAutoreleasePool())
            {
                pool.InvokeOnMainThread(() =>
                {
                    UsageInformation usage;
                    lock (_lockObject)
                        usage = _currentUsage;

                    if (UsageUpdated != null)
                        UsageUpdated(this, new UsageUpdatedEventArgs(usage));
                });
            }
        }