/// <summary>
        /// 确定第一个点
        /// </summary>
        /// <param name="iDstanceTwo_"></param>
        /// <param name="iRect_"></param>
        /// <returns></returns>
        public bool Set_QueDingDiYiGeDian(IDistanceTwoPointShuJu iDstanceTwo_, Object diYiGeDian_)
        {
            bool ok  = false;
            var  ir_ = diYiGeDian_ as IRectShuJuPianYi;

            if ((ir_ is IRectShuJuPianYi))
            {
                if (ir_.Column != null)
                {
                    iDstanceTwo_.IrectShuJuPianYiOne = ir_;
                    ok = true;
                }
            }
            return(ok);
        }
        /// <summary>
        /// 显示数据
        /// </summary>
        /// <param name="iDstanceTwo_"></param>
        /// <param name="list_One"></param>
        /// <param name="list_Two"></param>
        public void Set_showParameter(IDistanceTwoPointShuJu iDstanceTwo_, ListBox list_One, ListBox list_Two)
        {
            iDstanceTwo_.PathOne = this.panDuanToolShiFouCunZai(iDstanceTwo_.PathOne);
            if (iDstanceTwo_.PathOne == "")
            {
                iDstanceTwo_.IrectShuJuPianYiOne = null;
            }
            else
            {
                list_One.Items.Add(iDstanceTwo_.PathOne);
            }

            iDstanceTwo_.PathTwo = this.panDuanToolShiFouCunZai(iDstanceTwo_.PathTwo);
            if (iDstanceTwo_.PathTwo == "")
            {
                iDstanceTwo_.IrectShuJuPianYiTwo = null;
            }
            else
            {
                list_Two.Items.Add(iDstanceTwo_.PathTwo);
            }
        }
Exemplo n.º 3
0
        private void ParentFrm_Load(object sender, EventArgs e)
        {
            halconWinControl_ROI1.init();
            halconWinControl_ROI1.Repaint += ROIMoveEvent;

            _read += read_one_image;
            _run  += run;

            #region 第一个点树
            //TreeNode tr_0 = new TreeNode();
            //tr_0.Text = "驱动1";
            //tr_0.Name = "System_1"; //新建一个驱动
            //if (treeView1.Nodes != null)
            //{
            //    treeView1.Nodes.Clear();
            //}//清空树
            //TreeStatic.load_MultTreeNode_To_TreeNode_ContainsSelf(tr_0, _ICheckStr.Check_Root);
            //treeView1.Nodes.Add(tr_0);//添加一个检测
            //treeView1.ExpandAll();

            MultTree.operationTreeViewTool.initTreeView(treeView1, _ICheckStr.Check_Root);

            #endregion

            #region   第二个点树
            //TreeNode tr_1 = new TreeNode();
            //tr_1.Text = "驱动1";
            //tr_1.Name = "System_1"; //新建一个驱动

            //if (treeView2.Nodes != null)
            //{
            //    treeView2.Nodes.Clear();
            //}//清空树

            //TreeStatic.load_MultTreeNode_To_TreeNode_ContainsSelf(tr_1, _ICheckStr.Check_Root);

            //treeView2.Nodes.Add(tr_1);//添加一个检测
            //treeView2.ExpandAll();

            MultTree.operationTreeViewTool.initTreeView(treeView2, _ICheckStr.Check_Root);

            #endregion

            #region  初始化工具
            _setDistanceTwo = new Set_DistanceTwoPiont();
            #endregion

#if DEBUG == true
            if (TreeStatic.Mult_Tree_Node.Obj == null)
            {
                _iDistanceTwoPoint = new DistanceTwoPointShuJu();
            }
            else
            {
                _iDistanceTwoPoint = (DistanceTwoPointShuJu)TreeStatic.Mult_Tree_Node.Obj;
            }
#else
#endif

            #region   步定位点
            this._setDistanceTwo.Set_showParameter(_iDistanceTwoPoint, listBox_DiYiGeDian, listBox_DiErGeDingWeiDian);
            #endregion
        }