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(); }
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(); }
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(); }