コード例 #1
0
        public void LoadIntoDocked(ToolStripItemClickedEventArgs e)
        {
            //tool.Show("Need to use the current track manager");
            //System.Diagnostics.Debugger.Break();

            TracklistPanel tm = e.ClickedItem.Tag as TracklistPanel;

            if (tm != null && tm != musicControl.CurrentPlaylistPanel)
            {
                for (int i = musicControl.trackManager.SelectedItems.Count - 1; i > -1; i--)
                {
                    tm.CurrentList.tracks.Insert(0, musicControl.trackManager.SelectedItems[i].Text);
                }
                throw new NotImplementedException("update panel loading");
                //tm.playlistView.LoadIntoView(tm.playlistView.currentList);
            }
        }
コード例 #2
0
ファイル: MusicControl.cs プロジェクト: pcstraw/Music-GUI
        //used to create a panel playlistPanel embedded in the right of the control
        public TracklistPanel CreatePlaylistPanel(Control control, Playlist p)
        {
            TracklistPanel dp = new TracklistPanel();

            dp.SetPlaylist(p);
            dp.tracklistView.ContextMenuStrip = trackContext;
            dp.Dock = DockStyle.Right;
            dp.Show();
            dp.tracklistView.DisplayPlaylist();
            Splitter sp = new Splitter();

            sp.Size         = new Size(5, sp.Size.Height);
            sp.BackColor    = Color.Gray;
            sp.Dock         = DockStyle.Right;
            dp.dockSplitter = sp;
            dp.Dock         = DockStyle.Right;
            control.Controls.Add(sp);
            control.Controls.Add(dp);
            sp.Show();
            return(dp);
        }
コード例 #3
0
        private void musicFilContext_send_button_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            TracklistPanel tm = e.ClickedItem.Tag as TracklistPanel;

            if (tm == null)
            {
                return;
            }

            foreach (TreeNode n in musicControl.musicFileView.SelectedNodes)
            {
                List <string> list = tool.GetAllAudioFiles(n);
                foreach (string s in list)
                {
                    tm.CurrentList.tracks.Insert(0, s);
                }
            }
            // tm.playlistView.LoadIntoView(tm.playlistView.currentList);
            throw new NotImplementedException("update panel loading");
            //  tm.trackManager.EnsureVisible(0);
        }
コード例 #4
0
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TracklistPanel pm = musicControl.CurrentPlaylistPanel;

            pm.tracklistView.manager.UpdateTracks();
            bool saved = pm.CurrentList.SaveAs();

            if (saved)
            {
                //tm.SetTitle(tm.currentList.name);
                //update track manager container name here
                ListViewItem item = musicControl.playlistView.FindItemByPath(pm.CurrentList.path);
                if (item == null)
                {
                    pm.UpdatePlaylistTitle();
                    musicControl.playlistView.manager.InsertPlaylistAt(0, pm.CurrentList);
                    musicControl.playlistFileView.manager.LoadPlaylistDirectories();
                }
                else
                {
                    pm.CurrentList.ReadFile();
                }
            }
        }