public ASUpdateConflictResolveWindow(string[] conflicting) { float[] relativeSizes = new float[] { 20f, 80f }; int[] minSizes = new int[] { 100, 100 }; this.lvHeaderSplit1 = new SplitterState(relativeSizes, minSizes, null); float[] singleArray2 = new float[] { 20f, 80f }; int[] numArray2 = new int[] { 100, 100 }; this.lvHeaderSplit2 = new SplitterState(singleArray2, numArray2, null); this.dropDownMenuItems = new string[] { "Compare", "Compare Binary" }; this.downloadConflicts = new string[0]; this.nameConflicts = new string[0]; this.dConflictPaths = new string[0]; this.dNamingPaths = new string[0]; this.downloadResolutions = new DownloadResolution[0]; this.namingResolutions = new NameConflictResolution[0]; this.enableMergeButton = true; this.iconSize = new Vector2(16f, 16f); this.downloadResolutionString = new string[] { "Unresolved", "Skip Asset", "Discard My Changes", "Ignore Server Changes", "Merge" }; this.namingResolutionString = new string[] { "Unresolved", "Rename Local Asset", "Rename Server Asset" }; this.downloadConflictsToResolve = 0; ArrayList list = new ArrayList(); ArrayList list2 = new ArrayList(); ArrayList list3 = new ArrayList(); ArrayList list4 = new ArrayList(); for (int i = 0; i < conflicting.Length; i++) { AssetStatus statusGUID = AssetServer.GetStatusGUID(conflicting[i]); if (statusGUID == AssetStatus.Conflict) { list.Add(conflicting[i]); DownloadResolution downloadResolution = AssetServer.GetDownloadResolution(conflicting[i]); list2.Add(downloadResolution); if (downloadResolution == DownloadResolution.Unresolved) { this.downloadConflictsToResolve++; } } if ((AssetServer.GetPathNameConflict(conflicting[i]) != null) && (statusGUID != AssetStatus.ServerOnly)) { list4.Add(conflicting[i]); NameConflictResolution nameConflictResolution = AssetServer.GetNameConflictResolution(conflicting[i]); list3.Add(nameConflictResolution); if (nameConflictResolution == NameConflictResolution.Unresolved) { this.downloadConflictsToResolve++; } } } this.downloadConflicts = list.ToArray(typeof(string)) as string[]; this.downloadResolutions = list2.ToArray(typeof(DownloadResolution)) as DownloadResolution[]; this.namingResolutions = list3.ToArray(typeof(NameConflictResolution)) as NameConflictResolution[]; this.nameConflicts = list4.ToArray(typeof(string)) as string[]; this.enableContinueButton = this.downloadConflictsToResolve == 0; this.dConflictPaths = new string[this.downloadConflicts.Length]; this.deletionConflict = new bool[this.downloadConflicts.Length]; for (int j = 0; j < this.downloadConflicts.Length; j++) { if (AssetServer.HasDeletionConflict(this.downloadConflicts[j])) { this.dConflictPaths[j] = ParentViewFolder.MakeNiceName(AssetServer.GetDeletedItemPathAndName(this.downloadConflicts[j])); this.deletionConflict[j] = true; } else { this.dConflictPaths[j] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.downloadConflicts[j])); this.deletionConflict[j] = false; } } this.dNamingPaths = new string[this.nameConflicts.Length]; for (int k = 0; k < this.nameConflicts.Length; k++) { this.dNamingPaths[k] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.nameConflicts[k])); } this.showDownloadConflicts = this.downloadConflicts.Length > 0; this.showNamingConflicts = this.nameConflicts.Length > 0; this.lv1.totalRows = this.downloadConflicts.Length; this.lv2.totalRows = this.nameConflicts.Length; this.selectedLV1Items = new bool[this.downloadConflicts.Length]; this.selectedLV2Items = new bool[this.nameConflicts.Length]; this.DoSelectionChange(); }
public ASUpdateConflictResolveWindow(string[] conflicting) { this.downloadConflictsToResolve = 0; ArrayList arrayList = new ArrayList(); ArrayList arrayList2 = new ArrayList(); ArrayList arrayList3 = new ArrayList(); ArrayList arrayList4 = new ArrayList(); for (int i = 0; i < conflicting.Length; i++) { AssetStatus statusGUID = AssetServer.GetStatusGUID(conflicting[i]); if (statusGUID == AssetStatus.Conflict) { arrayList.Add(conflicting[i]); DownloadResolution downloadResolution = AssetServer.GetDownloadResolution(conflicting[i]); arrayList2.Add(downloadResolution); if (downloadResolution == DownloadResolution.Unresolved) { this.downloadConflictsToResolve++; } } if (AssetServer.GetPathNameConflict(conflicting[i]) != null && statusGUID != AssetStatus.ServerOnly) { arrayList4.Add(conflicting[i]); NameConflictResolution nameConflictResolution = AssetServer.GetNameConflictResolution(conflicting[i]); arrayList3.Add(nameConflictResolution); if (nameConflictResolution == NameConflictResolution.Unresolved) { this.downloadConflictsToResolve++; } } } this.downloadConflicts = (arrayList.ToArray(typeof(string)) as string[]); this.downloadResolutions = (arrayList2.ToArray(typeof(DownloadResolution)) as DownloadResolution[]); this.namingResolutions = (arrayList3.ToArray(typeof(NameConflictResolution)) as NameConflictResolution[]); this.nameConflicts = (arrayList4.ToArray(typeof(string)) as string[]); this.enableContinueButton = (this.downloadConflictsToResolve == 0); this.dConflictPaths = new string[this.downloadConflicts.Length]; this.deletionConflict = new bool[this.downloadConflicts.Length]; for (int j = 0; j < this.downloadConflicts.Length; j++) { if (AssetServer.HasDeletionConflict(this.downloadConflicts[j])) { this.dConflictPaths[j] = ParentViewFolder.MakeNiceName(AssetServer.GetDeletedItemPathAndName(this.downloadConflicts[j])); this.deletionConflict[j] = true; } else { this.dConflictPaths[j] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.downloadConflicts[j])); this.deletionConflict[j] = false; } } this.dNamingPaths = new string[this.nameConflicts.Length]; for (int k = 0; k < this.nameConflicts.Length; k++) { this.dNamingPaths[k] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.nameConflicts[k])); } this.showDownloadConflicts = (this.downloadConflicts.Length > 0); this.showNamingConflicts = (this.nameConflicts.Length > 0); this.lv1.totalRows = this.downloadConflicts.Length; this.lv2.totalRows = this.nameConflicts.Length; this.selectedLV1Items = new bool[this.downloadConflicts.Length]; this.selectedLV2Items = new bool[this.nameConflicts.Length]; this.DoSelectionChange(); }
public ASUpdateConflictResolveWindow(string[] conflicting) { this.downloadConflictsToResolve = 0; ArrayList arrayList1 = new ArrayList(); ArrayList arrayList2 = new ArrayList(); ArrayList arrayList3 = new ArrayList(); ArrayList arrayList4 = new ArrayList(); for (int index = 0; index < conflicting.Length; ++index) { AssetStatus statusGuid = AssetServer.GetStatusGUID(conflicting[index]); if (statusGuid == AssetStatus.Conflict) { arrayList1.Add((object)conflicting[index]); DownloadResolution downloadResolution = AssetServer.GetDownloadResolution(conflicting[index]); arrayList2.Add((object)downloadResolution); if (downloadResolution == DownloadResolution.Unresolved) { ++this.downloadConflictsToResolve; } } if (AssetServer.GetPathNameConflict(conflicting[index]) != null && statusGuid != AssetStatus.ServerOnly) { arrayList4.Add((object)conflicting[index]); NameConflictResolution conflictResolution = AssetServer.GetNameConflictResolution(conflicting[index]); arrayList3.Add((object)conflictResolution); if (conflictResolution == NameConflictResolution.Unresolved) { ++this.downloadConflictsToResolve; } } } this.downloadConflicts = arrayList1.ToArray(typeof(string)) as string[]; this.downloadResolutions = arrayList2.ToArray(typeof(DownloadResolution)) as DownloadResolution[]; this.namingResolutions = arrayList3.ToArray(typeof(NameConflictResolution)) as NameConflictResolution[]; this.nameConflicts = arrayList4.ToArray(typeof(string)) as string[]; this.enableContinueButton = this.downloadConflictsToResolve == 0; this.dConflictPaths = new string[this.downloadConflicts.Length]; this.deletionConflict = new bool[this.downloadConflicts.Length]; for (int index = 0; index < this.downloadConflicts.Length; ++index) { if (AssetServer.HasDeletionConflict(this.downloadConflicts[index])) { this.dConflictPaths[index] = ParentViewFolder.MakeNiceName(AssetServer.GetDeletedItemPathAndName(this.downloadConflicts[index])); this.deletionConflict[index] = true; } else { this.dConflictPaths[index] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.downloadConflicts[index])); this.deletionConflict[index] = false; } } this.dNamingPaths = new string[this.nameConflicts.Length]; for (int index = 0; index < this.nameConflicts.Length; ++index) { this.dNamingPaths[index] = ParentViewFolder.MakeNiceName(AssetServer.GetAssetPathName(this.nameConflicts[index])); } this.showDownloadConflicts = this.downloadConflicts.Length > 0; this.showNamingConflicts = this.nameConflicts.Length > 0; this.lv1.totalRows = this.downloadConflicts.Length; this.lv2.totalRows = this.nameConflicts.Length; this.selectedLV1Items = new bool[this.downloadConflicts.Length]; this.selectedLV2Items = new bool[this.nameConflicts.Length]; this.DoSelectionChange(); }