Advertisement
enos

C#_Simpan

Jul 11th, 2014
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.98 KB | None | 0 0
  1. if (pb5.Image != null)
  2.                     {
  3.                         //pb1.Image = null;
  4.                         pb5.Image = pb4.Image;
  5.                         pb4.Image = pb3.Image;
  6.                         pb3.Image = pb2.Image;
  7.                         pb2.Image = pb1.Image;
  8.                         pb1.Image = face_PICBX.Image;
  9.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  10.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  11.                     }
  12.  
  13.                     if (pb1.Image == null )
  14.                     {
  15.                         pb1.Image = warna.ToBitmap();
  16. //                        pb1.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  17.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  18.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  19.  
  20.                         //test = pictureBox1.Image;
  21.                     }
  22.                     else if (pb2.Image == null)
  23.                     {
  24.                         pb2.Image = pb1.Image;
  25.                         pb1.Image = face_PICBX.Image;
  26.                         //pb1.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  27.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  28.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  29.                     }
  30.                     else if (pb3.Image == null)
  31.                     {
  32.                         pb3.Image = pb2.Image;
  33.                         pb2.Image = pb1.Image;
  34.                         pb1.Image = face_PICBX.Image;
  35.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  36.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  37.  
  38.                     }
  39.                     else if (pb4.Image == null)
  40.                     {
  41.                         pb4.Image = pb3.Image;
  42.                         pb3.Image = pb2.Image;
  43.                         pb2.Image = pb1.Image;
  44.                         pb1.Image = face_PICBX.Image;
  45.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  46.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  47.                     }
  48.                     else if (pb5.Image == null)
  49.                     {
  50.  
  51.                         pb5.Image = pb4.Image;
  52.                         pb4.Image = pb3.Image;
  53.                         pb3.Image = pb2.Image;
  54.                         pb2.Image = pb1.Image;
  55.                         pb1.Image = face_PICBX.Image;
  56.                         face_PICBX.Image.Save(Application.StartupPath + "/TrainedFaces/" + facename);
  57.                         pb6.Image.Save(Application.StartupPath + "/TrainedFaces/" + gambar6);
  58.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement