private void geckoWebBrowser1_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { if (Regex.IsMatch(e.Uri?.Segments?.LastOrDefault() ?? "", @"join\/?", RegexOptions.IgnoreCase) || (e.Uri?.Host ?? "").ToLower() != (Defaults.Web.STEAM_JOIN_URI?.Host?.ToLower() ?? "NULL")) { Logger.Trace("Navigated to /join/."); return; } try { Logger.Info("Stopping navigation to new location..."); e.Cancel = true; } catch (Exception ex) { Logger.Error("Failed to stop navigation...", ex); try { geckoWebBrowser1.Navigate(Defaults.Web.STEAM_JOIN_ADDRESS); } catch (Exception exNav) { Logger.Error("Navigation error", exNav); } } }
private void webBrowser1_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { try { refreshbtn.Image = Fireweb.Properties.Resources._stop; refreshbtn.Tooltip = "Stop"; } catch { } }
private void GeckoWebBrowser_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { cntBox.Visibility = Visibility.Hidden; if (e.Uri.ToString().Contains(Request.RedirectURL)) { Dispatcher.Invoke(new Action(() => { GetLoginResult(e.Uri.ToString()); })); e.Cancel = true; } }
private void browser_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { this.Loader_on(); bool joined = e.Uri.LocalPath.ToLower().Contains("chat"); if (joined) { this.Close(); this.Dispose(true); new Home(Data.URL).ShowDialog(); } }
private void webBrowser1_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { if (!fromHistory) { if (HistoryStack_Index < HistoryStack.Count) { HistoryStack.RemoveRange(HistoryStack_Index, HistoryStack.Count - HistoryStack_Index); } HistoryStack.Add(e.Uri); HistoryStack_Index++; UpdateNavButtons(); } fromHistory = false; if (e.Uri.Segments[e.Uri.Segments.Length - 1].EndsWith(".zip") || e.Uri.Segments[e.Uri.Segments.Length - 1].EndsWith(".rar")) { file = "Mod.zip"; if (e.Uri.Segments[e.Uri.Segments.Length - 1].EndsWith(".rar")) { file = "Mod.rar"; } var url = e.Uri; e.Cancel = true; using (WebClient WC = new WebClient()) { try { if (System.IO.File.Exists(Path.Combine(DirectoryOperations.getFolder("ExeFolder"), file))) { System.IO.File.Delete(Path.Combine(DirectoryOperations.getFolder("ExeFolder"), file)); } WC.Headers.Add("user-agent", "SDVMM/Version: 1.0"); WC.DownloadFileAsync(url, Path.Combine(DirectoryOperations.getFolder("ExeFolder"), file)); WC.DownloadFileCompleted += new AsyncCompletedEventHandler(WC_DownloadFileCompleted); } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }
private void webBrowser1_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { pictureBox3.Image = Properties.Resources.stop; nav = true; }
private void Browser_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { loadingCircle1.Visible = true; }
private void browser_Navigating(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { // if navigating to the login page ... either exit or show login + mbox(you have logged out) //if (e.Uri.LocalPath == "/") // MessageBox.Show(e.Uri.LocalPath); }
private void NavigationColor(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { urlBox.BackColor = Color.Lavender; }