Exemple #1
0
 private void ButtonURL_Click(object sender, EventArgs e)
 {
     try
     {
         if (Validering.CheckIfURLIsValid(textBoxURL.Text).Length > 0)
         {
             if (Validering.CheckIfComboboxIsEmpty(categoryCombobox))
             {
                 PodcastHandler.addPodcast(textBoxURL.Text, categoryCombobox.Text, Int32.Parse(comboBoxUpdateInterval.Text.Substring(0, 2).Trim()));
                 podcastListview = PodcastHandler.updatePodcastListview(podcastListview);
             }
         }
     }
     catch (WebException) { }
 }
        private async void AddPodcastBtn_Click(object sender, EventArgs e)
        {
            string input = urlInput.Text;

            if (validate.IfFeedIsValidFormat(input))
            {
                await pHandler.addPodcast(urlInput.Text, categoryCb.Text, frequencyCb.Text);

                PodcastFeed.Items.Clear();
                FillPodcastFeed();
            }
            else
            {
                using (new CenterWinDialog(this))
                {
                    MessageBox.Show("The URL does not contain a valid RSS feed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }