public IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state, bool waitForOnline)
            {
                bool          completedSynchronously = false;
                OpenOperation op = null;

                lock (ThisLock)
                {
                    openCount++;
                    if (openCount > 1 && currentState == State.Opened)
                    {
                        completedSynchronously = true;
                    }
                    else
                    {
                        op = new OpenOperation(this, peerNode, timeout, callback, state, waitForOnline);
                        queue.Enqueue(op);
                        RunQueue();
                    }
                }
                if (completedSynchronously)
                {
                    return(new CompletedAsyncResult(callback, state));
                }

                return(op);
            }
Ejemplo n.º 2
0
        void IOpenMenuOperations.OpenWithCustom(string exePath, string args)
        {
            List <string> selectedPaths = PendingChangesSelection.
                                          GetSelectedPathsWithoutMeta(mPendingChangesTreeView);

            OpenOperation.OpenWith(exePath, selectedPaths);
        }
Ejemplo n.º 3
0
 private void Select_ZDirSeismic_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openWindow = OpenOperation.SetOpenDialogParameters("Open", ".*", "All Files (*.*)|*.*");
     openWindow.FileOk += delegate(object s, System.ComponentModel.CancelEventArgs args) { OpenOperation.OpenSeismic_FileOk(s, args, ref stringZFile); };
     openWindow.ShowDialog();
     txt_ZDir_FileName.Text = openWindow.FileName;
 }
Ejemplo n.º 4
0
        void IOpenMenuOperations.OpenWith()
        {
            List <string> selectedPaths = PendingChangesSelection.
                                          GetSelectedPathsWithoutMeta(mPendingChangesTreeView);

            OpenOperation.OpenWith(
                FileSystemOperation.GetExePath(),
                selectedPaths);
        }
Ejemplo n.º 5
0
        void PendingChangesViewMenu.IMetaMenuOperations.OpenMetaWith()
        {
            List <string> selectedPaths = PendingChangesSelection
                                          .GetSelectedMetaPaths(mPendingChangesTreeView);

            OpenOperation.OpenWith(
                FileSystemOperation.GetExePath(),
                selectedPaths);
        }
 public static void EndOpen(IAsyncResult result)
 {
     // result can be either an OpenOperation or a CompletedAsyncResult
     if (result is CompletedAsyncResult)
     {
         CompletedAsyncResult.End(result);
     }
     else
     {
         OpenOperation.End(result);
     }
 }
Ejemplo n.º 7
0
        static void OpenFile(string path)
        {
            if (path == null)
                return;

            string relativePath = GetRelativePath.ToApplication(path);

            bool result = AssetDatabase.OpenAsset(
                AssetDatabase.LoadMainAssetAtPath(relativePath));

            if (result)
                return;

            OpenOperation.OpenFile(path);
        }
 public IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state, bool waitForOnline)
 {
     bool flag = false;
     OpenOperation item = null;
     lock (this.ThisLock)
     {
         this.openCount++;
         if ((this.openCount > 1) && (this.currentState == State.Opened))
         {
             flag = true;
         }
         else
         {
             item = new OpenOperation(this, this.peerNode, timeout, callback, state, waitForOnline);
             this.queue.Enqueue(item);
             this.RunQueue();
         }
     }
     if (flag)
     {
         return new CompletedAsyncResult(callback, state);
     }
     return item;
 }
            public IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state, bool waitForOnline)
            {
                bool completedSynchronously = false;
                OpenOperation op = null;
                lock (ThisLock)
                {
                    openCount++;
                    if (openCount > 1 && currentState == State.Opened)
                    {
                        completedSynchronously = true;
                    }
                    else
                    {
                        op = new OpenOperation(this, peerNode, timeout, callback, state, waitForOnline);
                        queue.Enqueue(op);
                        RunQueue();
                    }
                }
                if (completedSynchronously)
                {
                    return new CompletedAsyncResult(callback, state);
                }

                return op;
            }
Ejemplo n.º 10
0
 public void Open(Board Board, int Number, OpenOperation Operation, bool NewTab, bool Relative, bool BackGround)
 {
     base.InvokeMethod("Open", Board.ComObject, Number, (int)Operation, NewTab, Relative, BackGround);
 }
Ejemplo n.º 11
0
 public void Open(string URL, int Number, OpenOperation Operation, bool NewTab, bool Relative, bool BackGround)
 {
     base.InvokeMethod("Open", URL, Number, (int)Operation, NewTab, Relative, BackGround);
 }