Ejemplo n.º 1
0
        public override void Paint(PaintEventArgs e, PickablePanel p)
        {
            var m = p as MapView;

            Debug.Assert(p != null);
            MapView.DisplayTransform t = m.Transform;
            Graphics g = e.Graphics;
            float    x = t.X(Location.X);
            float    y = t.Y(Location.Y);

            g.FillRectangle(Brush, x - 1, y - 1, 3, 3);
            g.DrawLine(Pen, x, y, x + Offset.X, y + Offset.Y);
            if (Text != null)
            {
                g.DrawString(Text, DrawingHelper.SecondsFont, Brush, x, y + 12);
            }
        }
Ejemplo n.º 2
0
        public TileTester(List <TerrainPatch> patches = null)
        {
            InitializeComponent();
            pnlTiles = new PickablePanel {
                Location = new Point(0, 0), Dock = DockStyle.Fill
            };
            pnlTiles.Paint += pnlTiles_Paint;
            pnlScroll.Controls.Add(pnlTiles);

            _transform = new DisplayTransform {
                OffsetX = 0, OffsetY = 0, Scale = 1f
            };
            Patches = patches;
            if (Patches != null)
            {
                Load(Patches);
            }
            cbWhichHorizon.SelectedIndex = 0;
        }
Ejemplo n.º 3
0
 public virtual void StopDragging(PickablePanel panel)
 {
 }
Ejemplo n.º 4
0
 public virtual void StartDragging(PickablePanel panel)
 {
 }                                                           // not called yet.  Needs work.
Ejemplo n.º 5
0
 public virtual void Deselect(PickablePanel panel)
 {
 }
Ejemplo n.º 6
0
 public virtual void Paint(PaintEventArgs e, PickablePanel p)
 {
     e.Graphics.DrawRectangle(Pens.Red, Bounds.Left, Bounds.Top, Bounds.Width, Bounds.Height);
 }
Ejemplo n.º 7
0
 public override void StopDragging(PickablePanel panel)
 {
     LocationProbeMapLayer.DefaultPropertySheet.StopDragging(this);
 }