Beispiel #1
0
        internal override void Paint(PaintEventArgs e)
        {
            //здесь будет отрисовка линии
            System.Drawing.Point pBegin = Layer.Map.MapToScreen(_begin);
            System.Drawing.Point pEnd   = Layer.Map.MapToScreen(_end);
            Pen pen;

            int a = 0;

            pen = (Pen)OwnPen.Clone();
            if (Selected)
            {
                a = mm.comboBox1.SelectedIndex;
                if (mm.GetGG == 1)
                {
                    pen.Color = Color.Green;
                }
                else if (mm.GetGG == 2)
                {
                    pen.Color = Color.Red;
                }
                else if (mm.GetGG == 3)
                {
                    pen.Color = Color.Blue;
                }
                else
                {
                    pen.Color = Color.Gray;
                }
                pen.Width++;
            }

            e.Graphics.DrawLine(pen, pBegin, pEnd);
        }
Beispiel #2
0
        internal override void Paint(PaintEventArgs e)
        {
            //здесь будет отрисовка линии
            System.Drawing.Point pBegin = Layer.Map.MapToScreen(_begin);
            System.Drawing.Point pEnd   = Layer.Map.MapToScreen(_end);
            Pen pen;

            pen = (Pen)OwnPen.Clone();
            if (Selected)
            {
                pen.Color = Color.Yellow;
                pen.Width++;
            }

            e.Graphics.DrawLine(pen, pBegin, pEnd);
        }
Beispiel #3
0
        internal override void Paint(PaintEventArgs e)
        {
            List <System.Drawing.Point> points = new List <System.Drawing.Point>();

            foreach (Node node in _nodes)
            {
                System.Drawing.Point point = Layer.Map.MapToScreen(node);
                points.Add(point);
            }
            Pen pen;

            pen = (Pen)OwnPen.Clone();
            if (Selected)
            {
                pen.Color = Color.Yellow;
                pen.Width++;
            }
            e.Graphics.DrawLines(pen, points.ToArray());
        }