Add() 공개 메소드

public Add ( UnityEditorInternal.VersionControl.ListItem parent, string name, Asset asset ) : UnityEditorInternal.VersionControl.ListItem
parent UnityEditorInternal.VersionControl.ListItem
name string
asset UnityEditor.VersionControl.Asset
리턴 UnityEditorInternal.VersionControl.ListItem
예제 #1
0
		private void PopulateListControl(ListControl list, Task task, Texture2D icon)
		{
			ChangeSets changeSets = task.changeSets;
			ListItem listItem = list.Root.FirstChild;
			while (listItem != null)
			{
				ChangeSet cs = listItem.Item as ChangeSet;
				if (changeSets.Find((ChangeSet elm) => elm.id == cs.id) == null)
				{
					ListItem listItem2 = listItem;
					listItem = listItem.Next;
					list.Root.Remove(listItem2);
				}
				else
				{
					listItem = listItem.Next;
				}
			}
			foreach (ChangeSet current in changeSets)
			{
				ListItem listItem3 = list.GetChangeSetItem(current);
				if (listItem3 != null)
				{
					listItem3.Item = current;
				}
				else
				{
					listItem3 = list.Add(null, current.description, current);
				}
				listItem3.Exclusive = true;
				listItem3.CanAccept = true;
				listItem3.Icon = icon;
			}
			list.Refresh();
			base.Repaint();
		}
예제 #2
0
 private void PopulateListControl(ListControl list, Task task, Texture2D icon)
 {
   ChangeSets changeSets = task.changeSets;
   ListItem listItem1 = list.Root.FirstChild;
   while (listItem1 != null)
   {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: reference to a compiler-generated method
     if (changeSets.Find(new Predicate<ChangeSet>(new WindowPending.\u003CPopulateListControl\u003Ec__AnonStoreyC1() { cs = listItem1.Item as ChangeSet }.\u003C\u003Em__230)) == null)
     {
       ListItem listItem2 = listItem1;
       listItem1 = listItem1.Next;
       list.Root.Remove(listItem2);
     }
     else
       listItem1 = listItem1.Next;
   }
   using (List<ChangeSet>.Enumerator enumerator = changeSets.GetEnumerator())
   {
     while (enumerator.MoveNext())
     {
       ChangeSet current = enumerator.Current;
       ListItem listItem2 = list.GetChangeSetItem(current);
       if (listItem2 != null)
       {
         listItem2.Item = (object) current;
         listItem2.Name = current.description;
       }
       else
         listItem2 = list.Add((ListItem) null, current.description, current);
       listItem2.Exclusive = true;
       listItem2.CanAccept = true;
       listItem2.Icon = (Texture) icon;
     }
   }
   list.Refresh();
   this.Repaint();
 }