Esempio n. 1
0
        public LayoutPresenter(IAppContext context, ILayoutView view, TileLoadingService loadingService)
            : base(view)
        {
            _context        = context;
            _loadingService = loadingService;
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (loadingService == null)
            {
                throw new ArgumentNullException("loadingService");
            }

            View.LayoutControl.NewElement           += OnNewElement;
            View.LayoutControl.ElementDoubleClicked += OnElementDoubleClicked;

            _loadingService.Start += OnLoadingServiceStart;
            _loadingService.End   += OnLoadingServiceEnd;
        }
Esempio n. 2
0
        public void Initialize(IPrintableMap map, TileLoadingService loadingService)
        {
            // TODO: assign page settings explicitly
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }
            if (loadingService == null)
            {
                throw new ArgumentNullException("loadingService");
            }

            _map            = map;
            _loadingService = loadingService;
            _loadingService.Initialize(_map, this);

            _initialized = true;

            ZoomFitToScreen();

            UpdateScrollBars();
        }