public void Update(GrblStatus status) { if (status.gState == null) { return; } if (CopyCoords(status.workingCoords) || lastCoordCode != status.CurrentCoordSystem || lastTool != Global.ginterp.currentTool) { lastCoordCode = status.CurrentCoordSystem; lastTool = Global.ginterp.currentTool; using (Graphics g = viswin.GetOverlayGraphics()) { g.Clear(Color.Transparent); g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; cury = curx = 10; PrintLine(g, "WCO active: " + lastCoordCode + ", T" + lastTool.ToString()); for (int i = 0; i < lastCoords.Length; i++) { PrintLine(g, "WCO " + Utils.GetAxisLetter(i) + ": " + lastCoords[i].ToString("0.000")); } } viswin.UpdateOverlay(); } }
public void Update(GrblStatus status) { if (status.gState == null) { return; } if (CopyCoords(status.workingCoords) || lastCoordCode != status.CurrentCoordSystem) { lastCoordCode = status.CurrentCoordSystem; using (Graphics g = viswin.GetOverlayGraphics()) { g.Clear(Color.Transparent); g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; for (int i = 0; i < lastCoords.Length; i++) { string str = lastCoordCode + " " + Utils.GetAxisLetter(i) + ": " + lastCoords[i].ToString("0.000"); g.DrawString(str, font, Brushes.Black, 10, i * 15 + 10); } } viswin.UpdateOverlay(); } }