private void buttonLoadFace_Click(object sender, EventArgs e)
 {
     try
     {
         FileControls oFile = new FileControls();
         face01 =ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());                
         if (face01 != null)
             pictureBoxFace01.Image = (Image)face01;                    
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void buttonLoadFrame_Click(object sender, EventArgs e)
 {
     clearAllCroppedFacePictureBox();
     resetParameters();
     labelWebCamInfo.Visible = false;
     try
     {
         FileControls oFile = new FileControls();
         Bitmap rawFrameOriginal = oFile.openFile();
         rawFrame = ImageProcessingUtilities.Resize(rawFrameOriginal, workingFrameWidth, workingFrameHeight);
         if (rawFrame != null)
             webCamDisplay.Image = (Image)rawFrame;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void buttonSave_Click(object sender, EventArgs e)
 {
     try
     {                
         FileControls sFile = new FileControls();
         sFile.saveFile(new Bitmap(face01));                
     }
     catch(Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void loadFaceForEntry()
 {
     try
     {
         FileControls oFile = new FileControls();
         switch (selected)
         {
             case 0:
                 pictureBoxProfileFace.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 1:
                 pictureBox1.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 2:
                 pictureBox2.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 3:
                 pictureBox3.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 4:
                 pictureBox4.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 5:
                 pictureBox5.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 6:
                 pictureBox6.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 7:
                 pictureBox7.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 8:
                 pictureBox8.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 9:
                 pictureBox9.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
             case 10:
                 pictureBox10.Image = ImageProcessingUtilities.emguCVconvert2Grayscale(oFile.openFile());
                 break;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }