Update
- Hide path to loaderror.html - Added .NET Framework 4.8.1 Requirement in the setup
This commit is contained in:
parent
2570f679b0
commit
8c06dfbca8
2 changed files with 1476 additions and 1441 deletions
|
@ -12,8 +12,8 @@ using XeroBrowser.Properties;
|
||||||
namespace XeroBrowser
|
namespace XeroBrowser
|
||||||
{
|
{
|
||||||
public partial class FrmBrowser : Form
|
public partial class FrmBrowser : Form
|
||||||
{
|
{
|
||||||
private readonly Uri _fileUri;
|
Uri _fileUri;
|
||||||
Uri _fileUri2;
|
Uri _fileUri2;
|
||||||
public FrmBrowser()
|
public FrmBrowser()
|
||||||
{
|
{
|
||||||
|
@ -22,9 +22,15 @@ namespace XeroBrowser
|
||||||
chromiumWebBrowser1.LifeSpanHandler = new LifeSpanHandler();
|
chromiumWebBrowser1.LifeSpanHandler = new LifeSpanHandler();
|
||||||
chromiumWebBrowser1.MenuHandler = new MenuHandler();
|
chromiumWebBrowser1.MenuHandler = new MenuHandler();
|
||||||
chromiumWebBrowser1.DisplayHandler = new DisplayHandler(this);
|
chromiumWebBrowser1.DisplayHandler = new DisplayHandler(this);
|
||||||
|
|
||||||
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "index.html");
|
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "index.html");
|
||||||
_fileUri = new Uri(filePath);
|
_fileUri = new Uri(filePath);
|
||||||
string fileUrl = _fileUri.AbsoluteUri;
|
string fileUrl = _fileUri.AbsoluteUri;
|
||||||
|
|
||||||
|
string filePath2 = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "loaderror.html");
|
||||||
|
_fileUri2 = new Uri(filePath2);
|
||||||
|
string fileUrl2 = _fileUri2.AbsoluteUri;
|
||||||
|
|
||||||
chromiumWebBrowser1.Load(fileUrl);
|
chromiumWebBrowser1.Load(fileUrl);
|
||||||
txtSearchOrUrl.Text = "";
|
txtSearchOrUrl.Text = "";
|
||||||
CheckForIllegalCrossThreadCalls = false;
|
CheckForIllegalCrossThreadCalls = false;
|
||||||
|
@ -75,7 +81,7 @@ namespace XeroBrowser
|
||||||
{
|
{
|
||||||
if (txtSearchOrUrl != null && chromiumWebBrowser1 != null)
|
if (txtSearchOrUrl != null && chromiumWebBrowser1 != null)
|
||||||
{
|
{
|
||||||
txtSearchOrUrl.Text = !chromiumWebBrowser1.Address.EndsWith(_fileUri.ToString()) ? chromiumWebBrowser1.Address : "";
|
txtSearchOrUrl.Text = !chromiumWebBrowser1.Address.EndsWith(_fileUri.ToString()) && !chromiumWebBrowser1.Address.EndsWith(_fileUri2.ToString()) ? chromiumWebBrowser1.Address : "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Reference in a new issue