Ejemplo n.º 1
0
        public void SortPlatformChildren(Platform platform)
        {
            platform.ChildIdentifiers.Sort((a, b) => {
                Platform platformA = RuntimeSettings.FindPlatform(a);
                Platform platformB = RuntimeSettings.FindPlatform(b);

                return(platformA.DisplaySortOrder.CompareTo(platformB.DisplaySortOrder));
            });
        }
Ejemplo n.º 2
0
        public void SetPlatformParent(Platform platform, Platform newParent)
        {
            Platform oldParent = RuntimeSettings.FindPlatform(platform.ParentIdentifier);

            if (oldParent != null)
            {
                oldParent.ChildIdentifiers.Remove(platform.Identifier);
            }

            if (newParent != null)
            {
                platform.ParentIdentifier = newParent.Identifier;

                newParent.ChildIdentifiers.Add(platform.Identifier);
                SortPlatformChildren(newParent);
            }
            else
            {
                platform.ParentIdentifier = null;
            }
        }