private async void Check_OnClick(object sender, RoutedEventArgs e) { IsChecking = true; if (StreamUrl.ToLower().Contains(".mp3") || StreamUrl.ToLower().Contains(".wma") || StreamUrl.ToLower().Contains(".flac") || StreamUrl.ToLower().Contains(".wav")) { CurrentTrack = new CustomStream { StreamUrl = StreamUrl }; if (await CurrentTrack.CheckTrack()) { CanAddTrack = true; } else { System.Media.SystemSounds.Hand.Play(); CanAddTrack = false; } } else { System.Media.SystemSounds.Hand.Play(); CanAddTrack = false; } IsChecking = false; }
private async void Check_OnClick(object sender, RoutedEventArgs e) { IsChecking = true; CurrentTrack = new CustomStream { StreamUrl = StreamUrl }; if (await CurrentTrack.CheckTrack()) { CanAddTrack = true; } else { System.Media.SystemSounds.Hand.Play(); CanAddTrack = false; } IsChecking = false; }