/// <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; } } } }
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; } } }
private void ContinueFire() { FlickCount++; if (_flickCount == this.activeCircle.InnerCircles.Count) { Flashing = false; } else { if (SerialPortManager.GetInstance() != null) { LaserC71Request c71 = new LaserC71Request(); var bytes = SerialPortManager.GetInstance().Encode(c71); SerialPortManager.GetInstance().SendData(bytes); } SendAlignmentMotorPoint(); } }