fixed extension

Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
Matt Bruce 2016-03-21 23:38:38 -05:00
parent e913f609bc
commit b18dbbe8d7

View File

@ -79,7 +79,7 @@ namespace KaraokePlayer
{ {
Song file = (Song)materialListBox1.SelectedItem; Song file = (Song)materialListBox1.SelectedItem;
currentSong = file; currentSong = file;
if (file.Extension.ToLower() == "cdg") if (file.Extension == ".cdg")
{ {
currentPlayer = karaokeCDGPlayer; currentPlayer = karaokeCDGPlayer;
karaokeCDGPlayer.Play(new Uri(Path.ChangeExtension(file.FullPath, ".mp3"))); karaokeCDGPlayer.Play(new Uri(Path.ChangeExtension(file.FullPath, ".mp3")));
@ -87,7 +87,7 @@ namespace KaraokePlayer
karaokeMP4Player.Visible = false; karaokeMP4Player.Visible = false;
karaokeMP4Player.Stop(); karaokeMP4Player.Stop();
} }
else if (file.Extension.ToLower() == "zip") else if (file.Extension == ".zip")
{ {
string playPath = null; string playPath = null;
string extractPath = Path.Combine(Directory.GetCurrentDirectory(), "temp"); string extractPath = Path.Combine(Directory.GetCurrentDirectory(), "temp");