private void addFOB(object obj, EventArgs e) { var icon = new Icon(PanAndZoom.fromLocalToGlobal(editor.LeftClickPoint), startPosNumber++, IconType.CV); scenarioItems.Add(icon); editor.addScenarioItem(icon, true); }
private void addSeaSpawn(object obj, EventArgs e) { var spawn = new Spawn(PanAndZoom.fromLocalToGlobal(editor.LeftClickPoint), spawnNumber++, SpawnType.Sea); scenarioItems.Add(spawn); editor.addScenarioItem(spawn, true); }
private void addLandSpawn(object obj, EventArgs e) { var spawn = new Spawn(PanAndZoom.fromLocalToGlobal(editor.LeftClickPoint), spawnNumber, SpawnType.Land); scenarioItems.Add(spawn); editor.addScenarioItem(spawn, true); //Console.WriteLine("add land spawn"); }
public Outline(Point center) { var sideLength = 50; center.Offset(-sideLength / 2, -sideLength / 2); nodes.Add(PanAndZoom.fromLocalToGlobal(center)); center.Offset(0, sideLength); nodes.Add(PanAndZoom.fromLocalToGlobal(center)); center.Offset(sideLength, 0); nodes.Add(PanAndZoom.fromLocalToGlobal(center)); center.Offset(0, -sideLength); nodes.Add(PanAndZoom.fromLocalToGlobal(center)); //parent.Controls.Add(this); //BringToFront(); foreach (var n in nodes) { var marker = new VertexMarker(); marker.setPosition(n); marker.MouseClick += new MouseEventHandler(deleteMarker); markers.Add(marker); marker.BringToFront(); var c = new CreaterMarker(); c.MouseClick += new MouseEventHandler(createMarker); //parent.Controls.Add(c); creaters.Add(c); } paintEvent = new PaintEventHandler(paint); }