public RMBattleBacks2_Collection Clone(RMPackage parent)
        {
            RMBattleBacks2_Collection clone = new RMBattleBacks2_Collection(parent);

            if (Files != null)
            {
                foreach (RMSingleFile file in Files)
                {
                    clone.Files.Add(file.Clone(clone));
                }
            }
            clone.Name = Name;
            return(clone);
        }
        public static RMSingleFileCollection ToNewClassInstance(this RMSingleFileCollection.CollectionType typeOfCollection, RMPackage parent)
        {
            RMSingleFileCollection newCollection;

            switch (typeOfCollection)
            {
            case RMSingleFileCollection.CollectionType.Animation:
                newCollection      = new RMAnimationCollection(parent);
                newCollection.Name = RMPConstants.Defaults.ANIM_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Data:
                newCollection      = new RMDataCollection(parent);
                newCollection.Name = RMPConstants.Defaults.DATA_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.BattleBacks_1:
                newCollection      = new RMBattleBacks1_Collection(parent);
                newCollection.Name = RMPConstants.Defaults.BB1_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.BattleBacks_2:
                newCollection      = new RMBattleBacks2_Collection(parent);
                newCollection.Name = RMPConstants.Defaults.BB2_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Parallax:
                newCollection      = new RMParallaxCollection(parent);
                newCollection.Name = RMPConstants.Defaults.PARALLAX_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Pictures:
                newCollection      = new RMPictureCollection(parent);
                newCollection.Name = RMPConstants.Defaults.PICTURES_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.System:
                newCollection      = new RMSysImageCollection(parent);
                newCollection.Name = RMPConstants.Defaults.SYSTEM_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Titles_1:
                newCollection      = new RMTitles1_Collection(parent);
                newCollection.Name = RMPConstants.Defaults.TITLES1_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Titles_2:
                newCollection      = new RMTitles2_Collection(parent);
                newCollection.Name = RMPConstants.Defaults.TITLES2_COLLECTION_NAME;
                break;

            case RMSingleFileCollection.CollectionType.Plugins:
                newCollection      = new RMPluginsCollection(parent);
                newCollection.Name = RMPConstants.Defaults.PLUGINS_COLLECTION_NAME;
                break;

            default:
                newCollection = null;
                break;
            }
            return(newCollection);
        }