private void ShortUpdateList()
{
GUILayout.BeginVertical(!this.showSmallWindow ? constants.groupBox : constants.groupBoxNoMargin, new GUILayoutOption[0]);
GUILayout.Label("Updates on Server", constants.title, new GUILayoutOption[0]);
if (this.sharedChangesets == null)
{
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandHeight(true) };
GUILayout.BeginVertical(constants.contentBox, options);
GUILayout.Label("Could not retrieve changes", new GUILayoutOption[0]);
GUILayout.EndVertical();
}
else if (this.sharedChangesets.Length == 0)
{
GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.ExpandHeight(true) };
GUILayout.BeginVertical(constants.contentBox, optionArray2);
GUILayout.Label("You are up to date", new GUILayoutOption[0]);
GUILayout.EndVertical();
}
else
{
this.lv.totalRows = this.sharedChangesets.Length;
int num = (int) constants.entryNormal.CalcHeight(new GUIContent("X"), 100f);
constants.serverUpdateLog.alignment = TextAnchor.MiddleLeft;
constants.serverUpdateInfo.alignment = TextAnchor.MiddleLeft;
IEnumerator enumerator = ListViewGUILayout.ListView(this.lv, constants.background, new GUILayoutOption[0]).GetEnumerator();
try
{
while (enumerator.MoveNext())
{
ListViewElement current = (ListViewElement) enumerator.Current;
GUILayoutOption[] optionArray3 = new GUILayoutOption[] { GUILayout.MinHeight((float) num) };
Rect rect2 = GUILayoutUtility.GetRect(GUIClip.visibleRect.width, (float) num, optionArray3);
Rect position = rect2;
position.x++;
position.y++;
if ((current.row % 2) == 0)
{
if (Event.current.type == EventType.Repaint)
{
constants.entryEven.Draw(position, false, false, false, false);
}
position.y += rect2.height;
if (Event.current.type == EventType.Repaint)
{
constants.entryOdd.Draw(position, false, false, false, false);
}
}
position = rect2;
position.width -= this.maxNickLength + 0x19;
position.x += 10f;
GUI.Button(position, this.changesetContents[current.row], constants.serverUpdateLog);
position = rect2;
position.x += (position.width - this.maxNickLength) - 5f;
GUI.Label(position, this.sharedChangesets[current.row].owner, constants.serverUpdateInfo);
}
}
finally
{
IDisposable disposable = enumerator as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}
}
constants.serverUpdateLog.alignment = TextAnchor.UpperLeft;
constants.serverUpdateInfo.alignment = TextAnchor.UpperLeft;
GUILayout.BeginHorizontal(constants.contentBox, new GUILayoutOption[0]);
GUILayout.FlexibleSpace();
if (GUILayout.Button("Update", constants.smallButton, new GUILayoutOption[0]))
{
this.selectedPage = Page.Update;
this.InitUpdatePage(true);
this.asUpdateWin.DoUpdate(false);
}
if (GUILayout.Button("Details", constants.smallButton, new GUILayoutOption[0]))
{
this.SwitchSelectedPage(Page.Update);
base.Repaint();
GUIUtility.ExitGUI();
}
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();
}