Exemplo n.º 1
0
        private void mnuAddLayers_Click(object sender, EventArgs e)
        {
            OpenFileDialog oFileDialog = new OpenFileDialog();
            oFileDialog.Filter = "ESRI Shapefile(*.shp) | *.shp| All Support Format(*.*) | *.*";
            oFileDialog.Multiselect = true;

            if (oFileDialog.ShowDialog() == DialogResult.OK)
            {
                MapUtil.MapOperation oMapOper = new MapUtil.MapOperation();
                List<string> oLayerPaths = new List<string>(oFileDialog.FileNames);

                oMapOper.LoadLayers(oLayerPaths, GlobeVariables.MapInfosCollection, GlobeVariables.MapControl);
                frmLegend.Instance.LoadLayer();
                frmNavigation.Instance.LoadBackgroudLayer(GlobeVariables.MapInfosCollection.Layers);
            }
        }
Exemplo n.º 2
0
        private void mnuAddLayers_Click(object sender, EventArgs e)
        {
            OpenFileDialog oFileDialog = new OpenFileDialog();

            oFileDialog.Filter      = "ESRI Shapefile(*.shp) | *.shp| All Support Format(*.*) | *.*";
            oFileDialog.Multiselect = true;

            if (oFileDialog.ShowDialog() == DialogResult.OK)
            {
                MapUtil.MapOperation oMapOper    = new MapUtil.MapOperation();
                List <string>        oLayerPaths = new List <string>(oFileDialog.FileNames);

                oMapOper.LoadLayers(oLayerPaths, GlobeVariables.MapInfosCollection, GlobeVariables.MapControl);
                frmLegend.Instance.LoadLayer();
                frmNavigation.Instance.LoadBackgroudLayer(GlobeVariables.MapInfosCollection.Layers);
            }
        }