Ejemplo n.º 1
0
        public FrmOrderEditor()
        {
            InitializeComponent();
            editModeFl           = false;
            cmdLoadOrder.Enabled = false;

            // delegats:
            loadOrderDataDelegate = new LoadOrderDataDelegate(LoadOrderDataDelegateFunc);
        }
Ejemplo n.º 2
0
        public FrmLoadTray()
        {
            visionActionDelegate = new VisionActionDelegate(VisionActionDelegateFunc);
            InitializeComponent();

            //Add any initialization after the InitializeComponent() call
            cogToolBlockEditV21.LocalDisplayVisible = false;
            mIFTool = new CogImageFileTool();
            //mIFTool.Operator.Open(Environment.GetEnvironmentVariable("VPRO_ROOT") + @"\images\coins.idb", CogImageFileModeConstants.Read);
            mAcqTool = new CogAcqFifoTool();

            toolBlock = cogToolBlockEditV21.Subject;
            try
            {
                // toolBlock = CogSerializer.LoadObjectFromFile(@"C:\PROJECTS\Stahli.Net\Bin\Debug\CognexStahli\Camera1.vpp") as CogToolBlock;  //Need to upload insernt name as given by asaf
                toolBlock = CogSerializer.LoadObjectFromFile(System.IO.Directory.GetCurrentDirectory() + "\\CognexStahli\\Camera1.vpp") as CogToolBlock; //Need to upload insernt name as given by asaf
                //if it is new insert, upload a defult
            }
            catch (Exception ex)
            {
                MessageBox.Show("Tool block is error");
            }
            cogToolBlockEditV21.Subject         = toolBlock;
            cogToolBlockEditV21.Subject.Ran    += new EventHandler(Subject_Ran);
            cogToolBlockEditV21.SubjectChanged += new EventHandler(cogToolBlockEditV21_SubjectChanged);
            foreach (ICogTool tool in toolBlock.Tools)
            {
                calbCheckerBoard = tool as CogCalibCheckerboardTool;
                if (calbCheckerBoard != null)
                {
                    break;
                }
            }

            foreach (ICogTool tool in toolBlock.Tools)
            {
                CalibNPointTool = tool as CogCalibNPointToNPointTool;
                if (CalibNPointTool != null)
                {
                    break;
                }
            }

            foreach (ICogTool tool in toolBlock.Tools)
            {
                cogPMAlignTool = tool as CogPMAlignTool;
                if (cogPMAlignTool != null)
                {
                    break;
                }
            }

            loadOrderDataDelegate = new LoadOrderDataDelegate(LoadOrderDataDelegateFunc);
            // LoadPatternFromFile();   //13.07.15 (Ziv)
        }