Exemple #1
0
        public static void Add(IQueueAction action)
        {
            _actionQueue.Enqueue(action);

            if (_actionQueue.Count == 1)
            {
                // first one added, schedule a layout!
#if XAMMAC1
                NSApplication.SharedApplication.BeginInvokeOnMainThread(new NSAction(FlushQueue));
#else
                NSApplication.SharedApplication.BeginInvokeOnMainThread(FlushQueue);
#endif
            }
        }
Exemple #2
0
 public static void Add(IQueueAction action, object key)
 {
     if (key != null)
     {
         if (_items.Contains(key))
         {
             return;
         }
         _items.Add(key);
     }
     Add(new SingleQueueAction {
         Inner = action, Key = key
     });
 }