Ejemplo n.º 1
0
 private void tsbtnMapView_Click(object sender, EventArgs e)
 {
     //FormMap fm = (FormMap)Application.OpenForms[MapViewer.Text];
     try
     {
         if (MapViewer == null)
         {
             MapViewer = new FormMap();
         }
         else if (MapViewer.Visible)
         {
             MapViewer.Activate();
         }
         else
         {
             MapViewer = new FormMap();
         }
     }
     catch
     {
         MapViewer = new FormMap();
     }
     MapViewer.Tag = lastMapProvider;
     MapViewer.Show();
 }
Ejemplo n.º 2
0
        private void tsbtnMapView_Click(object sender, EventArgs e)
        {
            //FormMap fm = (FormMap)Application.OpenForms[MapViewer.Text];
            if (tsbtnMapView.DropDownButtonPressed)
            {
                return;
            }

            if (MapViewer != null)
            {
                lastMapProvider = MapViewer.lastMapProvider;
                lastLat         = MapViewer.lastLat;
                lastLon         = MapViewer.lastLon;
                mapX            = MapViewer.Left;
                mapY            = MapViewer.Top;
                mapW            = MapViewer.Width;
                mapH            = MapViewer.Height;
            }
            try
            {
                if (MapViewer == null)
                {
                    MapViewer = new FormMap();
                }
                else if (MapViewer.Visible)
                {
                    MapViewer.Activate();
                }
                else
                {
                    MapViewer = new FormMap();
                }
            }
            catch
            {
                MapViewer = new FormMap();
            }
            MapViewer.lastMapProvider = lastMapProvider;
            MapViewer.lastLat         = lastLat;
            MapViewer.lastLon         = lastLon;
            MapViewer.Tag             = lastMapProvider;
            MapViewer.proxyOn         = proxyOn;
            MapViewer.proxyHost       = proxyHost;
            MapViewer.proxyUser       = proxyUser;
            MapViewer.proxyPass       = proxyPass;

            MapViewer.Show();
            MapViewer.Left   = mapX;
            MapViewer.Top    = mapY;
            MapViewer.Width  = mapW;
            MapViewer.Height = mapH;

            if (explorerBrowser.SelectedItems.Count > 0)
            {
                ShowSelectedImage(true);
            }
        }