private void WindowClosing(object sender, CancelEventArgs e) { FileDownloader.Kill(); VlcApi.Kill(); PodcastFunctions.Kill(); WindowPlacementHandler.GetPlacement(new WindowInteropHelper(this).Handle); }
public void TestConnectionCommand() { if (VlcApiConnection != null) { VlcApiConnection.Dispose(); } GC.Collect(); VlcApiConnection = new VlcApi(new LoginCredentials(Hostname, Port, Password)); VlcApiConnection.StatusChanged += (sender, status) => { Status = status; ConnectionString = "Connected"; ConnectionState = true; }; VlcApiConnection.RequestError += (sender, e) => { MessageBox.Show(e.Message); ConnectionString = "Error connecting"; ConnectionState = false; }; VlcApiConnection.StatusRequestCountChanged += (sender, e) => { StatusRequestCount = e; }; VlcApiConnection.RequestStatus(); }
public async Task InitializePodcasts() { isLoading = true; foreach (var pod in config.ConfigObject.PodcastMap.Podcasts) { await pod.Value.CheckForNew(); await pod.Value.FillNewEpisodes(); await pod.Value.CheckForDownloadedEpisodes(); } await PodcastFunctions.UpdateLatestPodcastList().ConfigureAwait(false); await PodcastFunctions.UpdateLatestPlayedList().ConfigureAwait(false); errorData.Error = ""; VlcApi.DoNothing(); isLoading = false; }