Esempio n. 1
0
 private void WindowClosing(object sender, CancelEventArgs e)
 {
     FileDownloader.Kill();
     VlcApi.Kill();
     PodcastFunctions.Kill();
     WindowPlacementHandler.GetPlacement(new WindowInteropHelper(this).Handle);
 }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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;
        }