Inheritance: System.Windows.Forms.TreeNode
Beispiel #1
0
        public void RefreshResourceView()
        {
            //refresh resource view
            ChangesView.Nodes.Clear();
            SelectedChunks.Clear();
            SelectedIffs.Clear();
            ResNodes.Clear();
            UpdateSelectedRes();
            var mod     = Content.Content.Get().Changes;
            var changes = mod.GetChangeList();

            int chunkChange = 0;

            foreach (var iff in changes)
            {
                var node = new ResChangeNode(iff);
                foreach (var chunk in iff.ListAll())
                {
                    if (chunk.RuntimeInfo == ChunkRuntimeState.Modified ||
                        chunk.RuntimeInfo == ChunkRuntimeState.Delete)
                    {
                        var cnode = new ResChangeNode(chunk);
                        node.Nodes.Add(cnode);
                        ResNodes.Add(cnode);
                        chunkChange++;
                    }
                }
                ResNodes.Add(node);
                ChangesView.Nodes.Add(node);
            }

            ChangesView.ExpandAll();

            if (changes.Count == 0)
            {
                ChangesLabel.Text = "No changes detected.";
            }
            else
            {
                ChangesLabel.Text = "Changed " + chunkChange + " chunks across " + changes.Count + " files.";
            }

            OverviewTab.Text = "Resources" + ((chunkChange > 0) ? (" (" + chunkChange + ")") : "");

            UpdateSelectedRes();
        }
Beispiel #2
0
        public void RefreshResourceView()
        {
            //refresh resource view
            ChangesView.Nodes.Clear();
            SelectedChunks.Clear();
            SelectedIffs.Clear();
            ResNodes.Clear();
            UpdateSelectedRes();
            var mod = Content.Content.Get().Changes;
            var changes = mod.GetChangeList();

            int chunkChange = 0;

            foreach (var iff in changes)
            {
                var node = new ResChangeNode(iff);
                foreach (var chunk in iff.ListAll())
                {
                    if (chunk.RuntimeInfo == ChunkRuntimeState.Modified
                     || chunk.RuntimeInfo == ChunkRuntimeState.Delete)
                    {
                        var cnode = new ResChangeNode(chunk);
                        node.Nodes.Add(cnode);
                        ResNodes.Add(cnode);
                        chunkChange++;
                    }
                }
                ResNodes.Add(node);
                ChangesView.Nodes.Add(node);
            }

            ChangesView.ExpandAll();

            if (changes.Count == 0) ChangesLabel.Text = "No changes detected.";
            else ChangesLabel.Text = "Changed " + chunkChange + " chunks across " + changes.Count + " files.";

            OverviewTab.Text = "Resources" + ((chunkChange > 0) ? (" (" + chunkChange + ")") : "");

            UpdateSelectedRes();
        }