private void Main_Load(object sender, EventArgs e) { toolStripSeparator2.Visible = false; currentSonglb.Visible = false; currentsongToolStripMenuItem.Visible = false; timer.Interval = Properties.Settings.Default.RefeshRate * 1000; UpdateList(); if (PlayerSelect.FindString(Properties.Settings.Default.LastPlayer) > -1) PlayerSelect.SelectedIndex = PlayerSelect.FindString(Properties.Settings.Default.LastPlayer); PlayerSelect_SelectionChangeCommitted(PlayerSelect, new EventArgs()); foreach (Player Plr in Plist.Players) { if (Properties.Settings.Default.LastPlayer == Plr.Name) currentPlayer = Plr; } }
private void PlayerSelect_SelectionChangeCommitted(object sender, EventArgs e) { foreach (Player Plr in Plist.Players) { if (PlayerSelect.SelectedItem.ToString() == Plr.Name) currentPlayer = Plr; } Properties.Settings.Default.LastPlayer = PlayerSelect.SelectedItem.ToString(); Properties.Settings.Default.Save(); switch (currentPlayer.Type) { case MusicPlayers.Foobar2000: infolb.Text = "Shows song playing in Foobar2000."; playerLink.Text = "Open Foobar2000"; break; case MusicPlayers.AIMP3: infolb.Text = "Shows song playing in AIMP3."; playerLink.Text = "Open AIMP3"; break; case MusicPlayers.MediaMonkey: infolb.Text = "Shows song playing in Media Monkey."; playerLink.Text = "Open MediaMonkey"; break; case MusicPlayers.MPC: infolb.Text = "Shows song playing in Media Player Classic Home Cinema (mpc-hc)."; playerLink.Text = "Open mpc-hc"; break; case MusicPlayers.Winamp: infolb.Text = "Shows song playing in Winamp."; playerLink.Text = "Open Winamp"; break; case MusicPlayers.VLC: infolb.Text = "Shows song playing in VLC."; playerLink.Text = "Open VLC"; break; case MusicPlayers.Spotify: infolb.Text = "Shows song playing in Spotify."; playerLink.Text = "Open Spotify"; break; case MusicPlayers.Grooveshark: infolb.Text = "Shows song playing in Grooveshark. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Grooveshark"; break; case MusicPlayers.Youtube: infolb.Text = "Shows song playing in Youtube. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Youtube"; break; case MusicPlayers.Soundcloud: infolb.Text = "Shows song playing in Soundcloud. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Soundcloud"; break; case MusicPlayers.Pandora: infolb.Text = "Shows song playing in Pandora. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Pandora"; break; case MusicPlayers.Plug: infolb.Text = "Shows song playing in Plug. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Plug"; break; case MusicPlayers.Zaycev: infolb.Text = "Shows song playing in Zaycev. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open Zaycev"; break; case MusicPlayers.EightTracks: infolb.Text = "Shows song playing in 8Tracks. Must be active tab in Chrome or Firefox and requires applet to run correctly."; playerLink.Text = "Open 8Tracks"; break; case MusicPlayers.iTunes: infolb.Text = "Shows song playing in iTunes."; playerLink.Text = "Open iTunes"; break; case MusicPlayers.Nightbot: infolb.Text = "Shows song playing in Nightbot."; playerLink.Text = "Open Nightbot"; break; case MusicPlayers.Zune: infolb.Text = "Shows song playing in Zune."; playerLink.Text = "Open Zune"; break; case MusicPlayers.Jriver: infolb.Text = "Shows song playing in Jriver Media Center."; playerLink.Text = "Open Jriver Media Center"; break; case MusicPlayers.WindowsMP: infolb.Text = "Shows song playing in Windows Media PPlayer. "; playerLink.Text = "Open Windows Media Player"; break; } }