Esempio n. 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(textBox1.Text))
     {
         listView1.Clear();
         webBrowser1.Navigate("about:blank");
         CurrentFeed = new feed(textBox1.Text);
         foreach (item feedItem in CurrentFeed.Items)
         {
             ListViewItem listViewItem = new ListViewItem(feedItem.title);
             listViewItem.Name = feedItem.title;
             listView1.Items.Add(listViewItem);
         }
     }
 }
Esempio n. 2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     if (timeLeft > 0)
     {
         timeLeft--;
         label1.Text = timeLeft + " секунд до обновления";
     }
     else
     {
         timer1.Stop();
         countactive = false;
         label1.Text = "Секунд до обновления";
         if (!String.IsNullOrEmpty(textBox1.Text))
         {
             listView1.Clear();
             webBrowser1.Navigate("about:blank");
             CurrentFeed = new feed(textBox1.Text);
             foreach (item feedItem in CurrentFeed.Items)
             {
                 ListViewItem listViewItem = new ListViewItem(feedItem.title);
                 listViewItem.Name = feedItem.title;
                 listView1.Items.Add(listViewItem);
             }
         }
         timer1.Start();
         countactive = true;
         timeLeft = numericUpDown1.Value;
     }
 }