Exemple #1
0
        public formWmsPreview()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            MapInfo.Engine.Session.Current.CoordSysFactory.LoadDefaultProjectionFile();

            _capabilitiesStyleState = new WmsStyleState(textBoxStyle);
            _clientStyleState       = new WmsStyleState(textBoxLayerStyle);

            _capabilitiesLayerState = new WmsLayerState(null, comboBoxStyle, _capabilitiesStyleState);
            _clientLayerState       = new WmsLayerState(null, comboBoxLayerStyle, _clientStyleState);

            _srsState = new WmsSrsState(textBoxSrsDescription);

            _wmsCapabilitiesState = new WmsCapabilitiesState(textBoxURL, textBoxVersion, treeViewServerLayers, comboBoxImageFormat, _capabilitiesLayerState);
            _wmsClientState       = new WmsClientState(comboBoxImageFormat, checkBoxTransparent, pictureBoxColor, comboBoxProjection, _srsState, listBoxClientLayers, _clientLayerState);
            _featureLayerState    = new FeatureLayerState(mapControlWms);
            _serverList           = new ServerList(comboBoxServers);

            _currentToolButton                 = toolBarButtonZoomIn;
            _currentToolButton.Pushed          = true;
            mapControlWms.Tools.LeftButtonTool = _currentToolButton.Tag as string;
            mapControlWms.Map.DrawEvent       += new MapInfo.Mapping.MapDrawEventHandler(Map_DrawEvent);
            mapControlWms.PaintException      += new PaintExceptionEventHandler(mapControlWms_PaintException);

            ToolBarSetup();
            _serverList.Set();
        }
        public formWmsPreview()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            MapInfo.Engine.Session.Current.CoordSysFactory.LoadDefaultProjectionFile();

            _capabilitiesStyleState = new WmsStyleState(textBoxStyle);
            _clientStyleState = new WmsStyleState(textBoxLayerStyle);

            _capabilitiesLayerState = new WmsLayerState(null, comboBoxStyle, _capabilitiesStyleState);
            _clientLayerState = new WmsLayerState(null, comboBoxLayerStyle, _clientStyleState);

            _srsState = new WmsSrsState(textBoxSrsDescription);

            _wmsCapabilitiesState = new WmsCapabilitiesState(textBoxURL, textBoxVersion, treeViewServerLayers, comboBoxImageFormat, _capabilitiesLayerState);
            _wmsClientState = new WmsClientState(comboBoxImageFormat, checkBoxTransparent, pictureBoxColor, comboBoxProjection, _srsState, listBoxClientLayers, _clientLayerState);
            _featureLayerState = new FeatureLayerState(mapControlWms);
            _serverList = new ServerList(comboBoxServers);

            _currentToolButton = toolBarButtonZoomIn;
            _currentToolButton.Pushed = true;
            mapControlWms.Tools.LeftButtonTool = _currentToolButton.Tag as string;
            mapControlWms.Map.DrawEvent += new MapInfo.Mapping.MapDrawEventHandler(Map_DrawEvent);
            mapControlWms.PaintException += new PaintExceptionEventHandler(mapControlWms_PaintException);

            ToolBarSetup();
            _serverList.Set();
        }