Example #1
0
        public bool DoGUI(ASUpdateWindow parentWin)
        {
            if (this.constants == null)
            {
                this.constants = new ASUpdateConflictResolveWindow.Constants();
            }
            bool enabled = GUI.enabled;

            EditorGUIUtility.SetIconSize(this.iconSize);
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            if (this.showDownloadConflicts)
            {
                this.DoDownloadConflictsGUI();
            }
            if (this.showNamingConflicts)
            {
                this.DoNamingConflictsGUI();
            }
            GUILayout.EndVertical();
            EditorGUIUtility.SetIconSize(Vector2.zero);
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUI.enabled = (this.lv1HasSelection && enabled);
            if (GUILayout.Button("Compare", this.constants.button, new GUILayoutOption[0]))
            {
                if (!this.DoShowDiff(false))
                {
                    Debug.Log("No differences found");
                }
                GUIUtility.ExitGUI();
            }
            GUI.enabled = enabled;
            GUILayout.FlexibleSpace();
            GUI.enabled = (parentWin.CanContinue && enabled);
            if (GUILayout.Button("Continue", this.constants.bigButton, new GUILayoutOption[]
            {
                GUILayout.MinWidth(100f)
            }))
            {
                parentWin.DoUpdate(true);
                return(false);
            }
            GUI.enabled = enabled;
            if (GUILayout.Button("Cancel", this.constants.bigButton, new GUILayoutOption[]
            {
                GUILayout.MinWidth(100f)
            }))
            {
                return(false);
            }
            GUILayout.EndHorizontal();
            if (!this.splittersOk && Event.current.type == EventType.Repaint)
            {
                this.splittersOk = true;
                parentWin.Repaint();
            }
            return(true);
        }
Example #2
0
 public void OnSelectionChange(ASUpdateWindow parentWin)
 {
     if (!this.mySelection)
     {
         this.DoSelectionChange();
         parentWin.Repaint();
     }
     else
     {
         this.mySelection = false;
     }
 }
 public void InitUpdatePage(bool lastActionsResult)
 {
   if (!lastActionsResult)
   {
     this.Reinit();
   }
   else
   {
     if (this.UpdateNeedsRefresh())
       this.GetUpdates();
     if (this.sharedChangesets == null)
     {
       this.Reinit();
     }
     else
     {
       this.asUpdateWin = new ASUpdateWindow(this, this.sharedChangesets);
       this.asUpdateWin.SetSelectedRevisionLine(0);
     }
   }
 }
 public void RevertProject(int toRevision, Changeset[] changesets)
 {
   AssetServer.SetStickyChangeset(toRevision);
   this.asUpdateWin = new ASUpdateWindow(this, changesets);
   this.asUpdateWin.SetSelectedRevisionLine(0);
   this.asUpdateWin.DoUpdate(false);
   this.selectedPage = ASMainWindow.Page.Update;
 }
 public bool DoGUI(ASUpdateWindow parentWin)
 {
   if (this.constants == null)
     this.constants = new ASUpdateConflictResolveWindow.Constants();
   bool enabled = GUI.enabled;
   EditorGUIUtility.SetIconSize(this.iconSize);
   GUILayout.BeginVertical();
   if (this.showDownloadConflicts)
     this.DoDownloadConflictsGUI();
   if (this.showNamingConflicts)
     this.DoNamingConflictsGUI();
   GUILayout.EndVertical();
   EditorGUIUtility.SetIconSize(Vector2.zero);
   GUILayout.BeginHorizontal();
   GUI.enabled = this.lv1HasSelection && enabled;
   if (GUILayout.Button("Compare", this.constants.button, new GUILayoutOption[0]))
   {
     if (!this.DoShowDiff(false))
       Debug.Log((object) "No differences found");
     GUIUtility.ExitGUI();
   }
   GUI.enabled = enabled;
   GUILayout.FlexibleSpace();
   GUI.enabled = parentWin.CanContinue && enabled;
   if (GUILayout.Button("Continue", this.constants.bigButton, new GUILayoutOption[1]
   {
     GUILayout.MinWidth(100f)
   }))
   {
     parentWin.DoUpdate(true);
     return false;
   }
   GUI.enabled = enabled;
   if (GUILayout.Button("Cancel", this.constants.bigButton, new GUILayoutOption[1]
   {
     GUILayout.MinWidth(100f)
   }))
     return false;
   GUILayout.EndHorizontal();
   if (!this.splittersOk && Event.current.type == EventType.Repaint)
   {
     this.splittersOk = true;
     parentWin.Repaint();
   }
   return true;
 }
 public void OnSelectionChange(ASUpdateWindow parentWin)
 {
   if (!this.mySelection)
   {
     this.DoSelectionChange();
     parentWin.Repaint();
   }
   else
     this.mySelection = false;
 }