コード例 #1
0
        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();
            }
        }
コード例 #2
0
        private void FinishBtn_Click(object sender, EventArgs e)
        {
            string name = icrRegionNameTextBox.Text;

            if (ValidateName(name))
            {
                RegionName = name;
                OnConfigurationFinishedEvent?.Invoke(RegionName);
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 private void FinishBtn_Click(object sender, EventArgs e)
 {
     OnConfigurationFinishedEvent?.Invoke(AlignmentMethods);
 }
コード例 #5
0
 private void DoneBtn_Click(object sender, EventArgs e)
 {
     OnConfigurationFinishedEvent?.Invoke(selectedRegistrationAlignmentMethod);
 }