Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
            
            if (DesignMode) return;
            
            LogManager.DefaultLogManager.AddLogger(new TestLogger(consoleControl1));

            _shell = this;
            appManager.Map = map;

            appManager.DockManager = new SpatialDockManager();
            var hc = new MenuBarHeaderControl();
            hc.Initialize(new ToolStripPanel(), msTest);
            appManager.HeaderControl = hc;
            var sss = new SpatialStatusStrip();
                        
            appManager.ProgressHandler = sss;
            appManager.ShowExtensionsDialogMode = ShowExtensionsDialogMode.Default;

            try
            {
                appManager.LoadExtensions();
            }
            finally
            {
                map.FunctionMode = FunctionMode.Pan;
                _infos = new ProjectionInfo[]
                {
                    KnownCoordinateSystems.Projected.World.WebMercator,
                    KnownCoordinateSystems.Projected.Europe.EuropeLambertConformalConic,
                    KnownCoordinateSystems.Projected.World.Sinusoidalworld,
                    KnownCoordinateSystems.Projected.World.Polyconicworld,
                    ProjectionInfo.FromEpsgCode(28992)
                };
                map.Projection = _infos[0];
                map.MouseClick += map_MouseClick;
            }
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();
            
            if (DesignMode) return;
            
            LogManager.DefaultLogManager.AddLogger(new TestLogger(consoleControl1));

            _shell = this;
            appManager.Map = map;

            appManager.DockManager = new SpatialDockManager();
            var hc = new MenuBarHeaderControl();
            hc.Initialize(new ToolStripPanel(), msTest);
            appManager.HeaderControl = hc;
            var sss = new SpatialStatusStrip();
                        
            appManager.ProgressHandler = sss;
            appManager.ShowExtensionsDialogMode = ShowExtensionsDialogMode.Default;

            try
            {
                appManager.LoadExtensions();
            }
            finally
            {
                map.FunctionMode = FunctionMode.Pan;

                // no need for the reprojection feature, testing dutch PDOK services using only DutchRD
                _infos = new ProjectionInfo[]
                {
                    KnownCoordinateSystems.Projected.NationalGrids.DutchRD
                };
                map.Projection = _infos[0];
                map.MouseClick += map_MouseClick;
            }
        }