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();
            }
        }
        public void NewFolder()
        {
            RSARFolderNode node = new RSARFolderNode();

            node.Name = _resource.FindName("NewFolder");
            _resource.AddChild(node);
        }
        public void NewSound()
        {
            RSARSoundNode node = new RSARSoundNode();

            node.Name = _resource.FindName("NewSound");
            RSARFolderNode folder = _resource as RSARFolderNode;
            RSARNode       rsar   = folder.RSARNode;

            if (rsar != null)
            {
                node._infoIndex = rsar._infoCache[0].Count;
                rsar._infoCache[0].Add(node);
            }
            _resource.AddChild(node);
        }
        public void NewGroup()
        {
            RSARGroupNode node = new RSARGroupNode
            {
                Name = _resource.FindName("NewGroup")
            };
            RSARFolderNode folder = _resource as RSARFolderNode;
            RSARNode       rsar   = folder.RSARNode;

            if (rsar != null)
            {
                node._infoIndex = rsar._infoCache[4].Count;
                rsar._infoCache[4].Add(node);
            }

            _resource.AddChild(node);
        }
        public void NewType()
        {
            RSARPlayerInfoNode node = new RSARPlayerInfoNode
            {
                Name = _resource.FindName("NewPlayerInfo")
            };
            RSARFolderNode folder = _resource as RSARFolderNode;
            RSARNode       rsar   = folder.RSARNode;

            if (rsar != null)
            {
                node._infoIndex = rsar._infoCache[2].Count;
                rsar._infoCache[2].Add(node);
            }

            _resource.AddChild(node);
        }