allow loading of loaderror.html on page load errors
This commit is contained in:
parent
0bd7c40af2
commit
474ea7abae
10 changed files with 908 additions and 6 deletions
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using System.Windows.Forms;
|
||||
using Bunifu.Utils;
|
||||
using CefSharp;
|
||||
using CefSharp.WinForms;
|
||||
using EasyTabs;
|
||||
using XeroBrowser.Properties;
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
@ -13,7 +14,7 @@ namespace XeroBrowser
|
|||
public partial class FrmBrowser : Form
|
||||
{
|
||||
private readonly Uri _fileUri;
|
||||
// Uri _fileUri2;
|
||||
Uri _fileUri2;
|
||||
public FrmBrowser()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
@ -174,9 +175,10 @@ namespace XeroBrowser
|
|||
|
||||
private void chromiumWebBrowser1_LoadError(object sender, LoadErrorEventArgs e)
|
||||
{
|
||||
// string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "loaderror.html");
|
||||
// _fileUri2 = new Uri(filePath);
|
||||
// string fileUrl = _fileUri2.AbsoluteUri;
|
||||
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "loaderror.html");
|
||||
_fileUri2 = new Uri(filePath);
|
||||
string fileUrl = _fileUri2.AbsoluteUri;
|
||||
chromiumWebBrowser1.Load(fileUrl);
|
||||
}
|
||||
|
||||
private void txtSearchOrUrl_KeyUp(object sender, KeyEventArgs e)
|
||||
|
|
Reference in a new issue