IsItemDeleted() приватный Метод

private IsItemDeleted ( string guid ) : bool
guid string
Результат bool
Пример #1
0
        private bool DoShowDiff(bool binary)
        {
            List <string>      list  = new List <string>();
            List <CompareInfo> list2 = new List <CompareInfo>();
            int changeset            = -1;
            int num2 = -1;

            if (AssetServer.IsItemDeleted(this.selectedGUID))
            {
                changeset = -2;
            }
            else
            {
                changeset = AssetServer.GetWorkingItemChangeset(this.selectedGUID);
                changeset = AssetServer.GetServerItemChangeset(this.selectedGUID, changeset);
            }
            int serverItemChangeset = AssetServer.GetServerItemChangeset(this.selectedGUID, -1);

            num2 = (serverItemChangeset != -1) ? serverItemChangeset : -2;
            list.Add(this.selectedGUID);
            list2.Add(new CompareInfo(changeset, num2, !binary ? 0 : 1, !binary ? 1 : 0));
            if (list.Count != 0)
            {
                AssetServer.CompareFiles(list.ToArray(), list2.ToArray());
            }
            else
            {
                return(false);
            }
            return(true);
        }
Пример #2
0
        private bool DoShowDiff(bool binary)
        {
            List <string>      list  = new List <string>();
            List <CompareInfo> list2 = new List <CompareInfo>();
            int num;

            if (AssetServer.IsItemDeleted(this.selectedGUID))
            {
                num = -2;
            }
            else
            {
                num = AssetServer.GetWorkingItemChangeset(this.selectedGUID);
                num = AssetServer.GetServerItemChangeset(this.selectedGUID, num);
            }
            int serverItemChangeset = AssetServer.GetServerItemChangeset(this.selectedGUID, -1);
            int ver = (serverItemChangeset != -1) ? serverItemChangeset : -2;

            list.Add(this.selectedGUID);
            list2.Add(new CompareInfo(num, ver, (!binary) ? 0 : 1, (!binary) ? 1 : 0));
            bool result;

            if (list.Count != 0)
            {
                AssetServer.CompareFiles(list.ToArray(), list2.ToArray());
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Пример #3
0
        private void ResolveSelectedDownloadConflicts(DownloadResolution res)
        {
            int  num  = -1;
            bool flag = false;
            int  i    = 0;

            while (i < this.downloadConflicts.Length)
            {
                if (this.selectedLV1Items[i])
                {
                    string guid = this.downloadConflicts[i];
                    if (res == DownloadResolution.Merge && AssetServer.IsItemDeleted(guid))
                    {
                        flag = true;
                    }
                    else
                    {
                        if (res != DownloadResolution.Unresolved)
                        {
                            if (AssetServer.GetDownloadResolution(guid) == DownloadResolution.Unresolved)
                            {
                                this.downloadConflictsToResolve--;
                            }
                        }
                        else
                        {
                            this.downloadConflictsToResolve++;
                        }
                        this.downloadResolutions[i] = res;
                        AssetServer.SetDownloadResolution(guid, res);
                        num = ((num != -1) ? -2 : i);
                    }
                }
IL_94:
                i++;
                continue;
                goto IL_94;
            }
            this.enableContinueButton = (this.downloadConflictsToResolve == 0);
            if (num >= 0)
            {
                this.selectedLV1Items[num] = false;
                if (num < this.selectedLV1Items.Length - 1)
                {
                    this.selectedLV1Items[num + 1] = true;
                }
            }
            this.enableMergeButton = this.AtLeastOneSelectedAssetCanBeMerged();
            if (flag)
            {
                EditorUtility.DisplayDialog("Some conflicting changes cannot be merged", "Notice that not all selected changes where selected for merging. This happened because not all of them can be merged (e.g. assets are binary or deleted).", "OK");
            }
        }
Пример #4
0
        private bool DoShowDiff(bool binary)
        {
            List <string>      stringList      = new List <string>();
            List <CompareInfo> compareInfoList = new List <CompareInfo>();
            int ver1 = !AssetServer.IsItemDeleted(this.selectedGUID) ? AssetServer.GetServerItemChangeset(this.selectedGUID, AssetServer.GetWorkingItemChangeset(this.selectedGUID)) : -2;
            int serverItemChangeset = AssetServer.GetServerItemChangeset(this.selectedGUID, -1);
            int ver2 = serverItemChangeset != -1 ? serverItemChangeset : -2;

            stringList.Add(this.selectedGUID);
            compareInfoList.Add(new CompareInfo(ver1, ver2, !binary ? 0 : 1, !binary ? 1 : 0));
            if (stringList.Count == 0)
            {
                return(false);
            }
            AssetServer.CompareFiles(stringList.ToArray(), compareInfoList.ToArray());
            return(true);
        }
Пример #5
0
        private bool AtLeastOneSelectedAssetCanBeMerged()
        {
            bool result;

            for (int i = 0; i < this.downloadConflicts.Length; i++)
            {
                if (this.selectedLV1Items[i])
                {
                    if (!AssetServer.IsItemDeleted(this.downloadConflicts[i]))
                    {
                        result = true;
                        return(result);
                    }
                }
            }
            result = false;
            return(result);
        }
Пример #6
0
 private bool AtLeastOneSelectedAssetCanBeMerged()
 {
     for (int i = 0; i < this.downloadConflicts.Length; i++)
     {
         if (this.selectedLV1Items[i] && !AssetServer.AssetIsBinaryByGUID(this.downloadConflicts[i]) && !AssetServer.IsItemDeleted(this.downloadConflicts[i]))
         {
             return(true);
         }
     }
     return(false);
 }
        private void ResolveSelectedDownloadConflicts(DownloadResolution res)
        {
            int  index = -1;
            bool flag  = false;

            for (int i = 0; i < this.downloadConflicts.Length; i++)
            {
                if (this.selectedLV1Items[i])
                {
                    string guid = this.downloadConflicts[i];
                    if ((res == DownloadResolution.Merge) && (AssetServer.AssetIsBinaryByGUID(guid) || AssetServer.IsItemDeleted(guid)))
                    {
                        flag = true;
                    }
                    else
                    {
                        if (res != DownloadResolution.Unresolved)
                        {
                            if (AssetServer.GetDownloadResolution(guid) == DownloadResolution.Unresolved)
                            {
                                this.downloadConflictsToResolve--;
                            }
                        }
                        else
                        {
                            this.downloadConflictsToResolve++;
                        }
                        this.downloadResolutions[i] = res;
                        AssetServer.SetDownloadResolution(guid, res);
                        index = (index != -1) ? -2 : i;
                    }
                }
            }
            this.enableContinueButton = this.downloadConflictsToResolve == 0;
            if (index >= 0)
            {
                this.selectedLV1Items[index] = false;
                if (index < (this.selectedLV1Items.Length - 1))
                {
                    this.selectedLV1Items[index + 1] = true;
                }
            }
            this.enableMergeButton = this.AtLeastOneSelectedAssetCanBeMerged();
            if (flag)
            {
                EditorUtility.DisplayDialog("Some conflicting changes cannot be merged", "Notice that not all selected changes where selected for merging. This happened because not all of them can be merged (e.g. assets are binary or deleted).", "OK");
            }
        }
        private void ResolveSelectedDownloadConflicts(DownloadResolution res)
        {
            int  index1 = -1;
            bool flag   = false;

            for (int index2 = 0; index2 < this.downloadConflicts.Length; ++index2)
            {
                if (this.selectedLV1Items[index2])
                {
                    string downloadConflict = this.downloadConflicts[index2];
                    if (res == DownloadResolution.Merge && (AssetServer.AssetIsBinaryByGUID(downloadConflict) || AssetServer.IsItemDeleted(downloadConflict)))
                    {
                        flag = true;
                    }
                    else
                    {
                        if (res != DownloadResolution.Unresolved)
                        {
                            if (AssetServer.GetDownloadResolution(downloadConflict) == DownloadResolution.Unresolved)
                            {
                                --this.downloadConflictsToResolve;
                            }
                        }
                        else
                        {
                            ++this.downloadConflictsToResolve;
                        }
                        this.downloadResolutions[index2] = res;
                        AssetServer.SetDownloadResolution(downloadConflict, res);
                        index1 = index1 != -1 ? -2 : index2;
                    }
                }
            }
            this.enableContinueButton = this.downloadConflictsToResolve == 0;
            if (index1 >= 0)
            {
                this.selectedLV1Items[index1] = false;
                if (index1 < this.selectedLV1Items.Length - 1)
                {
                    this.selectedLV1Items[index1 + 1] = true;
                }
            }
            this.enableMergeButton = this.AtLeastOneSelectedAssetCanBeMerged();
            if (!flag)
            {
                return;
            }
            EditorUtility.DisplayDialog("Some conflicting changes cannot be merged", "Notice that not all selected changes where selected for merging. This happened because not all of them can be merged (e.g. assets are binary or deleted).", "OK");
        }