protected virtual void OnRaiseXYZEvent(XYZEventArgs e)
        {
            EventHandler <XYZEventArgs> handler = RaiseXYZEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemple #2
0
 // handle positon click event from camera form
 #region camera
 private void OnRaisePositionClickEvent(object sender, XYZEventArgs e)
 {
     if (e.Command.IndexOf("G91") >= 0)
     {
         string final = e.Command;
         if (grbl.isMarlin)
         {
             final += ";G1 ";
         }
         if (e.PosX != null)
         {
             final += string.Format(" X{0}", gcode.frmtNum((float)e.PosX));
         }
         if (e.PosY != null)
         {
             final += string.Format(" Y{0}", gcode.frmtNum((float)e.PosY));
         }
         if (e.PosZ != null)
         {
             final += string.Format(" Z{0}", gcode.frmtNum((float)e.PosZ));
         }
         sendCommands(final.Replace(',', '.'), true);
     }
 }