private void DoNamingConflictsGUI()
{
bool enabled = GUI.enabled;
bool shift = Event.current.shift;
bool actionKey = EditorGUI.actionKey;
GUILayout.BeginVertical(new GUILayoutOption[0]);
GUILayout.Space(10f);
GUILayout.Label("The following assets have the same name as an existing asset on the server.\nPlease select which one to rename before continuing the update.", new GUILayoutOption[0]);
GUILayout.Space(10f);
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.FlexibleSpace();
GUI.enabled = this.lv2HasSelection && enabled;
if (GUILayout.Button(nameConflictButtonTexts[0], this.constants.ButtonLeft, new GUILayoutOption[0]))
{
this.ResolveSelectedNamingConflicts(NameConflictResolution.RenameLocal);
}
if (GUILayout.Button(nameConflictButtonTexts[1], this.constants.ButtonRight, new GUILayoutOption[0]))
{
this.ResolveSelectedNamingConflicts(NameConflictResolution.RenameRemote);
}
GUI.enabled = enabled;
GUILayout.EndHorizontal();
GUILayout.Space(5f);
SplitterGUILayout.BeginHorizontalSplit(this.lvHeaderSplit2, new GUILayoutOption[0]);
GUILayout.Box("Action", this.constants.lvHeader, new GUILayoutOption[0]);
GUILayout.Box("Asset", this.constants.lvHeader, new GUILayoutOption[0]);
SplitterGUILayout.EndHorizontalSplit();
int row = this.lv2.row;
bool flag4 = false;
IEnumerator enumerator = ListViewGUILayout.ListView(this.lv2, this.constants.background, new GUILayoutOption[0]).GetEnumerator();
try
{
while (enumerator.MoveNext())
{
ListViewElement current = (ListViewElement) enumerator.Current;
if (((GUIUtility.keyboardControl == this.lv2.ID) && (Event.current.type == EventType.KeyDown)) && actionKey)
{
Event.current.Use();
}
if (this.selectedLV2Items[current.row] && (Event.current.type == EventType.Repaint))
{
this.constants.selected.Draw(current.position, false, false, false, false);
}
if (ListViewGUILayout.HasMouseUp(current.position))
{
if (!shift && !actionKey)
{
flag4 |= ListViewGUILayout.MultiSelection(row, this.lv2.row, ref this.initialSelectedLV2Item, ref this.selectedLV2Items);
}
}
else if (ListViewGUILayout.HasMouseDown(current.position))
{
if ((!this.selectedLV2Items[current.row] || shift) || actionKey)
{
flag4 |= ListViewGUILayout.MultiSelection(row, current.row, ref this.initialSelectedLV2Item, ref this.selectedLV2Items);
}
this.lv2.row = current.row;
}
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width((float) this.lvHeaderSplit2.realSizes[0]), GUILayout.Height(18f) };
GUILayout.Label(this.namingResolutionString[(int) this.namingResolutions[current.row]], options);
GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.Width((float) this.lvHeaderSplit2.realSizes[1]), GUILayout.Height(18f) };
GUILayout.Label(new GUIContent(this.dNamingPaths[current.row], !AssetServer.AssetIsDir(this.nameConflicts[current.row]) ? InternalEditorUtility.GetIconForFile(this.dNamingPaths[current.row]) : EditorGUIUtility.FindTexture(EditorResourcesUtility.folderIconName)), optionArray2);
}
}
finally
{
IDisposable disposable = enumerator as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}
}
GUILayout.EndVertical();
if (GUIUtility.keyboardControl == this.lv2.ID)
{
if ((Event.current.type == EventType.ValidateCommand) && (Event.current.commandName == "SelectAll"))
{
Event.current.Use();
}
else if ((Event.current.type == EventType.ExecuteCommand) && (Event.current.commandName == "SelectAll"))
{
for (int i = 0; i < this.selectedLV2Items.Length; i++)
{
this.selectedLV2Items[i] = true;
}
flag4 = true;
Event.current.Use();
}
if (this.lv2.selectionChanged && !actionKey)
{
flag4 |= ListViewGUILayout.MultiSelection(row, this.lv2.row, ref this.initialSelectedLV2Item, ref this.selectedLV2Items);
}
}
if (this.lv2.selectionChanged || flag4)
{
this.mySelection = true;
AssetServer.SetSelectionFromGUIDs(this.GetSelectedNamingGUIDs());
this.lv2HasSelection = this.HasTrue(ref this.selectedLV2Items);
}
}