Example #1
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            byte[] SendBytes = null;
            //MessageBox.Show(HexToStr("05"));
            //MarkCom.SendCmdToMark(txtSend.Text);
            MarkCom.SendCmdToMark(SendBytes);
            //MarkCom.SendCmdToMark("98");
            //txtRecv.Text = MarkCom.Recv;//MarkCom.bRecv.ToString();

            //txtRecv.Text = HexToStr(MarkCom.Recv);
        }
Example #2
0
        //Load事件
        private void StartForm_Load(object sender, EventArgs e)
        {
            threadList.Add(ThreadHome);
            //  MainControls = new MainControl("运动流程任务", m_WeldingTaskGroup);

            //  MessageBox.Show(testDt.COMM.PortName);
            // testDt.DataReceivedstr = "2";
            hiPerfTimer = new HiPerfTimer();
            resetTimer  = new HiPerfTimer();

            frmOperator          = new FormOperator();
            frmOperator.TopLevel = false;
            panelOP.Controls.Add(frmOperator);
            frmOperator.Size = panelOP.Size;
            frmOperator.Show();
            FormOperator.startButtonPushed += StartClick;
            FormOperator.stopButtonPushed  += StopClick;
            frmOperator.homeButtonPushed   += Home;
            frmOperator.resetUp            += ResetUp;
            frmOperator.resetDown          += ResetDown;

            // lb_Yield.Text = Properties.Settings.Default.Yield.ToString();
            // lb_OKYield.Text = Properties.Settings.Default.OKYield.ToString();
            //  lb_NGYield.Text = Properties.Settings.Default.NGYield.ToString();



            m_MarkJetTaskGroup = new TaskGroup();
            // m_FeederTask = new ComeOut_process("上料托盘任务", m_MarkJetTaskGroup);
            //  m_TransferTask = new Weld_Process("移载任务", m_MarkJetTaskGroup);
            // m_MarkTask = new MarkTask("打标任务", m_MarkJetTaskGroup);
            //  m_JetTask = new Laser_PowerOn_And_Off("喷码任务", m_MarkJetTaskGroup);
            MainControls = MainControl.Instance();
            ///   MainControlLe = MainControlLeft.Instance();
            // m_BlankingTrayTask = new Feed_process("下料托盘任务",m_MarkJetTaskGroup);

            // m_MarkJetTaskGroup.AddTaskUnit(m_FeederTask);
            //m_MarkJetTaskGroup.AddTaskUnit(m_MarkTask);
            //m_MarkJetTaskGroup.AddTaskUnit(m_TransferTask);
            // m_MarkJetTaskGroup.AddTaskUnit(m_JetTask);
            m_MarkJetTaskGroup.AddTaskUnit(MainControls);
            // m_MarkJetTaskGroup.AddTaskUnit(MainControlLe);
            // m_MarkJetTaskGroup.AddTaskUnit(m_BlankingTrayTask);

            m_MarkJetTaskGroup.StartThread();
            //cbIgnoreCCD.Checked = Properties.Settings.Default.IgnoreCCD;

            MarkCom.MarkReadWrite();

            Methods = new Method();
            //视觉定位系统.FormMain ccdForm = new 视觉定位系统.FormMain();
            //ccdForm.FormBorderStyle = FormBorderStyle.None;
            //ccdForm.TopLevel = false;
            //panelCCD.Controls.Add(ccdForm);
            //ccdForm.Size = panelCCD.Size;
            //ccdForm.Show();
            //try
            //{
            //    EXEToWinform showCCDForm = new EXEToWinform(this.panelCCD, "CCD");
            //    showCCDForm.Start(@"E:\优尔数控软件发布V6.4\ur-soft.exe");
            //}
            //catch (Exception)
            //{
            //    MessageBox.Show("激光器软件加载失败");
            //}
            //注册监听
            Weld_Log.Level_Log_CallBack += Level_Log_CallBack;
        }