public static Task ChangeSetMove(AssetList assets, string changesetID) { ChangeSet target = new ChangeSet("", changesetID); return(Provider.Internal_ChangeSetMove(assets.ToArray(), target)); }
static public Task ChangeSetMove(AssetList assets, ChangeSet changeset) { return(Internal_ChangeSetMove(assets.ToArray(), changeset)); }
static public bool CheckoutIsValid(AssetList assets) { return(CheckoutIsValid(assets, CheckoutMode.Exact)); }
static public Task Revert(AssetList assets, RevertMode mode) { return(Internal_Revert(assets.ToArray(), mode)); }
static public Task GetLatest(AssetList assets) { return(Internal_GetLatest(assets.ToArray())); }
static public bool UnlockIsValid(AssetList assets) { return(Internal_UnlockIsValid(assets.ToArray())); }
static public Task Status(AssetList assets, bool recursively) { return(Internal_Status(assets.ToArray(), recursively)); }
static public Task Checkout(AssetList assets, CheckoutMode mode) { return(Checkout(assets, mode, null)); }
static public Task Checkout(AssetList assets, CheckoutMode mode, ChangeSet changeset) { return(CheckCallbackAndCheckout(assets, mode, changeset)); }
private void OnSubmitGUI() { if (this.submitResultCode != 0x100) { GUI.enabled = false; } Event current = Event.current; if (current.isKey && (current.keyCode == KeyCode.Escape)) { base.Close(); } GUILayout.Label("Description", EditorStyles.boldLabel, new GUILayoutOption[0]); if ((this.taskStatus != null) && (this.taskStatus.resultCode != 0)) { Asset.States[] states = new Asset.States[] { Asset.States.CheckedOutLocal, Asset.States.DeletedLocal, Asset.States.AddedLocal }; this.assetList = this.taskStatus.assetList.Filter(true, states); this.RefreshList(); this.taskStatus = null; } else if ((this.taskDesc != null) && (this.taskDesc.resultCode != 0)) { this.description = (this.taskDesc.text.Length <= 0) ? string.Empty : this.taskDesc.text; if (this.description.Trim() == "<enter description here>") { this.description = string.Empty; } this.taskDesc = null; } else if ((this.taskStat != null) && (this.taskStat.resultCode != 0)) { this.assetList = this.taskStat.assetList; this.RefreshList(); this.taskStat = null; } Task task = ((this.taskStatus == null) || (this.taskStatus.resultCode != 0)) ? (((this.taskDesc == null) || (this.taskDesc.resultCode != 0)) ? (((this.taskStat == null) || (this.taskStat.resultCode != 0)) ? this.taskSubmit : this.taskStat) : this.taskDesc) : this.taskStatus; GUI.enabled = ((this.taskDesc == null) || (this.taskDesc.resultCode != 0)) && (this.submitResultCode == 0x100); GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Height(150f) }; this.description = EditorGUILayout.TextArea(this.description, options).Trim(); if (this.m_TextAreaControlID == 0) { this.m_TextAreaControlID = EditorGUIUtility.s_LastControlID; } if (this.m_TextAreaControlID != 0) { GUIUtility.keyboardControl = this.m_TextAreaControlID; EditorGUIUtility.editingTextField = true; } GUI.enabled = true; GUILayout.Label("Files", EditorStyles.boldLabel, new GUILayoutOption[0]); GUILayout.FlexibleSpace(); Rect screenRect = new Rect(6f, 206f, base.position.width - 12f, base.position.height - 248f); GUILayout.BeginArea(screenRect); GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }; GUILayout.Box(string.Empty, optionArray2); GUILayout.EndArea(); this.submitList.OnGUI(new Rect(screenRect.x + 2f, screenRect.y + 2f, screenRect.width - 4f, screenRect.height - 4f), true); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(new GUILayoutOption[0]); if (this.submitResultCode == 0x100) { if (task != null) { GUIContent content = GUIContent.Temp("Getting info"); content.image = WindowPending.StatusWheel.image; GUILayout.Label(content, new GUILayoutOption[0]); content.image = null; } GUILayout.FlexibleSpace(); if (GUILayout.Button("Cancel", new GUILayoutOption[0])) { this.ResetAndClose(); } GUI.enabled = (task == null) && !string.IsNullOrEmpty(this.description); bool flag3 = (current.isKey && current.shift) && (current.keyCode == KeyCode.Return); bool flag4 = flag3 && !this.allowSubmit; if (Provider.hasChangelistSupport && (GUILayout.Button("Save", new GUILayoutOption[0]) || flag4)) { this.Save(false); } if (this.allowSubmit) { bool enabled = GUI.enabled; GUI.enabled = ((this.assetList != null) && (this.assetList.Count > 0)) && !string.IsNullOrEmpty(this.description); if (GUILayout.Button("Submit", new GUILayoutOption[0]) || flag3) { this.Save(true); } GUI.enabled = enabled; } } else { bool flag6 = (this.submitResultCode & 1) != 0; GUI.enabled = flag6; string text = string.Empty; if (flag6) { text = "Finished successfully"; } else if (task != null) { GUILayout.Label(WindowPending.StatusWheel, new GUILayoutOption[0]); text = task.progressMessage; if (text.Length == 0) { text = "Running..."; } } GUILayout.Label(text, new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Close", new GUILayoutOption[0])) { this.ResetAndClose(); } } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Space(12f); if (task != null) { base.Repaint(); } }
public static void Open(AssetList list, bool submit) { Open(null, list, submit); }
private void DoOpen(AssetList revert) { this.assetList = revert; this.RefreshList(); }
public AssetList(AssetList src) { }
void OnSubmitGUI() { bool isSubmitting = submitResultCode != kSubmitNotStartedResultCode; if (isSubmitting) { GUI.enabled = false; } Event evt = Event.current; if (evt.isKey && evt.keyCode == KeyCode.Escape) { Close(); } GUILayout.Label("Description", EditorStyles.boldLabel); if (taskStatus != null && taskStatus.resultCode != 0) { const bool includeFolders = true; assetList = taskStatus.assetList.Filter(includeFolders, Asset.States.CheckedOutLocal, Asset.States.DeletedLocal, Asset.States.AddedLocal /*, * Asset.States.Branch, * Asset.States.Integrate*/); RefreshList(); taskStatus = null; } else if (taskDesc != null && taskDesc.resultCode != 0) { description = taskDesc.text.Length > 0 ? taskDesc.text : c_defaultDescription; if (description.Trim() == "<enter description here>") { description = string.Empty; } taskDesc = null; } else if (taskStat != null && taskStat.resultCode != 0) { assetList = taskStat.assetList; RefreshList(); taskStat = null; } Task progressTask = taskStatus != null && taskStatus.resultCode == 0 ? taskStatus : taskDesc != null && taskDesc.resultCode == 0 ? taskDesc : taskStat != null && taskStat.resultCode == 0 ? taskStat : taskSubmit; GUI.enabled = (taskDesc == null || taskDesc.resultCode != 0) && submitResultCode == kSubmitNotStartedResultCode; { description = EditorGUILayout.TextArea(description, GUILayout.Height(150)).Trim(); if (m_TextAreaControlID == 0) { m_TextAreaControlID = EditorGUIUtility.s_LastControlID; } if (m_TextAreaControlID != 0) { EditorGUIUtility.keyboardControl = m_TextAreaControlID; EditorGUIUtility.editingTextField = true; } } GUI.enabled = true; GUILayout.Label("Files", EditorStyles.boldLabel); GUILayout.FlexibleSpace(); // I would use GUIUtility.GetLastRect() here after the box but that seems to have wierd side effects. Rect r1 = new Rect(6, 206, position.width - 12, position.height - 248); GUILayout.BeginArea(r1); GUILayout.Box("", GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); GUILayout.EndArea(); submitList.OnGUI(new Rect(r1.x + 2, r1.y + 2, r1.width - 4, r1.height - 4), true); GUILayout.FlexibleSpace(); GUILayout.BeginHorizontal(); if (submitResultCode == kSubmitNotStartedResultCode) { if (progressTask != null) { // It is possible to have a progressTask for getting description text. GUIContent c = GUIContent.Temp("Getting info"); c.image = WindowPending.StatusWheel.image; GUILayout.Label(c); c.image = null; } GUILayout.FlexibleSpace(); if (GUILayout.Button("Cancel")) { ResetAndClose(); } GUI.enabled = progressTask == null && !string.IsNullOrEmpty(description); bool keyboardShortcutActivated = evt.isKey && evt.shift && evt.keyCode == KeyCode.Return; bool saveByShortcut = keyboardShortcutActivated && !allowSubmit; if (Provider.hasChangelistSupport && (GUILayout.Button("Save") || saveByShortcut)) { Save(false); } if (allowSubmit) { bool origEnabled = GUI.enabled; GUI.enabled = assetList != null && assetList.Count > 0 && !string.IsNullOrEmpty(description); if (GUILayout.Button("Submit") || keyboardShortcutActivated) { Save(true); } GUI.enabled = origEnabled; } } else { // submit finished successfully or running bool finished = (submitResultCode & (int)SubmitResult.OK) != 0; GUI.enabled = finished; string msg = ""; if (finished) { msg = "Finished successfully"; } else if (progressTask != null) { GUILayout.Label(WindowPending.StatusWheel); msg = progressTask.progressMessage; if (msg.Length == 0) { msg = "Running..."; } } GUILayout.Label(msg); GUILayout.FlexibleSpace(); if (GUILayout.Button("Close")) { ResetAndClose(); } } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Space(12); if (progressTask != null) { Repaint(); } }
static public Task Resolve(AssetList assets, ResolveMethod resolveMethod) { return(Internal_Resolve(assets.ToArray(), resolveMethod)); }
static public Task Delete(AssetList assets) { return(Internal_Delete(assets.ToArray())); }
static public Task Merge(AssetList assets, MergeMethod method) { return(Internal_Merge(assets.ToArray(), method)); }
static public Task Add(AssetList assets, bool recursive) { return(Internal_Add(assets.ToArray(), recursive)); }
static public Task Lock(AssetList assets, bool locked) { return(Internal_Lock(assets.ToArray(), locked)); }
static public bool SubmitIsValid(ChangeSet changeset, AssetList assets) { return(Internal_SubmitIsValid(changeset, assets != null ? assets.ToArray() : null)); }
static public bool RevertIsValid(AssetList assets, RevertMode mode) { return(Internal_RevertIsValid(assets.ToArray(), mode)); }
static public Task Status(AssetList assets) { return(Internal_Status(assets.ToArray(), true)); }
static public bool GetLatestIsValid(AssetList assets) { return(Internal_GetLatestIsValid(assets.ToArray())); }
static public bool DiffIsValid(AssetList assets) { return(Internal_DiffIsValid(assets.ToArray())); }
static internal Task SetFileMode(AssetList assets, FileMode mode) { return(Internal_SetFileMode(assets.ToArray(), mode)); }
static public Task DiffHead(AssetList assets, bool includingMetaFiles) { return(Internal_DiffHead(assets.ToArray(), includingMetaFiles)); }
static public Task ChangeSetMove(AssetList assets, string changesetID) { ChangeSet cl = new ChangeSet("", changesetID); return(Internal_ChangeSetMove(assets.ToArray(), cl)); }
static public bool ResolveIsValid(AssetList assets) { return(Internal_ResolveIsValid(assets.ToArray())); }
static public bool CheckoutIsValid(AssetList assets, CheckoutMode mode) { return(Internal_CheckoutIsValid(assets.ToArray(), mode)); }
internal static Task SetFileMode(AssetList assets, FileMode mode) { return(Provider.Internal_SetFileMode(assets.ToArray(), mode)); }