public static Add ( |
||
asset | Single asset to add to version control system. | |
recursive | bool | Set this true if adding should be done recursively into subfolders. |
return |
void OnUnaddedFilesGUI() { AssetList toAdd = new AssetList(); string files = ""; foreach (Asset a in assetList) { if (!a.IsState(Asset.States.OutOfSync) && !a.IsState(Asset.States.Synced) && !a.IsState(Asset.States.AddedLocal)) { files += a.prettyPath + "\n"; toAdd.Add(a); } } GUILayout.Label("Files to add", EditorStyles.boldLabel); GUILayout.Label("Some additional files need to be added:"); GUI.enabled = false; GUILayout.TextArea(files); GUI.enabled = true; GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Add files")) { taskAdd = Provider.Add(toAdd, false); taskAdd.SetCompletionAction(CompletionAction.OnAddedChangeWindow); } if (GUILayout.Button("Abort")) { ResetAndClose(); } GUILayout.EndHorizontal(); }
private void OnUnaddedFilesGUI() { AssetList assetList = new AssetList(); string text = string.Empty; foreach (Asset current in this.assetList) { if (!current.IsState(Asset.States.OutOfSync) && !current.IsState(Asset.States.Synced) && !current.IsState(Asset.States.AddedLocal)) { text = text + current.prettyPath + "\n"; assetList.Add(current); } } GUILayout.Label("Files to add", EditorStyles.boldLabel, new GUILayoutOption[0]); GUILayout.Label("Some additional files need to be added:", new GUILayoutOption[0]); GUI.enabled = false; GUILayout.TextArea(text, new GUILayoutOption[0]); GUI.enabled = true; GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Add files", new GUILayoutOption[0])) { this.taskAdd = Provider.Add(assetList, false); this.taskAdd.SetCompletionAction(CompletionAction.OnAddedChangeWindow); } if (GUILayout.Button("Abort", new GUILayoutOption[0])) { this.taskSubmit = null; this.submitResultCode = 256; this.submitErrorMessage = null; base.Close(); } GUILayout.EndHorizontal(); }
private void OnUnaddedFilesGUI() { AssetList assets = new AssetList(); string text = string.Empty; using (List <Asset> .Enumerator enumerator = this.assetList.GetEnumerator()) { while (enumerator.MoveNext()) { Asset current = enumerator.Current; if (!current.IsState(Asset.States.OutOfSync) && !current.IsState(Asset.States.Synced) && !current.IsState(Asset.States.AddedLocal)) { text = text + current.prettyPath + "\n"; assets.Add(current); } } } GUILayout.Label("Files to add", EditorStyles.boldLabel, new GUILayoutOption[0]); GUILayout.Label("Some additional files need to be added:"); GUI.enabled = false; GUILayout.TextArea(text); GUI.enabled = true; GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("Add files")) { this.taskAdd = Provider.Add(assets, false); this.taskAdd.SetCompletionAction(CompletionAction.OnAddedChangeWindow); } if (GUILayout.Button("Abort")) { this.ResetAndClose(); } GUILayout.EndHorizontal(); }
private void OnUnaddedFilesGUI() { AssetList assets = new AssetList(); string text = ""; foreach (Asset asset in this.assetList) { if ((!asset.IsState(Asset.States.OutOfSync) && !asset.IsState(Asset.States.Synced)) && !asset.IsState(Asset.States.AddedLocal)) { text = text + asset.prettyPath + "\n"; assets.Add(asset); } } GUILayout.Label("Files to add", EditorStyles.boldLabel, new GUILayoutOption[0]); GUILayout.Label("Some additional files need to be added:", new GUILayoutOption[0]); GUI.enabled = false; GUILayout.TextArea(text, new GUILayoutOption[0]); GUI.enabled = true; GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.FlexibleSpace(); if (GUILayout.Button("Add files", new GUILayoutOption[0])) { this.taskAdd = Provider.Add(assets, false); this.taskAdd.SetCompletionAction(CompletionAction.OnAddedChangeWindow); } if (GUILayout.Button("Abort", new GUILayoutOption[0])) { this.ResetAndClose(); } GUILayout.EndHorizontal(); }