Exemple #1
0
        private void lstHaberler_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            Haberler haber = (Haberler)lstHaberler.SelectedItem;

            NewsPhoto.Load(haber.Image);
            lblDescription.Text = haber.Description;
        }
Exemple #2
0
        private void cbKanallar_SelectedIndexChanged(object sender, EventArgs e)
        {
            lstHaberler.Items.Clear();
            string oku = cbKanallar.Items[cbKanallar.SelectedIndex].GetType().GetProperties().First(x => x.Name == "Link").GetValue(cbKanallar.Items[cbKanallar.SelectedIndex], null).ToString();

            Feed feed = FeedReader.Read(oku);


            foreach (FeedItem item in feed.Items)
            {
                Haberler haber = new Haberler();
                haber.Title       = item.Title;
                haber.Link        = item.Link;
                haber.Description = item.Description;
                haber.Image       = item.SpecificItem.Element.Element("image").Value;
                lstHaberler.Items.Add(haber);
            }
        }