Skip to content

Commit 3dd60d8

Browse files
committed
show the address when refreshing or stopping
1 parent 5a6f902 commit 3dd60d8

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

FlashpointSecurePlayer/Shared.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,6 +2099,10 @@ public static string GetValidatedURL(string url) {
20992099
}
21002100

21012101
public static bool TestInternetURI(Uri uri) {
2102+
if (uri == null) {
2103+
return false;
2104+
}
2105+
21022106
if (uri.IsFile) {
21032107
return false;
21042108
}

FlashpointSecurePlayer/WebBrowserMode.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,16 @@ private void ShowToolBar() {
466466
toolBarToolStrip.Visible = !Fullscreen;
467467
}
468468

469+
private void ShowAddress(Uri url) {
470+
if (url == null
471+
|| url.Equals("about:blank")) {
472+
addressToolStripSpringTextBox.Text = String.Empty;
473+
return;
474+
}
475+
476+
addressToolStripSpringTextBox.Text = url.ToString();
477+
}
478+
469479
private bool addressToolStripSpringTextBoxEntered = false;
470480

471481
public void AddressInvalid() {
@@ -503,14 +513,16 @@ public void BrowserStop() {
503513
return;
504514
}
505515

516+
ShowAddress(closableWebBrowser.Url);
506517
closableWebBrowser.Stop();
507518
}
508519

509520
public void BrowserRefresh() {
510521
if (closableWebBrowser == null) {
511522
return;
512523
}
513-
524+
525+
ShowAddress(closableWebBrowser.Url);
514526
closableWebBrowser.Refresh();
515527
}
516528

@@ -726,12 +738,7 @@ private void WebBrowserMode_Deactivate(object sender, EventArgs e) {
726738
}
727739

728740
private void closableWebBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e) {
729-
if (e.Url.Equals("about:blank")) {
730-
addressToolStripSpringTextBox.Text = String.Empty;
731-
return;
732-
}
733-
734-
addressToolStripSpringTextBox.Text = e.Url.ToString();
741+
ShowAddress(e.Url);
735742
}
736743

737744
private readonly object downloadCompletedLock = new object();

0 commit comments

Comments
 (0)