Esempio n. 1
0
        /// <summary>
        /// This is invoked when the user clicks on the notification bar "Download" button.
        /// </summary>
        public void DownloadNewClientVersion(object obj)
        {
            try
            {
                if (_latestClientVersionInformation == null)
                {
                    Logging.Warn("No latest client information to work with???  Cannot download.");
                    return;
                }

                //  for the moment, just use the first download location
                string download_source = _latestClientVersionInformation.DownloadLocations[0].Trim();
                Logging.Info("Download source in update file is {0}", download_source);
                if (0 == download_source.CompareTo("@WEB_BASE@"))
                {
                    download_source = _clientSetupUrl;
                }
                Logging.Info("Download source that we will use is {0}", download_source);


                if (_isTestEnvironment)
                {
                    download_source = download_source.Replace("www.", "www.test.");
                    Logging.Warn("Modified download source to use test.lexlens.com: " + download_source);
                }

                Logging.Info("Kicking off browser to download the latest client version from: {0}", download_source);
                BrowserStarter.OpenBrowser(download_source);
                Logging.Info("Finished starting browser to download latest client.");
            }
            catch (Exception e)
            {
                Logging.Error(e, "Problem kicking off download for new client version");
            }
        }
 public void OpenUrlInBrowser(string url, bool force_external_browser)
 {
     if (force_external_browser || ConfigurationManager.Instance.ConfigurationRecord.System_UseExternalWebBrowser)
     {
         BrowserStarter.OpenBrowser(url);
     }
     else
     {
         WebBrowserHostControl web_browser_control = OpenWebBrowser();
         web_browser_control.OpenUrl(url);
     }
 }
 public static void OpenWebsite(string url)
 {
     BrowserStarter.OpenBrowser(url);
 }