Exemple #1
0
        private void songExceptionHandler(object sender, PlaybackExceptionEventArgs e)
        {
            Notification notification = new Notification("An error occured.", $"{e.Details}\nWe'll skip to the next track for you.", 2500);

            notification.Location = Location;
            notification.Show();
            PlayerForm.NextSong();
        }
 private void next_Click(object sender, EventArgs e)
 {
     PlayerForm.NextSong();
     listBox1.Items.Clear();
     PopulateList();
 }
 private void nextButton_Click(object sender, EventArgs e)
 {
     PlayerForm.NextSong();
 }
Exemple #4
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (!searchBox.Focused && Properties.Settings.Default.General_KeyboardNavigation)
            {
                switch (keyData)        // TODO: In the future, I wanna make these keys rebindable
                {
                case Keys.A:            // Tab controls
                    tabControl2.SelectTab(songTab);
                    return(true);

                case Keys.S:
                    tabControl2.SelectTab(artistTab);
                    return(true);

                case Keys.D:
                    tabControl2.SelectTab(albumTab);
                    return(true);

                case Keys.F:
                    tabControl2.SelectTab(searchTab);
                    return(true);

                case Keys.G:
                    tabControl2.SelectTab(importTab);
                    return(true);

                case Keys.Q:
                    tabControl1.SelectTab(tabPage3);
                    return(true);

                case Keys.MediaPlayPause:                   // Playback controls
                case Keys.C:
                    PlayButton();
                    return(true);

                case Keys.V:
                case Keys.MediaNextTrack:
                    PlayerForm.NextSong();
                    return(true);

                case Keys.X:
                case Keys.MediaStop:
                    StopButton();
                    return(true);

                case Keys.P:
                    TagEditor tagEditor = new TagEditor(new List <string> {
                        PlayerForm.filePath
                    });
                    tagEditor.Show();
                    return(true);

                case Keys.O:

                    return(true);

                default:
                    break;
                }
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }