Exemplo n.º 1
0
        public DialogResult ShowDialog(IWin32Window owner, RSARFolderNode parent)
        {
            _parentNode = parent;
            _newNode    = null;

            treeResource.BeginUpdate();
            foreach (ResourceNode node in parent.RSARNode.Children)
            {
                treeResource.Nodes.Add(BaseWrapper.Wrap(this, node));
            }

            BaseWrapper w = treeResource.FindResource(parent);

            treeResource.SelectedNode = w;
            w.EnsureVisible();
            w.Expand();

            treeResource.EndUpdate();

            try
            {
                return(ShowDialog(owner));
            }
            finally
            {
                _parentNode = null;
                treeResource.Clear();
            }
        }
Exemplo n.º 2
0
        public void NewEntry()
        {
            BGMGEntryNode node = new BGMGEntryNode {
                _name = $"Song [{Resource.Children.Count}]", InfoIndex = -1, Volume = 100
            };

            _resource.AddChild(node);

            BaseWrapper w = FindResource(node, false);

            w.EnsureVisible();
            w.TreeView.SelectedNode = w;
        }