public void DrawMovingCutter(Point cur, bool isVertHor) { PbCanvas.Refresh(); if (isVertHor) { cur = ManagerMath.GetPointHorVertLine(cur, Cutter.Points.Last()); } gMove.DrawLine(Cutter.Pen, cur, Cutter.Points.Last()); }
public void DrawMovingLine(Point cur, bool isVertHor) { PbCanvas.Refresh(); if (isVertHor) { InputingLine.SetHorVertLine(cur); } else { InputingLine.B = cur; } InputingLine.Draw(gMove); }
public void ClosePolygon() { if (IsInputPolygon) { IsInputPolygon = false; if (Polygon.Points.Count > 2) { g.DrawLine(Polygon.Pen, Polygon.Points.First(), Polygon.Points.Last()); } else { ClearPolygon(); } PbCanvas.Refresh(); } }
public void CloseCutter() { if (IsInputCutter) { IsInputCutter = false; if (Cutter.Points.Count > 2) { g.DrawLine(Cutter.Pen, Cutter.Points.First(), Cutter.Points.Last()); } else { ClearCutter(); } PbCanvas.Refresh(); } }
private void updateScreen(object sender, EventArgs e) { if (settings.GameOver != true) { movePlayer(); PbCanvas.Invalidate(); if ((snake[0].X == food.X) && (snake[0].Y == food.Y)) { Eat(); } } else { label1.Text = "Game Over! \n" + "Final Score: " + settings.Score + "\nPress Enter to Restart \n"; label1.Visible = true; } }
public void DrawMovingCutter(Point cur) { PbCanvas.Refresh(); Cutter.B = cur; Cutter.Draw(gMove); }