//Disable GUI controls when forcing the user to complete a task before moving on
 //to something new.  Example, Setting up PMAlign.
 //!_____________________________________________________________________________!//Start
 private void DisableAll(SettingUpConstants butThis)
 {
     //Disable all of the frames (Disables controls within frame)
     //	frmImageAcquisitionFrame.Enabled = false;
     frmPatMax.Enabled = false;
     //Disable all of the tabs except "VisionPro Demo" tab.
     VProAppTab.TabPages[1].Enabled = false;
     VProAppTab.TabPages[2].Enabled = false;
     VProAppTab.TabPages[3].Enabled = false;
     //Based on what the user is doing, Re-enable appropriate frame and disable
     //specific controls within the frame.
     if (butThis == settingUpPatMax)
     {
         frmPatMax.Enabled = true;
         //cmdPatMaxSetupCommand.Text = "OK";
         cmdTeach.Text = "OK";
         cmdPatMaxRunCommand.Enabled = false;
     }
     else if (butThis == settingLiveVideo)
     {
         //	frmImageAcquisitionFrame.Enabled = true;
         cmdImageAcquisitionLiveOrOpenCommand.Text     = "Stop Live";
         cmdImageAcquisitionNewImageCommand.Enabled    = false;
         optImageAcquisitionOptionFrameGrabber.Enabled = false;
         optImageAcquisitionOptionImageFile.Enabled    = false;
     }
 }
 //Enable all of the GUI controls when done a task.  Example, done setting up PMAlign.
 private void EnableAll(SettingUpConstants butThis)
 {
     //frmImageAcquisitionFrame.Enabled = true;
     frmPatMax.Enabled = true;
     VProAppTab.TabPages[1].Enabled = true;
     VProAppTab.TabPages[2].Enabled = true;
     VProAppTab.TabPages[3].Enabled = true;
     if (butThis == settingUpPatMax)
     {
         //cmdPatMaxSetupCommand.Text = "Setup";
         cmdTeach.Text = "Teach";
         cmdPatMaxRunCommand.Enabled = true;
     }
     else if (butThis == settingLiveVideo)
     {
         cmdImageAcquisitionLiveOrOpenCommand.Text     = "Live Video";
         cmdImageAcquisitionNewImageCommand.Enabled    = true;
         optImageAcquisitionOptionFrameGrabber.Enabled = true;
         optImageAcquisitionOptionImageFile.Enabled    = true;
     }
 }