Esempio n. 1
0
 private void buttonMap_Click(object sender, EventArgs e)
 {
     if (_webBrowser == null)
     {
         _webBrowser = new Controls.GAPPWebBrowser("");
         panel2.Controls.Add(_webBrowser);
     }
     Assembly assembly = Assembly.GetExecutingAssembly();
     using (StreamReader textStreamReader = new StreamReader(assembly.GetManifestResourceStream("GlobalcachingApplication.Utils.Dialogs.GetLocationForm.html")))
     {
         Framework.Data.Location ll = _loc;
         if (ll == null)
         {
             ll = Utils.Conversion.StringToLocation(textBoxLocation.Text);
             if (ll == null)
             {
                 ll = _core.CenterLocation;
             }
         }
         _webBrowser.DocumentText = textStreamReader.ReadToEnd().Replace("$Location$", LanguageSupport.Instance.GetTranslation(STR_LOCATION)).Replace("google.maps.LatLng(0.0, 0.0)", string.Format("google.maps.LatLng({0})", ll.SLatLon));
         timer1.Enabled = true;
     }
 }
Esempio n. 2
0
        private void buttonMap_Click(object sender, EventArgs e)
        {
            if (_webBrowser == null)
            {
                _webBrowser = new Controls.GAPPWebBrowser("");
                panel2.Controls.Add(_webBrowser);
            }
            Assembly assembly = Assembly.GetExecutingAssembly();

            using (StreamReader textStreamReader = new StreamReader(assembly.GetManifestResourceStream("GlobalcachingApplication.Utils.Dialogs.GetLocationForm.html")))
            {
                Framework.Data.Location ll = _loc;
                if (ll == null)
                {
                    ll = Utils.Conversion.StringToLocation(textBoxLocation.Text);
                    if (ll == null)
                    {
                        ll = _core.CenterLocation;
                    }
                }
                _webBrowser.DocumentText = textStreamReader.ReadToEnd().Replace("$Location$", LanguageSupport.Instance.GetTranslation(STR_LOCATION)).Replace("google.maps.LatLng(0.0, 0.0)", string.Format("google.maps.LatLng({0})", ll.SLatLon));
                timer1.Enabled           = true;
            }
        }