예제 #1
0
        private void RefreshBrowser()
        {
            this.ClearFileInfo();
            using (var ib = new InfoBuilder()) {
                Application.DoEvents();
                // Clear treeview, create main root and fill them
                switch (this.tabBrowsers.SelectedIndex)
                {
                case 0: { // Music
                    this.tvMusicBrowser.Nodes.Clear();
                    var root = new TreeNode("Music");
                    this.tvMusicBrowser.Nodes.Add(root);
                    ib.TargetNode   = root;
                    ib.FileTypeName = root.Text;
                    ib.FilePattern  = "*.bgw";
                    ib.ResourceName = "PlayOnline.Utils.AudioManager.MusicInfo.xml";
                    ib.ShowDialog(this);
                    root.Expand();
                    this.tvMusicBrowser.SelectedNode = root;
                    break;
                }

                case 1: { // Sound Effects
                    this.tvSoundBrowser.Nodes.Clear();
                    var root = new TreeNode("Sound Effects");
                    this.tvSoundBrowser.Nodes.Add(root);
                    ib.TargetNode   = root;
                    ib.FileTypeName = root.Text;
                    ib.FilePattern  = "*.spw";
                    ib.ResourceName = "PlayOnline.Utils.AudioManager.SFXInfo.xml";
                    ib.ShowDialog(this);
                    root.Expand();
                    this.tvSoundBrowser.SelectedNode = root;
                    break;
                }
                }
            }
        }
예제 #2
0
        private void RefreshBrowser()
        {
            this.ClearFileInfo();
            using (InfoBuilder IB = new InfoBuilder())
            {
                Application.DoEvents();
                // Clear treeview, create main root and fill them
                switch (this.tabBrowsers.SelectedIndex)
                {
                case 0: // Music
                    this.tvMusicBrowser.Nodes.Clear();
                    TreeNode MusicRoot = new TreeNode("Music");
                    this.tvMusicBrowser.Nodes.Add(MusicRoot);
                    IB.TargetNode   = MusicRoot;
                    IB.FileTypeName = MusicRoot.Text;
                    IB.FilePattern  = "*.bgw";
                    IB.ResourceName = "MusicInfo.xml";
                    IB.ShowDialog(this);
                    MusicRoot.Expand();
                    this.tvMusicBrowser.SelectedNode = MusicRoot;
                    break;

                case 1: // Sound Effects
                    this.tvSoundBrowser.Nodes.Clear();
                    TreeNode SoundRoot = new TreeNode("Sound Effects");
                    this.tvSoundBrowser.Nodes.Add(SoundRoot);
                    IB.TargetNode   = SoundRoot;
                    IB.FileTypeName = SoundRoot.Text;
                    IB.FilePattern  = "*.spw";
                    IB.ResourceName = "SFXInfo.xml";
                    IB.ShowDialog(this);
                    SoundRoot.Expand();
                    this.tvSoundBrowser.SelectedNode = SoundRoot;
                    break;
                }
            }
        }
예제 #3
0
 private void RefreshBrowser()
 {
     this.ClearFileInfo();
       using (var ib = new InfoBuilder()) {
     Application.DoEvents();
     // Clear treeview, create main root and fill them
     switch (this.tabBrowsers.SelectedIndex) {
       case 0: { // Music
     this.tvMusicBrowser.Nodes.Clear();
     var root = new TreeNode("Music");
     this.tvMusicBrowser.Nodes.Add(root);
     ib.TargetNode = root;
     ib.FileTypeName = root.Text;
     ib.FilePattern = "*.bgw";
     ib.ResourceName = "PlayOnline.Utils.AudioManager.MusicInfo.xml";
     ib.ShowDialog(this);
     root.Expand();
     this.tvMusicBrowser.SelectedNode = root;
     break;
       }
       case 1: { // Sound Effects
     this.tvSoundBrowser.Nodes.Clear();
     var root = new TreeNode("Sound Effects");
     this.tvSoundBrowser.Nodes.Add(root);
     ib.TargetNode = root;
     ib.FileTypeName = root.Text;
     ib.FilePattern = "*.spw";
     ib.ResourceName = "PlayOnline.Utils.AudioManager.SFXInfo.xml";
     ib.ShowDialog(this);
     root.Expand();
     this.tvSoundBrowser.SelectedNode = root;
     break;
       }
     }
       }
 }
예제 #4
0
 private void RefreshBrowser()
 {
     this.ClearFileInfo();
     using (InfoBuilder IB = new InfoBuilder())
     {
         Application.DoEvents();
         // Clear treeview, create main root and fill them
         switch (this.tabBrowsers.SelectedIndex)
         {
         case 0: // Music
             this.tvMusicBrowser.Nodes.Clear();
             TreeNode MusicRoot = new TreeNode("Music");
             this.tvMusicBrowser.Nodes.Add(MusicRoot);
             IB.TargetNode = MusicRoot;
             IB.FileTypeName = MusicRoot.Text;
             IB.FilePattern = "*.bgw";
             IB.ResourceName = "MusicInfo.xml";
             IB.ShowDialog(this);
             MusicRoot.Expand();
             this.tvMusicBrowser.SelectedNode = MusicRoot;
             break;
         case 1: // Sound Effects
             this.tvSoundBrowser.Nodes.Clear();
             TreeNode SoundRoot = new TreeNode("Sound Effects");
             this.tvSoundBrowser.Nodes.Add(SoundRoot);
             IB.TargetNode = SoundRoot;
             IB.FileTypeName = SoundRoot.Text;
             IB.FilePattern = "*.spw";
             IB.ResourceName = "SFXInfo.xml";
             IB.ShowDialog(this);
             SoundRoot.Expand();
             this.tvSoundBrowser.SelectedNode = SoundRoot;
             break;
         }
     }
 }