예제 #1
0
        private void tsbAddFeed_Click(object sender, EventArgs e)
        {
            DialogAddFeed dlg = new DialogAddFeed();

            dlg.StartPosition = FormStartPosition.CenterParent;
            DialogResult result = dlg.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                string url = dlg.Url;

                if (!string.IsNullOrEmpty(url))
                {
                    Podcast podcast = Controller.GetCatalogOfFeed(url);

                    if (podcast == null)
                    {
                        return;
                    }

                    Model.Instance.Podcasts.Add(url, podcast);
                    Model.Instance.SelectedPodcast = podcast;
                    FillUiWithData();
                }
            }
        }
예제 #2
0
파일: View.cs 프로젝트: tycho404/Poddy
        private void tsbAddFeed_Click(object sender, EventArgs e)
        {
            DialogAddFeed dlg = new DialogAddFeed();
              dlg.StartPosition = FormStartPosition.CenterParent;
              DialogResult result = dlg.ShowDialog();
              if (result == System.Windows.Forms.DialogResult.OK)
              {
            string url = dlg.Url;

            if (!string.IsNullOrEmpty(url))
            {
              Podcast podcast = Controller.GetCatalogOfFeed(url);

              if (podcast == null)
            return;

              Model.Instance.Podcasts.Add(url, podcast);
              Model.Instance.SelectedPodcast = podcast;
              FillUiWithData();
            }
              }
        }