private void FormMain_Paint_BuildCustom(object sender, PaintEventArgs e) { if (!LeftMouseIsHolding) { return; } if (BuildType != ObstacleType.Custom) { return; } Graphics g = e.Graphics; Pen p = new Pen(Color.LightPink, 5f); Obstacle o = new Obstacle_Custom(MouseTraces, IsBuildingMirrors); o.Show(g, p); }
private void FormMain_MouseUp_BuildCustom(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return; } if (BuildType != ObstacleType.Custom) { return; } LeftMouseIsHolding = false; Obstacle NewObstacle = new Obstacle_Custom(MouseTraces, IsBuildingMirrors); Obstacles.Add(NewObstacle); MouseTraces.Clear(); }