Пример #1
0
 private void pictureBox6_MouseClick(object sender, MouseEventArgs e)
 {
     flowLayoutPanel1.Controls.Clear();
     if (hotThingPanels == null)
     {
         hotThingPanels = new List <TodayThingPanel>();
         TodayHotCrawler todayCrawler = new TodayHotCrawler();
         todayCrawler.Crawl();
         foreach (TodayHotPoint todayHotPoint in todayCrawler.list)
         {
             hotThingPanels.Add(new TodayThingPanel(todayHotPoint));
         }
     }
     foreach (TodayThingPanel thingPanel in hotThingPanels)
     {
         flowLayoutPanel1.Controls.Add(thingPanel);
     }
     if (hotThingPanels.Count == 0)
     {
         PictureBox picture = new PictureBox();
         picture.ImageLocation = "../../Resource/net.png";
         picture.SizeMode      = PictureBoxSizeMode.StretchImage;
         this.flowLayoutPanel1.Controls.Add(picture);
     }
     flowLayoutPanel1.Show();
 }
Пример #2
0
 private void pictureBox6_MouseClick(object sender, MouseEventArgs e)
 {
     flowLayoutPanel1.Controls.Clear();
     if (hotThingPanels == null)
     {
         hotThingPanels = new List <ThingPanel>();
         TodayHotCrawler todayCrawler = new TodayHotCrawler();
         todayCrawler.Crawl();
         foreach (TodayHotPoint todayHotPoint in todayCrawler.list)
         {
             hotThingPanels.Add(new ThingPanel(todayHotPoint));
         }
     }
     foreach (ThingPanel thingPanel in hotThingPanels)
     {
         flowLayoutPanel1.Controls.Add(thingPanel);
     }
     flowLayoutPanel1.Show();
 }