private void SystemMap_DrawableView_MouseMove(object sender, MouseEventArgs e)
        {
            if (IsMouseDown == true)
            {
                _camera2.WorldOffset(e.Location - LastLoc);

                LastOffset = e.Location;
                Invalidate();
            }
            LastLoc = (Point)e.Location;
        }
Exemplo n.º 2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            if (_cam != null)
            {
                _cam.WorldOffset(new PointF(-Width / 2, -Height / 2));
            }
            // your custom drawing
            e.Graphics.FillRectangle(Colors.Black, e.ClipRectangle);
            int xIndex = 1;
            int yIndex = 1;
            var icon   = _iconCollection.IconDict[_vm.EBTreePair.Entity.Guid];

            icon.DrawMe(e.Graphics, new PointF(8 * xIndex, 8 * yIndex));

            foreach (var item in _vm.EBTreePair.Blob.ChildrenDBs)
            {
                xIndex++;
                RecursiveDraw(e.Graphics, item, xIndex, yIndex);
            }
        }