예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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");
        }
예제 #4
0
        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);
        }