Beispiel #1
0
 public void paint_clone(ImagePath ip)
 {
     temp_panel             = new Panel();
     temp_panel.AutoScroll  = true;
     temp_panel.Dock        = DockStyle.Top;
     temp_panel.Height      = 50;
     temp_panel.BorderStyle = BorderStyle.FixedSingle;
     body.Controls.Add(temp_panel);
     foreach (img i in ip.get_array)
     {
         temp_picbox     = new PictureBox();
         temp_picbox.Tag = i.path;
         try {
             fs = new FileStream(i.path, FileMode.Open);
             temp_picbox.Image = Image.FromStream(fs);
             fs.Close();
         }
         catch (ArgumentException e) {
             temp_picbox.Image = Properties.Resources.errorfile;
         }
         temp_picbox.SizeMode     = PictureBoxSizeMode.Zoom;
         temp_picbox.Width        = 50;
         temp_picbox.Dock         = DockStyle.Left;
         temp_picbox.DoubleClick += new EventHandler(pic_Click);
         temp_panel.Controls.Add(temp_picbox);
     }
 }
Beispiel #2
0
 public ImagePath generate_paths(int id)
 {
     temp = new ImagePath();
     for (int i = 0; i < mass.Count; i++)
     {
         if (i == id && mass[id].use)
         {
             temp.add_p(mass[id]);
         }
         else if (mass[id].size == mass[i].size && !mass[i].use)
         {
             mass[i].use = true;
             temp.add_p(mass[i]);
         }
     }
     return(temp);
 }