private void EndWalkthrough() { LastStateAction?.Invoke(); imageBox.SelectNone(); if (anchorPlaceholderControls.TrueForAll(x => x.IsInitialized) && testPointPlaceholderControl.IsInitialized) { List <Template.AnchorAlignmentMethod.Anchor> anchors = new List <Template.AnchorAlignmentMethod.Anchor>(); for (int i = 0; i < anchorPlaceholderControls.Count; i++) { anchors.Add(anchorPlaceholderControls[i].GetAnchor); } Template.AnchorAlignmentMethod.Anchor testPointAnchor = testPointPlaceholderControl.GetAnchor; if (referenceAnchorAlignmentMethod != null) { referenceAnchorAlignmentMethod.SetAnchors(anchors); referenceAnchorAlignmentMethod.SetTestAnchor(testPointAnchor); OnConfigurationFinishedEvent?.Invoke(referenceAnchorAlignmentMethod); } else { Template.AnchorAlignmentMethod anchorAlignmentMethod = new Template.AnchorAlignmentMethod(anchors, testPointAnchor, templateImage.Size, pipelineIndex, methodName, selectedSize, selectedScale); OnConfigurationFinishedEvent?.Invoke(anchorAlignmentMethod); } ValidateState(); } else { InvalidateState(); } }
private void FinishBtn_Click(object sender, EventArgs e) { string name = icrRegionNameTextBox.Text; if (ValidateName(name)) { RegionName = name; OnConfigurationFinishedEvent?.Invoke(RegionName); } }
private void EndWalkthrough() { LastStateAction?.Invoke(); if (!isCurrentSetActionCompleted) { InvalidateState(); return; } imageBox.SelectNone(); var tmpImg = new Template.TemplateImage(selectedSize, selectedScale, selectedDeskewAngle); tmpImg.SetBitmap(TemplateImage.Bitmap); if (referenceTemplate != null) { tmpImg.ImageLocation = referenceTemplate.GetTemplateImage.ImageLocation; } OnConfigurationFinishedEvent?.Invoke(this, tmpImg, alignmentMethods, alignmentPipelineResults); }
private void FinishBtn_Click(object sender, EventArgs e) { OnConfigurationFinishedEvent?.Invoke(AlignmentMethods); }
private void DoneBtn_Click(object sender, EventArgs e) { OnConfigurationFinishedEvent?.Invoke(selectedRegistrationAlignmentMethod); }