fix / suppress all remaining errors

This commit is contained in:
RandomHuman 2023-02-20 04:39:19 -07:00
parent 35337cf3ea
commit 0bd7c40af2
9 changed files with 333 additions and 9200 deletions

View file

@ -6,12 +6,13 @@ using Bunifu.Utils;
using CefSharp;
using EasyTabs;
using XeroBrowser.Properties;
// ReSharper disable PossibleNullReferenceException
namespace XeroBrowser
{
public partial class FrmBrowser : Form
{
Uri _fileUri;
private readonly Uri _fileUri;
// Uri _fileUri2;
public FrmBrowser()
{
@ -29,14 +30,9 @@ namespace XeroBrowser
}
public TitleBarTabs ParentTabs
{
get
{
return (ParentForm as TitleBarTabs);
}
}
private void btnForward_Click(object sender, EventArgs e)
public TitleBarTabs ParentTabs => (ParentForm as TitleBarTabs);
private void btnForward_Click(object sender, EventArgs e)
{
if (chromiumWebBrowser1.CanGoForward) chromiumWebBrowser1.Forward();
@ -78,14 +74,7 @@ namespace XeroBrowser
{
if (txtSearchOrUrl != null && chromiumWebBrowser1 != null)
{
if (!chromiumWebBrowser1.Address.EndsWith(_fileUri.ToString()))
{
txtSearchOrUrl.Text = chromiumWebBrowser1.Address;
}
else
{
txtSearchOrUrl.Text = "";
}
txtSearchOrUrl.Text = !chromiumWebBrowser1.Address.EndsWith(_fileUri.ToString()) ? chromiumWebBrowser1.Address : "";
}
});
@ -113,17 +102,17 @@ namespace XeroBrowser
}
// if (txtSearchOrUrl.Text.Contains("netflix.com"))
// {
//MessageBox.Show("This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.", "Xero Browser", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
// chromiumWebBrowser1.Stop(); // cancel the navigation
// isBlocked = true;
// chromiumWebBrowser1.LoadHtml("<html><body><h1>Error!</h1><h3>This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.</h3></body></html>");
// }
// else if (txtSearchOrUrl.Text.Contains("disneyplus.com"))
// {
// MessageBox.Show("This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.", "Xero Browser", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
// }
// if (txtSearchOrUrl.Text.Contains("netflix.com"))
// {
//MessageBox.Show("This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.", "Xero Browser", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
// chromiumWebBrowser1.Stop(); // cancel the navigation
// isBlocked = true;
// chromiumWebBrowser1.LoadHtml("<html><body><h1>Error!</h1><h3>This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.</h3></body></html>");
// }
// else if (txtSearchOrUrl.Text.Contains("disneyplus.com"))
// {
// MessageBox.Show("This site requires a DRM (Digital Rights Management) which Xero Browser does not support! TV Shows & Moves will not load.", "Xero Browser", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
// }
if (e.IsLoading)
{