Exemplo n.º 1
0
        public void Await(HouseDelegate method)
        {
            var frame = new DispatcherFrame();

            this.Post(() =>
            {
                method();
                frame.Continue = false;
            });

            Dispatcher.PushFrame(frame); // start the secondary dispatcher, pausing this code
        }
Exemplo n.º 2
0
 static public void Invoke(HouseDelegate method)
 {
     if (method != null)
     {
         if (method.Target is IHouseDispatcher)
         {
             (method.Target as IHouseDispatcher).Dispatcher.Post(method);
         }
         else
         {
             method.Method.Invoke(method.Target, null);
         }
     }
 }
 public override void Post(HouseDelegate method)
 {
     if (method != null)
     {
         if (fUI.CheckAccess())
         {
             method.Method.Invoke(method.Target, null);
         }
         else
         {
             fUI.BeginInvoke(method);
         }
     }
 }
Exemplo n.º 4
0
 public override void Post(HouseDelegate method)
 {
     if (method != null)
     {
         if (fUI.InvokeRequired)
         {
             fUI.BeginInvoke(method);
         }
         else
         {
             method.Method.Invoke(method.Target, null);
         }
     }
 }
Exemplo n.º 5
0
 static public void BeginAsync(HouseDelegate method)
 {
     System.Windows.Application.Current.Dispatcher.BeginInvoke(method);
 }
Exemplo n.º 6
0
 public abstract void Post(HouseDelegate method);
Exemplo n.º 7
0
 public override void Post(HouseDelegate method)
 {
     AddTask(new MethodTask(method, null));
 }