OnAdded() static private method

static private OnAdded ( Task task ) : void
task Task
return void
コード例 #1
0
        static void OnVCTaskCompletedEvent(Task task, CompletionAction completionAction)
        {
            // inspector should re-calculate which VCS buttons it needs to show
            InspectorWindow.ClearVersionControlBarState();

            var wins = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[];

            foreach (WindowPending win in wins)
            {
                switch (completionAction)
                {
                case CompletionAction.UpdatePendingWindow:     // fallthrough
                case CompletionAction.OnCheckoutCompleted:
                    win.UpdateWindow();
                    break;

                case CompletionAction.OnChangeContentsPendingWindow:
                    win.OnChangeContents(task);
                    break;

                case CompletionAction.OnIncomingPendingWindow:
                    win.OnIncoming(task);
                    break;

                case CompletionAction.OnChangeSetsPendingWindow:
                    win.OnChangeSets(task);
                    break;

                case CompletionAction.OnGotLatestPendingWindow:
                    win.OnGotLatest(task);
                    break;
                }
            }

            switch (completionAction)
            {
            case CompletionAction.OnSubmittedChangeWindow:
                WindowChange.OnSubmitted(task);
                break;

            case CompletionAction.OnAddedChangeWindow:
                WindowChange.OnAdded(task);
                break;

            case CompletionAction.OnCheckoutCompleted:
                if (EditorUserSettings.showFailedCheckout)
                {
                    WindowCheckoutFailure.OpenIfCheckoutFailed(task.assetList);
                }
                break;
            }

            task.Dispose();
        }
コード例 #2
0
        private static void OnVCTaskCompletedEvent(Task task, CompletionAction completionAction)
        {
            WindowPending[] array  = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[];
            WindowPending[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                WindowPending windowPending = array2[i];
                switch (completionAction)
                {
                case CompletionAction.UpdatePendingWindow:
                case CompletionAction.OnCheckoutCompleted:
                    windowPending.UpdateWindow();
                    break;

                case CompletionAction.OnChangeContentsPendingWindow:
                    windowPending.OnChangeContents(task);
                    break;

                case CompletionAction.OnIncomingPendingWindow:
                    windowPending.OnIncoming(task);
                    break;

                case CompletionAction.OnChangeSetsPendingWindow:
                    windowPending.OnChangeSets(task);
                    break;

                case CompletionAction.OnGotLatestPendingWindow:
                    windowPending.OnGotLatest(task);
                    break;
                }
            }
            if (completionAction != CompletionAction.OnSubmittedChangeWindow)
            {
                if (completionAction != CompletionAction.OnAddedChangeWindow)
                {
                    if (completionAction == CompletionAction.OnCheckoutCompleted)
                    {
                        if (EditorUserSettings.showFailedCheckout)
                        {
                            WindowCheckoutFailure.OpenIfCheckoutFailed(task.assetList);
                        }
                    }
                }
                else
                {
                    WindowChange.OnAdded(task);
                }
            }
            else
            {
                WindowChange.OnSubmitted(task);
            }
            task.Dispose();
        }
コード例 #3
0
 private static void OnVCTaskCompletedEvent(Task task, CompletionAction completionAction)
 {
     WindowPending[] array  = Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[];
     WindowPending[] array2 = array;
     for (int i = 0; i < array2.Length; i++)
     {
         WindowPending windowPending = array2[i];
         if (completionAction == CompletionAction.UpdatePendingWindow)
         {
             windowPending.UpdateWindow();
         }
         else
         {
             if (completionAction == CompletionAction.OnChangeContentsPendingWindow)
             {
                 windowPending.OnChangeContents(task);
             }
             else
             {
                 if (completionAction == CompletionAction.OnIncomingPendingWindow)
                 {
                     windowPending.OnIncoming(task);
                 }
                 else
                 {
                     if (completionAction == CompletionAction.OnChangeSetsPendingWindow)
                     {
                         windowPending.OnChangeSets(task);
                     }
                     else
                     {
                         if (completionAction == CompletionAction.OnGotLatestPendingWindow)
                         {
                             windowPending.OnGotLatest(task);
                         }
                     }
                 }
             }
         }
     }
     if (completionAction == CompletionAction.OnSubmittedChangeWindow)
     {
         WindowChange.OnSubmitted(task);
     }
     else
     {
         if (completionAction == CompletionAction.OnAddedChangeWindow)
         {
             WindowChange.OnAdded(task);
         }
     }
     task.Dispose();
 }
コード例 #4
0
        private static void OnVCTaskCompletedEvent(Task task, CompletionAction completionAction)
        {
            foreach (WindowPending windowPending in Resources.FindObjectsOfTypeAll(typeof(WindowPending)) as WindowPending[])
            {
                switch (completionAction)
                {
                case CompletionAction.UpdatePendingWindow:
                case CompletionAction.OnCheckoutCompleted:
                    windowPending.UpdateWindow();
                    break;

                case CompletionAction.OnChangeContentsPendingWindow:
                    windowPending.OnChangeContents(task);
                    break;

                case CompletionAction.OnIncomingPendingWindow:
                    windowPending.OnIncoming(task);
                    break;

                case CompletionAction.OnChangeSetsPendingWindow:
                    windowPending.OnChangeSets(task);
                    break;

                case CompletionAction.OnGotLatestPendingWindow:
                    windowPending.OnGotLatest(task);
                    break;
                }
            }
            switch (completionAction)
            {
            case CompletionAction.OnSubmittedChangeWindow:
                WindowChange.OnSubmitted(task);
                break;

            case CompletionAction.OnAddedChangeWindow:
                WindowChange.OnAdded(task);
                break;

            case CompletionAction.OnCheckoutCompleted:
                if (EditorUserSettings.showFailedCheckout)
                {
                    WindowCheckoutFailure.OpenIfCheckoutFailed(task.assetList);
                    break;
                }
                break;
            }
            task.Dispose();
        }