Exemplo n.º 1
0
        private void UpdatePodcastBtn_Click(object sender, EventArgs e) //Ska valideras
        {
            string input = urlInput.Text;

            if (validate.IfItemNotSelected(PodcastFeed.SelectedItems.Count))
            {
                if (validate.IfFeedIsValidFormat(input))
                {
                    pHandler.ChangePodcastFromList(PodcastFeed.SelectedItems[0].Text, urlInput.Text, frequencyCb.Text, categoryCb.Text);
                    FillPodcastFeed();
                }
                else
                {
                    using (new CenterWinDialog(this))
                    {
                        MessageBox.Show("You must enter the old or new URL for the podcast.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            else
            {
                using (new CenterWinDialog(this))
                {
                    MessageBox.Show("You must select a podcast to change it.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }