Example #1
0
        private void eraseButton_Click(object sender, EventArgs e)
        {
            IPlayerComponent componentToRemoveFrom;
            IPlayerComponent componentToRemove;

            if (PlayListTreeViewer.SelectedNode != null)
            {
                if (PlayListTreeViewer.SelectedNode.Parent != null)
                {
                    componentToRemoveFrom = (IPlayerComponent)PlayListTreeViewer.SelectedNode.Parent.Tag;
                    componentToRemove     = (IPlayerComponent)PlayListTreeViewer.SelectedNode.Tag;
                    if (componentToRemove.IsContains(SongsPlayer.GetCurrentSong()))
                    {
                        SongsPlayer.Stop();
                        SongsPlayer.Visible = false;
                    }

                    componentToRemoveFrom.RemoveComponent(componentToRemove);
                }
                else
                {
                    ShowMessageBox("לא ניתן למחוק את כל הרשימות");
                }
            }
            else
            {
                ShowMessageBox("עלייך לבחור מה למחוק");
            }
        }
Example #2
0
 private void eraseButton_Click(object sender, EventArgs e)
 {
     SongsPlayer.Stop();
     if (playListBox.Items.Count != 0)
     {
         playListBox.Items.Remove(playListBox.SelectedItem);
         if (playListBox.Items.Count == 0)
         {
             EraseButton.Visible = false;
         }
     }
 }
Example #3
0
 public void StopPlaying()
 {
     SongsPlayer.Stop();
 }