Exemplo n.º 1
0
        private void loadMusicToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog dlgOpen = new OpenFileDialog())
            {
                dlgOpen.Filter = "Mp3 File|*mp3";
                dlgOpen.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);

                if (dlgOpen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    _mp3Player = new Mp3Player(dlgOpen.FileName);
                    _mp3Player.Repeat = true;
                }
            }
        }
Exemplo n.º 2
0
        private void loadMusicToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog dlgOpen = new OpenFileDialog())
            {
                dlgOpen.Filter           = "Mp3 File|*mp3";
                dlgOpen.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);

                if (dlgOpen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    _mp3Player        = new Mp3Player(dlgOpen.FileName);
                    _mp3Player.Repeat = true;
                }
            }
        }