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

            this.map = map;
            var skyView = new SkyView();

            skyView.SkyMap            = map;
            skyView.MouseDoubleClick += (o, e) => GetMapDoubleClick(this)?.Execute(new PointF(e.X, e.Y));
            skyView.MouseClick       += SkyView_MouseClick;
            skyView.MouseMove        += SkyView_MouseMove;
            skyView.MouseWheel       += (o, e) => GetMapZoom(this)?.Execute(e.Delta);
            Host.Loaded  += (o, e) => WF.Application.AddMessageFilter(this);
            Host.KeyDown += (o, e) => GetMapKeyDown(this)?.Execute(e);
            Host.Child    = skyView;

            this.Loaded += MainWindow_Loaded;
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
Example #2
0
 public MapContext(SkyMap map, SkyContext skyContext)
 {
     this.map        = map;
     this.skyContext = skyContext;
 }