コード例 #1
0
        public static frmPackAssetTNodeTag AddCollectionToTView(TreeView tView, RMCollection collection, string rootDirectory = null)
        {
            TreeNode             tNode = new TreeNode();
            frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, collection, rootDirectory);

            tNode.Text = tag.ToString();
            tNode.Tag  = tag;
            tView.Nodes.Add(tNode);
            return(tag);
        }
コード例 #2
0
 void ProcessSingleFileCollection(TreeNode parentNode, RMSingleFileCollection singleFileCollection, string rootDir)
 {
     if (singleFileCollection == null || singleFileCollection.Files == null || singleFileCollection.Files.Count == 0)
     {
         return;
     }
     foreach (RMSingleFile singleFile in singleFileCollection.Files)
     {
         TreeNode             tNode = new TreeNode();
         frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, singleFile, rootDir);
         tNode.Text = tag.ToString();
         tNode.Tag  = tag;
         parentNode.Nodes.Add(tNode);
     }
 }
コード例 #3
0
        void ProcessMovieGroups(TreeNode parentNode, RMMovieCollection movieCollection, string rootDir)
        {
            if (movieCollection == null || movieCollection.Groups == null || movieCollection.Groups.Count == 0)
            {
                return;
            }

            foreach (RMMovieGroup videoGroup in movieCollection.Groups)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, videoGroup, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                parentNode.Nodes.Add(tNode);
            }
        }
コード例 #4
0
        void ProcessTilesetGroups(TreeNode parentNode, RMTilesetCollection tilesetCollection, string rootDir)
        {
            if (tilesetCollection == null || tilesetCollection.Groups == null || tilesetCollection.Groups.Count == 0)
            {
                return;
            }

            foreach (RMTilesetGroup tilesetGroup in tilesetCollection.Groups)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, tilesetGroup, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                parentNode.Nodes.Add(tNode);
            }
        }
コード例 #5
0
        void ProcessAudioGroups(TreeNode parentNode, RMAudioCollection audioCollection, string rootDir)
        {
            if (audioCollection == null || audioCollection.Groups == null || audioCollection.Groups.Count == 0)
            {
                return;
            }

            foreach (RMAudioGroup audioGroup in audioCollection.Groups)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, audioGroup, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                parentNode.Nodes.Add(tNode);
            }
        }
コード例 #6
0
        void ProcessCharacterGroups(TreeNode parentNode, RMCharImageCollection characterCollection, string rootDir)
        {
            if (characterCollection == null || characterCollection.Groups == null || characterCollection.Groups.Count == 0)
            {
                return;
            }

            foreach (RMCharImageGroup characterGroup in characterCollection.Groups)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, characterGroup, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                parentNode.Nodes.Add(tNode);
            }
        }
コード例 #7
0
        void ProcessGeneratorGroups(TreeNode parentNode, RMGeneratorCollection generatorCollection, string rootDir)
        {
            if (generatorCollection == null || generatorCollection.Parts == null || generatorCollection.Parts.Count == 0)
            {
                return;
            }

            foreach (RMGenPart genPart in generatorCollection.Parts)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, genPart, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                parentNode.Nodes.Add(tNode);
            }
        }
コード例 #8
0
        public static frmPackAssetTNodeTag FindNodeOfCollectionType(this TreeNodeCollection tNodes, RMCollectionType collType)
        {
            if (tNodes == null)
            {
                return(null);
            }

            foreach (TreeNode tNode in tNodes)
            {
                frmPackAssetTNodeTag tag = tNode.Tag as frmPackAssetTNodeTag;
                if (tag != null)
                {
                    if (tag.TagObjectType == frmPackAssetTNodeTag.TagType.Collection && tag.CollectionType == collType)
                    {
                        return(tag);
                    }
                }
            }
            return(null);
        }
コード例 #9
0
        public frmPackAssetTNodeTag(TreeNode myNode, RMMovieGroup movieGroup, string rootDir)
        {
            AssociatedNode = myNode;
            TagObjectType  = TagType.MovieGroup;
            Name           = movieGroup.Name;
            Object         = movieGroup;

            if (movieGroup.Files == null || movieGroup.Files.Count == 0)
            {
                return;
            }

            foreach (RMMovieFile movieFile in movieGroup.Files)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, movieFile, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                myNode.Nodes.Add(tNode);
            }
        }
コード例 #10
0
        public frmPackAssetTNodeTag(TreeNode myNode, RMGenPart genPart, string rootDir)
        {
            AssociatedNode = myNode;
            TagObjectType  = TagType.GeneratorPartGroup;
            Name           = genPart.Name;
            Object         = genPart;

            if (genPart.Files == null || genPart.Files.Count == 0)
            {
                return;
            }

            foreach (RMGenFile genFile in genPart.Files)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, genFile, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                myNode.Nodes.Add(tNode);
            }
        }
コード例 #11
0
        public frmPackAssetTNodeTag(TreeNode myNode, RMCharImageGroup characterGroup, string rootDir)
        {
            AssociatedNode = myNode;
            TagObjectType  = TagType.CharacterGroup;
            Name           = characterGroup.Name;
            Object         = characterGroup;

            if (characterGroup.Files == null || characterGroup.Files.Count == 0)
            {
                return;
            }

            foreach (RMCharImageFile characterFile in characterGroup.Files)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, characterFile, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                myNode.Nodes.Add(tNode);
            }
        }
コード例 #12
0
        public frmPackAssetTNodeTag(TreeNode myNode, RMAudioGroup audio, string rootDir)
        {
            AssociatedNode = myNode;
            TagObjectType  = TagType.AudioGroup;
            Name           = audio.Name;
            Object         = audio;

            if (audio.Files == null || audio.Files.Count == 0)
            {
                return;
            }

            foreach (RMAudioFile audioFile in audio.Files)
            {
                TreeNode             tNode = new TreeNode();
                frmPackAssetTNodeTag tag   = new frmPackAssetTNodeTag(tNode, audioFile, rootDir);
                tNode.Text = tag.ToString();
                tNode.Tag  = tag;
                myNode.Nodes.Add(tNode);
            }
        }