public IAsyncResult BeginInvoke(Delegate method, object[] args)
        {
            if (SynchronizeInvoke != null)
            {
                return(SynchronizeInvoke.BeginInvoke(method, args));
            }

            return(new AsyncResult());
        }
Esempio n. 2
0
 private void OnStateChanged(object sender, EventArgs e)
 {
     if (SynchronizeInvoke.InvokeRequired)
     {
         SynchronizeInvoke.BeginInvoke(new MethodInvoker(UpdateState), null);
     }
     else
     {
         UpdateState();
     }
 }
Esempio n. 3
0
 private void OnRemoteRemoved(object sender, RemoteEventArgs e)
 {
     if (SynchronizeInvoke.InvokeRequired)
     {
         try
         {
             SynchronizeInvoke.BeginInvoke(new Action <Remote>(OnRemoteRemoved), new object[] { e.Object });
         }
         catch (ObjectDisposedException)
         {
         }
     }
     else
     {
         OnRemoteRemoved(e.Object);
     }
 }
Esempio n. 4
0
 private void OnStatusChanged(object sender, EventArgs e)
 {
     if (SynchronizeInvoke.InvokeRequired)
     {
         try
         {
             SynchronizeInvoke.BeginInvoke(new MethodInvoker(UpdateStatus), null);
         }
         catch (ObjectDisposedException)
         {
         }
     }
     else
     {
         UpdateStatus();
     }
 }
Esempio n. 5
0
 private void OnHeadChanged(object sender, RevisionPointerChangedEventArgs e)
 {
     if (SynchronizeInvoke.InvokeRequired)
     {
         try
         {
             SynchronizeInvoke.BeginInvoke(new MethodInvoker(UpdateCurrentBranchLabel), null);
         }
         catch (ObjectDisposedException)
         {
         }
     }
     else
     {
         UpdateCurrentBranchLabel();
     }
 }
Esempio n. 6
0
 private void OnBranchRenamed(object sender, BranchRenamedEventArgs e)
 {
     if (e.Object.IsCurrent)
     {
         if (SynchronizeInvoke.InvokeRequired)
         {
             try
             {
                 SynchronizeInvoke.BeginInvoke(new MethodInvoker(UpdateCurrentBranchLabel), null);
             }
             catch (ObjectDisposedException)
             {
             }
         }
         else
         {
             UpdateCurrentBranchLabel();
         }
     }
 }