private void gbCapture_Click(object sender, EventArgs e) { switch (ImgCapture.LinkStatus) { case PanelLinkStatus.NONE: break; case PanelLinkStatus.LINK_FAIL: cls_MessageBox.Show("Link error!", "Information"); return; case PanelLinkStatus.LINK_SUCCESS: break; case PanelLinkStatus.LINKING: cls_MessageBox.Show("It is connecting panel,Please wait a few minutes.", "Information"); return; default: cls_MessageBox.Show("No link status!", "Information"); return; } if (ImgCapture.WorkStatus) { if (cls_MessageBox.Show("Are you sure to stop capturing images", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { Application.DoEvents(); ImgCapture.Cancel(); } } else { if (ImgCapture is CapturePKI) { CapturePKI imgCapturePKI = ImgCapture as CapturePKI; imgCapturePKI.pki_config.gianMode = (CapturePKI.ElectricCapacityMode)comboBoxGainMode_Image.SelectedIndex; //imgCapturePKI.FrameCount = 1; imgCapturePKI.RefreshAcquisitionStructureParameters(); imgCapturePKI.pki_config.imageCorrection = CapturePKI.ImageCorrection.Offset; } if (this.ImgCapture is CaptureCareRay) { this.ImgCapture.SetCaptureMode(PanelCaptureMode.Single); (this.ImgCapture as CaptureCareRay).SetCorrection(true); } ImgCapture.Start(); } }
private void gbCapture_Click(object sender, EventArgs e) { switch (ImgCapture.LinkStatus) { case PanelLinkStatus.NONE: break; case PanelLinkStatus.LINK_FAIL: cls_MessageBox.Show("Link error!", "Information"); return; case PanelLinkStatus.LINK_SUCCESS: break; case PanelLinkStatus.LINKING: cls_MessageBox.Show("It is connecting panel,Please wait a few minutes.", "Information"); return; default: cls_MessageBox.Show("No link status!", "Information"); return; } //if (!(ImgCapture is CapturePKI)) //{ // cls_MessageBox.Show("Do not link panel!", "Information"); //} if (ImgCapture.WorkStatus) { if (cls_MessageBox.Show("Are you sure to stop capturing images", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { Application.DoEvents(); ImgCapture.Cancel(); } } else { if (ImgCapture is CapturePKI) { CapturePKI imgCapturePKI = ImgCapture as CapturePKI; SaveFilePath = CapturePub.SaveDFPath + "\\setup" + DateTime.Now.ToString("yyyy.MM.dd.hhmmss"); //imgCapturePKI.pki_config.captureImageMode = CapturePKI.PanelCaptureMode.Sequence; imgCapturePKI.DoseScaleMode = false; imgCapturePKI.RefreshAcquisitionStructureParameters(); } ImgCapture.Start(); } }