Пример #1
0
        public void ConnectMultipleReport()
        {
            IAvpCollection snapshotStepCol = jobStep.FindByType("Step.Snapshot.1");

            for (int i = 0; i < snapshotStepCol.Count; i++)
            {
                if (allMultipleReport == null)
                {
                    allMultipleReport = new ReportConnection[4];
                }
                if (allMultipleReport[i] == null)
                {
                    allMultipleReport[i]            = new ReportConnection();
                    allMultipleReport[i].NewReport += receivedReport_NewReport;
                }

                allMultipleReport[i].Connect(vsDevice, i + 1);
                allMultipleReport[i].DropWhenBusy = false;
                allMultipleReport[i].FreezeMode   = ReportConnection.FreezeModeOptions.SHOW_ALL;

                allMultipleReport[i].DataRecordAdd("Snapshot1.BufOut");

                if (ConnectionEventCallback != null)
                {
                    ConnectionEventCallback.Invoke(Enum_ConnectionEvent.CONNECTED_REPORT, allMultipleReport[i]);
                }
            }
        }
Пример #2
0
 public void ConnectLive(bool startLive)
 {
     if (startLive)
     {
         IAvpCollection inspStepCol = jobStep.FindByType("Step.Inspection.1");
         Step           rootStep    = inspStepCol[1] as Step;
         ConnectSetup(rootStep);
         setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowEverything, false);
         setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowView, true);
         setupManager.ZoomAuto();
         setupManager.LiveVideoStart();
     }
     else
     {
         setupManager.LiveVideoStop();
         setupManager.RootStep = null;
         if (!vsDevice.IsAnyInspectionRunning)
         {
             vsDevice.StartAll();
         }
     }
 }
Пример #3
0
        public void ConnectSetup(Step rootStep)
        {
            if (vsDevice == null || jobStep == null)
            {
                if (ConnectionEventCallback != null)
                {
                    ConnectionEventCallback.Invoke(Enum_ConnectionEvent.ERROR, "ERROR: Device or Job not found!");
                }
                return;
            }
            if (setupManager == null)
            {
                setupManager = new SetupManager();
            }

            if (vsDevice.IsAnyInspectionRunning)
            {
                vsDevice.StopAll();
            }

            if (rootStep == null)
            {
                IAvpCollection inspStepCol = jobStep.FindByType("Step.Inspection.1");
                setupManager.RootStep = inspStepCol[1] as Step;
            }
            else
            {
                setupManager.RootStep = rootStep;
            }

            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowEverything, true);
            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowDatumGrid, false);
            setupManager.OptionLayoutSet(SetupManagerLayoutOptions.ShowStepTree, false);
            setupManager.ZoomAuto();
            setupManager.Acquire();
        }