private void OnEnable()
 {
   this.titleContent = this.GetLocalizedTitleContent();
   if (this.pendingList == null)
     this.pendingList = new ListControl();
   this.pendingList.ExpandEvent += new ListControl.ExpandDelegate(this.OnExpand);
   this.pendingList.DragEvent += new ListControl.DragDelegate(this.OnDrop);
   this.pendingList.MenuDefault = "CONTEXT/Pending";
   this.pendingList.MenuFolder = "CONTEXT/Change";
   this.pendingList.DragAcceptOnly = true;
   if (this.incomingList == null)
     this.incomingList = new ListControl();
   this.incomingList.ExpandEvent += new ListControl.ExpandDelegate(this.OnExpandIncoming);
   this.UpdateWindow();
 }
Esempio n. 2
0
		private void OnEnable()
		{
			base.title = "UnityEditor.VersionControl";
			if (this.pendingList == null)
			{
				this.pendingList = new ListControl();
			}
			ListControl expr_27 = this.pendingList;
			expr_27.ExpandEvent = (ListControl.ExpandDelegate)Delegate.Combine(expr_27.ExpandEvent, new ListControl.ExpandDelegate(this.OnExpand));
			ListControl expr_4E = this.pendingList;
			expr_4E.DragEvent = (ListControl.DragDelegate)Delegate.Combine(expr_4E.DragEvent, new ListControl.DragDelegate(this.OnDrop));
			this.pendingList.MenuDefault = "CONTEXT/Pending";
			this.pendingList.MenuFolder = "CONTEXT/Change";
			this.pendingList.DragAcceptOnly = true;
			if (this.incomingList == null)
			{
				this.incomingList = new ListControl();
			}
			ListControl expr_B7 = this.incomingList;
			expr_B7.ExpandEvent = (ListControl.ExpandDelegate)Delegate.Combine(expr_B7.ExpandEvent, new ListControl.ExpandDelegate(this.OnExpandIncoming));
			this.UpdateWindow();
		}
Esempio n. 3
0
 private static bool DiffHeadWithMetaTest(int userData)
 {
     return(Provider.DiffIsValid(ListControl.FromID(userData).SelectedAssets));
 }
Esempio n. 4
0
 private static void DiffHeadWithMeta(int userData)
 {
     Provider.DiffHead(ListControl.FromID(userData).SelectedAssets, true);
 }
Esempio n. 5
0
 private static void RevertUnchanged(int userData)
 {
     Provider.RevertChangeSets(ListControl.FromID(userData).SelectedChangeSets, RevertMode.Unchanged).SetCompletionAction(CompletionAction.UpdatePendingWindow);
     Provider.InvalidateCache();
 }
Esempio n. 6
0
 private static void DiffHead(int userData)
 {
     Provider.DiffHead(ListControl.FromID(userData).SelectedAssets, false);
 }
 private static bool LockTest(int userData)
 {
     return(Provider.LockIsValid(ListControl.FromID(userData).SelectedAssets));
 }
Esempio n. 8
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();
		}
 private static bool SubmitTest(int userData)
 {
     return(Provider.SubmitIsValid((ChangeSet)null, ListControl.FromID(userData).SelectedAssets));
 }
 private static bool RevertUnchangedTest(int userData)
 {
     return(Provider.RevertIsValid(ListControl.FromID(userData).SelectedAssets, RevertMode.Normal));
 }
 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();
 }
Esempio n. 12
0
 private static bool ShowInExplorerTest(int userData)
 {
     return(ListControl.FromID(userData).SelectedAssets.Count > 0);
 }
 private static bool ResolveTest(int userData)
 {
     return(ListControl.FromID(userData).SelectedChangeSets.Count > 0);
 }
        private static bool RevertUnchangedTest(int userData)
        {
            ChangeSets selectedChangeSets = ListControl.FromID(userData).SelectedChangeSets;

            return(selectedChangeSets.Count > 0);
        }
        private static bool SubmitTest(int userData)
        {
            ChangeSets selectedChangeSets = ListControl.FromID(userData).SelectedChangeSets;

            return(selectedChangeSets.Count > 0 && Provider.SubmitIsValid(selectedChangeSets[0], null));
        }
        private static void DeleteChangeSet(int userData)
        {
            ChangeSets selectedChangeSets = ListControl.FromID(userData).SelectedChangeSets;

            Provider.DeleteChangeSets(selectedChangeSets).SetCompletionAction(CompletionAction.UpdatePendingWindow);
        }
Esempio n. 17
0
 private static bool RevertUnchangedTest(int userData) =>
 (ListControl.FromID(userData).SelectedChangeSets.Count > 0);
 private static void NewChangeSet(int userData)
 {
     WindowChange.Open(ListControl.FromID(userData).SelectedAssets, false);
 }
Esempio n. 19
0
 //[MenuItem ("CONTEXT/Pending/Revert...", false, 200)]
 static void Revert(int userData)
 {
     WindowRevert.Open(ListControl.FromID(userData).SelectedAssets);
 }
 private static void Submit(int userData)
 {
     WindowChange.Open(ListControl.FromID(userData).SelectedAssets, true);
 }
Esempio n. 21
0
 //[MenuItem("CONTEXT/Pending/Resolve Conflicts...", true, 202)]
 static bool ResolveTest(int userData)
 {
     return(Provider.ResolveIsValid(ListControl.FromID(userData).SelectedAssets));
 }
 private static void Resolve(int userData)
 {
     WindowResolve.Open(ListControl.FromID(userData).SelectedAssets);
 }
Esempio n. 23
0
        //[MenuItem ("CONTEXT/Pending/Lock", false, 300)]
        static void Lock(int userData)
        {
            AssetList list = ListControl.FromID(userData).SelectedAssets;

            Provider.Lock(list, true).SetCompletionAction(CompletionAction.UpdatePendingWindow);
        }
 private static void Lock(int userData)
 {
     Provider.Lock(ListControl.FromID(userData).SelectedAssets, true).SetCompletionAction(CompletionAction.UpdatePendingWindow);
 }
Esempio n. 25
0
        private static void RevertUnchanged(int userData)
        {
            AssetList selectedAssets = ListControl.FromID(userData).SelectedAssets;

            Provider.Revert(selectedAssets, RevertMode.Unchanged).SetCompletionAction(CompletionAction.UpdatePendingWindow);
        }
Esempio n. 26
0
        private static void Unlock(int userData)
        {
            AssetList selectedAssets = ListControl.FromID(userData).SelectedAssets;

            Provider.Lock(selectedAssets, false).SetCompletionAction(CompletionAction.UpdatePendingWindow);
        }
Esempio n. 27
0
        //[MenuItem ("CONTEXT/Change/Revert...", true)]
        static bool RevertTest(int userData)
        {
            ChangeSets list = ListControl.FromID(userData).SelectedChangeSets;

            return(list.Count > 0);
        }