コード例 #1
0
 private void Frm_PArray_Load(object sender, EventArgs e)
 {
     ftemp = (FormMain)this.Owner;
 }
コード例 #2
0
        private void Form_SolderSet_Load(object sender, EventArgs e)
        {
            ftemp       = (FormMain)this.Owner;
            hWndCtrller = new HWndCtrllerEx(this.hWindowControl0)
            {
                UseThreadEnable = true
            };
            hWindowControl0.SizeChanged += (s, ev) => { hWndCtrller.Repaint(); };
            hWindowControl0.HMouseDown  += HWindowControl0_HMouseDown;
            hWindowControl0.HMouseMove  += HWindowControl0_HMouseMove;
            hWindowControl0.HMouseUp    += HWindowControl0_HMouseUp;
            HOperatorSet.SetFont(hWindowControl0.HalconWindow, "-Arial-40-*-1-*-*-1-ANSI_CHARSET-");

            this.treeView1.HideSelection = false;
            this.treeView1.DrawMode      = TreeViewDrawMode.OwnerDrawText;
            this.treeView1.DrawNode     += new DrawTreeNodeEventHandler(treeView1_DrawNode);

            ((HWndCtrllerEx)hWndCtrller).Paint += Form_SolderSet_Paint;

            switch (_id)
            {
            case LEFT_SOLDER:
                //textBox1.Text = FormMain.RunProcess.LogicData.RunData.sNumL.ToString();
                numericUpDown1.Visible = label1.Visible = false;
                Functions.SetBinding(numericUpDown1, "Value", FormMain.RunProcess.LogicData.RunData, "sNumL");

                locationShapes = VisionProject.Instance.VisionTools.SolderLeft;
                _SolderPos     = FormMain.RunProcess.LogicData.vData.vSolderDatasL;
                break;

            case RIGHT_SOLSER:
                //textBox1.Text = FormMain.RunProcess.LogicData.RunData.sNumR.ToString();
                numericUpDown1.Visible = label1.Visible = false;
                Functions.SetBinding(numericUpDown1, "Value", FormMain.RunProcess.LogicData.RunData, "sNumR");

                locationShapes = VisionProject.Instance.VisionTools.SolderRight;
                _SolderPos     = FormMain.RunProcess.LogicData.vData.vSolderDatasR;
                break;

            case LEFT_POLISH:
                //textBox1.Text = FormMain.RunProcess.LogicData.RunData.pNumL.ToString();
                numericUpDown1.Visible = label1.Visible = true;
                Functions.SetBinding(numericUpDown1, "Value", FormMain.RunProcess.LogicData.RunData, "pNumL");

                locationShapes = VisionProject.Instance.VisionTools.PolishLeft;
                _polishPos     = FormMain.RunProcess.LogicData.vData.vPolishDatasL;
                break;

            case RIGHT_POLISH:
                //textBox1.Text = FormMain.RunProcess.LogicData.RunData.pNumR.ToString();
                numericUpDown1.Visible = label1.Visible = true;
                Functions.SetBinding(numericUpDown1, "Value", FormMain.RunProcess.LogicData.RunData, "pNumR");

                locationShapes = VisionProject.Instance.VisionTools.PolishRight;
                _polishPos     = FormMain.RunProcess.LogicData.vData.vPolishDatasR;
                break;
            }


            DispalyModelCombox();


            button5.Enabled = button9.Enabled = button8.Enabled = true;// false;
            if (comboBox1.Items.Count == 0)
            {
                button2_Click(null, EventArgs.Empty);
            }
        }