public bool DoGUI()
{
bool enabled = GUI.enabled;
if (this.constants == null)
{
this.constants = new Constants();
this.maxNickLength = 1;
for (int i = 0; i < this.changesets.Length; i++)
{
int x = (int) this.constants.serverUpdateInfo.CalcSize(new GUIContent(this.changesets[i].owner)).x;
if (x > this.maxNickLength)
{
this.maxNickLength = x;
}
}
}
EditorGUIUtility.SetIconSize(this.iconSize);
if (this.showingConflicts)
{
if (!this.asResolveWin.DoGUI(this))
{
this.showingConflicts = false;
}
}
else
{
this.UpdateGUI();
}
EditorGUIUtility.SetIconSize(Vector2.zero);
if (!this.showingConflicts)
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUI.enabled = (!this.isDirSelected && (this.selectedGUID != string.Empty)) && enabled;
if (GUILayout.Button("Compare", this.constants.button, new GUILayoutOption[0]))
{
this.DoShowDiff(false);
GUIUtility.ExitGUI();
}
GUI.enabled = enabled;
GUILayout.FlexibleSpace();
if (this.changesets.Length == 0)
{
GUI.enabled = false;
}
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.MinWidth(100f) };
if (GUILayout.Button("Update", this.constants.bigButton, options))
{
if (this.changesets.Length == 0)
{
Debug.Log("Nothing to update.");
}
else
{
this.DoUpdate(false);
}
this.parentWin.Repaint();
GUIUtility.ExitGUI();
}
if (this.changesets.Length == 0)
{
GUI.enabled = enabled;
}
GUILayout.EndHorizontal();
if (AssetServer.GetAssetServerError() != string.Empty)
{
GUILayout.Space(10f);
GUILayout.Label(AssetServer.GetAssetServerError(), this.constants.errorLabel, new GUILayoutOption[0]);
GUILayout.Space(10f);
}
}
GUILayout.Space(10f);
return true;
}