示例#1
0
        public MainWindow(SkyMap map)
        {
            InitializeComponent();

            var skyView = new SkyView();

            skyView.SkyMap            = map;
            skyView.MouseDoubleClick += (o, e) => GetMapDoubleClick(this)?.Execute(new PointF((e as WF.MouseEventArgs).X, (e as WF.MouseEventArgs).Y));
            skyView.MouseClick       += SkyView_MouseClick;
            skyView.MouseMove        += (o, e) => { skyView.Focus(); SetMousePosition(this, new PointF(e.X, e.Y)); };
            skyView.MouseWheel       += (o, e) => GetMapZoom(this)?.Execute(e.Delta);
            Host.KeyDown             += (o, e) => GetMapKeyDown(this)?.Execute(e.Key);
            Host.Child = skyView;
        }
示例#2
0
 public MapContext(SkyMap map, SkyContext skyContext)
 {
     this.map        = map;
     this.skyContext = skyContext;
 }