Пример #1
0
        /// <summary>
        /// fire laser
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void btnFire_Click(object sender, EventArgs e)
        {
            if (Program.EntryForm.Laser != null)
            {
                if (RedLaserEnable())
                {
                    EnableRedLaser();
                    this.btnRedLaser.Text = Properties.Resources.StrEnableRedLaser;
                }
                var fixedLaser = Program.EntryForm.Laser as FixedLaser;
                if (fixedLaser != null)
                {
                    if (serialPortCom != null && !fixedLaser.CenterPoint.IsEmpty && this.richPictureBox.LaserFunction)
                    {
                        Program.EntryForm.Laser.Flashing = !flashing;

                        LaserC71Request c71   = new LaserC71Request();
                        var             bytes = serialPortCom.Encode(c71);
                        serialPortCom.SendData(bytes);
                    }
                    //Coordinate.GetCoordinate().SendAlignmentMotorPoint();
                }
                var activeLaser = Program.EntryForm.Laser as ActiveLaser;
                if (activeLaser != null)
                {
                    if (serialPortCom != null)
                    {
                        activeLaser.Circle++;
                        activeLaser.CircleFire           = true;
                        Program.EntryForm.Laser.Flashing = !flashing;
                    }
                }
            }
        }
Пример #2
0
        private void CheckRedLaserCurrent()
        {
            var c09   = new LaserC09Request();
            var bytes = serialPortCom.Encode(c09);

            serialPortCom.SendData(bytes);
        }
Пример #3
0
        private void EnableRedLaser(bool enable)
        {
            var c70   = new LaserC70Request();
            var bytes = serialPortCom.Encode(c70);

            serialPortCom.SendData(bytes);
            enableRedLaser = enable;
        }
Пример #4
0
        private void btnFire_Click(object sender, EventArgs e)
        {
            var fixedLaser = Program.EntryForm.Laser as FixedLaser;

            if (fixedLaser != null)
            {
                if (serialPortCom != null)
                {
                    Program.EntryForm.Laser.Flashing = !flashing;

                    LaserC71Request c71   = new LaserC71Request();
                    var             bytes = serialPortCom.Encode(c71);
                    serialPortCom.SendData(bytes);
                }
                //Coordinate.GetCoordinate().SendAlignmentMotorPoint();
            }

            var activeLaser = Program.EntryForm.Laser as ActiveLaser;

            if (activeLaser != null)
            {
                if (serialPortCom != null)
                {
                    activeLaser.Circle++;
                    activeLaser.CircleFire           = true;
                    Program.EntryForm.Laser.Flashing = !flashing;
                }
            }
        }
Пример #5
0
        private void CheckLaserInfo()
        {
            LaserC00Request c00   = new LaserC00Request();
            var             bytes = serialPortCom.Encode(c00);

            byte[] recData = serialPortCom.SendData(bytes);
        }
Пример #6
0
        private void CheckLaserInfo()
        {
            LaserC00Request c00   = new LaserC00Request();
            var             bytes = serialPortCom.Encode(c00);

            byte[] recData = serialPortCom.SendData(bytes);
            if (recData != null)
            {
                LaserBaseResponse baseResponse = serialPortCom.LaserBaseResponse(bytes, recData);
                if (baseResponse != null)
                {
                    LaserC00Response c00r = baseResponse as LaserC00Response;
                    if (c00r != null)
                    {
                        lblLaserVersion.Text = c00r.VersionNumber.ToString();
                        lblWorkingHour.Text  = string.Format("{0} : {1}", c00r.Hour, c00r.Month);
                    }
                }
            }
        }