From f7eef416d90ef2f4cbffea14aa66bf4f6dac973f Mon Sep 17 00:00:00 2001 From: RandomHuman Date: Mon, 20 Feb 2023 03:59:04 -0700 Subject: [PATCH] fix every last warning in every last file (non-html at least) --- WebBrowser/AppContainer.Designer.cs | 2 +- WebBrowser/AppContainer.cs | 6 +- WebBrowser/DisplayHandler.cs | 39 ++++---- WebBrowser/DownloadHandler.cs | 50 +++++----- WebBrowser/DownloadProgress.Designer.cs | 5 +- WebBrowser/DownloadProgress.cs | 12 +-- WebBrowser/LifeSpanHandler.cs | 10 +- WebBrowser/MenuHandler.cs | 125 ++++++++++++------------ WebBrowser/Program.cs | 3 +- WebBrowser/RequestHandler.cs | 2 +- WebBrowser/frmBrowser.Designer.cs | 8 +- WebBrowser/frmBrowser.cs | 51 ++++------ WebBrowser/frmSettings.Designer.cs | 8 +- WebBrowser/frmSettings.cs | 22 +---- 14 files changed, 154 insertions(+), 189 deletions(-) diff --git a/WebBrowser/AppContainer.Designer.cs b/WebBrowser/AppContainer.Designer.cs index adb63eb..087f5b2 100644 --- a/WebBrowser/AppContainer.Designer.cs +++ b/WebBrowser/AppContainer.Designer.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace WebBrowser +namespace XeroBrowser { partial class AppContainer { diff --git a/WebBrowser/AppContainer.cs b/WebBrowser/AppContainer.cs index 0339887..0149a98 100644 --- a/WebBrowser/AppContainer.cs +++ b/WebBrowser/AppContainer.cs @@ -1,6 +1,6 @@ using EasyTabs; -namespace WebBrowser +namespace XeroBrowser { public partial class AppContainer : TitleBarTabs { @@ -16,9 +16,9 @@ namespace WebBrowser { return new TitleBarTab(this) { - Content = new frmBrowser + Content = new FrmBrowser { - Text = "New tab" + Text = @"New tab" } }; } diff --git a/WebBrowser/DisplayHandler.cs b/WebBrowser/DisplayHandler.cs index 5b8f72d..6bf31a3 100644 --- a/WebBrowser/DisplayHandler.cs +++ b/WebBrowser/DisplayHandler.cs @@ -8,18 +8,17 @@ using System.Net; using CefSharp; using CefSharp.Enums; using CefSharp.Structs; -using WebBrowser; using Size = CefSharp.Structs.Size; -namespace DiamondCreeperBrowser +namespace XeroBrowser { public class DisplayHandler : IDisplayHandler { - public frmBrowser frmref; - public DisplayHandler(frmBrowser frm) + public FrmBrowser Frmref; + public DisplayHandler(FrmBrowser frm) { - frmref = frm; + Frmref = frm; } public static Icon BytesToIcon(byte[] bytes) { @@ -55,10 +54,10 @@ namespace DiamondCreeperBrowser { WebClient wc = new WebClient(); byte[] buffer = wc.DownloadData(urls[0]); - frmref.Icon = BytesToIcon(buffer); - frmref.Update(); - frmref.ParentTabs.UpdateThumbnailPreviewIcon(frmref.ParentTabs.Tabs.Single(t => t.Content == frmref)); - frmref.ParentTabs.RedrawTabs(); + Frmref.Icon = BytesToIcon(buffer); + Frmref.Update(); + Frmref.ParentTabs.UpdateThumbnailPreviewIcon(Frmref.ParentTabs.Tabs.Single(t => t.Content == Frmref)); + Frmref.ParentTabs.RedrawTabs(); } @@ -68,19 +67,19 @@ namespace DiamondCreeperBrowser WebClient wc = new WebClient(); Uri furi = new Uri(chromiumWebBrowser.Address); byte[] buffer = wc.DownloadData(furi.GetLeftPart(UriPartial.Authority) +"/favicon.ico"); - frmref.Icon = BytesToIcon(buffer); - frmref.Update(); - frmref.ParentTabs.UpdateThumbnailPreviewIcon(frmref.ParentTabs.Tabs.Single(t => t.Content == frmref)); - frmref.ParentTabs.RedrawTabs(); + Frmref.Icon = BytesToIcon(buffer); + Frmref.Update(); + Frmref.ParentTabs.UpdateThumbnailPreviewIcon(Frmref.ParentTabs.Tabs.Single(t => t.Content == Frmref)); + Frmref.ParentTabs.RedrawTabs(); } catch (Exception){ - ComponentResourceManager resources = new ComponentResourceManager(typeof(frmBrowser)); - frmref.Icon = ((Icon)(resources.GetObject("$this.Icon"))); - frmref.Update(); - frmref.ParentTabs.UpdateThumbnailPreviewIcon(frmref.ParentTabs.Tabs.Single(t => t.Content == frmref)); - frmref.ParentTabs.RedrawTabs(); - }; - }; + ComponentResourceManager resources = new ComponentResourceManager(typeof(FrmBrowser)); + Frmref.Icon = ((Icon)(resources.GetObject("$this.Icon"))); + Frmref.Update(); + Frmref.ParentTabs.UpdateThumbnailPreviewIcon(Frmref.ParentTabs.Tabs.Single(t => t.Content == Frmref)); + Frmref.ParentTabs.RedrawTabs(); + } + } } public void OnFullscreenModeChange(IWebBrowser chromiumWebBrowser, IBrowser browser, bool fullscreen) diff --git a/WebBrowser/DownloadHandler.cs b/WebBrowser/DownloadHandler.cs index 36e7e0d..57fea0e 100644 --- a/WebBrowser/DownloadHandler.cs +++ b/WebBrowser/DownloadHandler.cs @@ -7,10 +7,9 @@ using System.ComponentModel; using System.IO; using System.Windows.Forms; using CefSharp; -using WebBrowser; using Timer = System.Threading.Timer; -namespace DiamondCreeperBrowser +namespace XeroBrowser { public class DownloadHandler : IDownloadHandler { @@ -18,30 +17,30 @@ namespace DiamondCreeperBrowser public event EventHandler OnDownloadUpdatedFired; - public frmBrowser frmref; - public DownloadHandler(frmBrowser frm) + public FrmBrowser Frmref; + public DownloadHandler(FrmBrowser frm) { - frmref = frm; + Frmref = frm; } - public DownloadProgress downloadProgress = new DownloadProgress(); - public DownloadItem downloadItem; + public DownloadProgress DownloadProgress = new DownloadProgress(); + public DownloadItem DownloadItem; public void OnBeforeDownload(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback) { OnBeforeDownloadFired?.Invoke(this, downloadItem); - this.downloadItem = downloadItem; + this.DownloadItem = downloadItem; try { - frmref.Invoke((Action)delegate + Frmref.Invoke((Action)delegate { - downloadProgress.Show(); - downloadProgress.FormClosing += DownloadProgress_FormClosing; + DownloadProgress.Show(); + DownloadProgress.FormClosing += DownloadProgress_FormClosing; }); } - catch (ObjectDisposedException){}; - + catch (ObjectDisposedException){} + if (!callback.IsDisposed) { @@ -54,10 +53,10 @@ namespace DiamondCreeperBrowser private void DownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { - downloadItem.IsCancelled = true; + DownloadItem.IsCancelled = true; } - public Timer fivesecondtimer; + public Timer Fivesecondtimer; public void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback) { OnDownloadUpdatedFired?.Invoke(this, downloadItem); @@ -65,29 +64,28 @@ namespace DiamondCreeperBrowser if (downloadItem.IsComplete) { - fivesecondtimer = new Timer(tcallback, null, 1000 * 5, 1000 * 5); + Fivesecondtimer = new Timer(tcallback, null, 1000 * 5, 1000 * 5); } - frmref.Invoke((Action)delegate { - downloadProgress.ProgressBar1.Value = downloadItem.PercentComplete; - downloadProgress.ProgressPrecentage.Text = downloadItem.PercentComplete + "% " + (downloadItem.ReceivedBytes / 0x100000) + "MB / " + (downloadItem.TotalBytes / 0x100000) + "MB"; - downloadProgress.ProgressFileName.Text = Path.GetFileName(downloadItem.FullPath); - downloadProgress.Update(); - try { } catch (InvalidAsynchronousStateException){}; + Frmref.Invoke((Action)delegate { + DownloadProgress.ProgressBar1.Value = downloadItem.PercentComplete; + DownloadProgress.ProgressPrecentage.Text = downloadItem.PercentComplete + @"% " + (downloadItem.ReceivedBytes / 0x100000) + @"MB / " + (downloadItem.TotalBytes / 0x100000) + @"MB"; + DownloadProgress.ProgressFileName.Text = Path.GetFileName(downloadItem.FullPath); + DownloadProgress.Update(); + try { } catch (InvalidAsynchronousStateException){} }); } private void tcallback(object state) { try { - frmref.Invoke((Action)delegate + Frmref.Invoke((Action)delegate { - downloadProgress.Close(); + DownloadProgress.Close(); }); } - catch (InvalidOperationException){}; - + catch (InvalidOperationException){} } } } \ No newline at end of file diff --git a/WebBrowser/DownloadProgress.Designer.cs b/WebBrowser/DownloadProgress.Designer.cs index 8f73bd2..c7bc202 100644 --- a/WebBrowser/DownloadProgress.Designer.cs +++ b/WebBrowser/DownloadProgress.Designer.cs @@ -1,8 +1,7 @@ - -using System.ComponentModel; +using System.ComponentModel; using Bunifu.UI.WinForms; -namespace DiamondCreeperBrowser +namespace XeroBrowser { partial class DownloadProgress { diff --git a/WebBrowser/DownloadProgress.cs b/WebBrowser/DownloadProgress.cs index c8d182f..ca50855 100644 --- a/WebBrowser/DownloadProgress.cs +++ b/WebBrowser/DownloadProgress.cs @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; -namespace DiamondCreeperBrowser +namespace XeroBrowser { public partial class DownloadProgress : Form { @@ -15,19 +15,9 @@ namespace DiamondCreeperBrowser } - private void label1_Click(object sender, EventArgs e) - { - - } - private void DownloadProgress_FormClosing(object sender, FormClosingEventArgs e) { } - - private void bunifuLabel1_Click(object sender, EventArgs e) - { - - } } } diff --git a/WebBrowser/LifeSpanHandler.cs b/WebBrowser/LifeSpanHandler.cs index fda304b..aa92ba6 100644 --- a/WebBrowser/LifeSpanHandler.cs +++ b/WebBrowser/LifeSpanHandler.cs @@ -3,10 +3,8 @@ using System; using CefSharp; using EasyTabs; -using WebBrowser; -using XeroBrowser; -namespace DiamondCreeperBrowser +namespace XeroBrowser { public class LifeSpanHandler : ILifeSpanHandler { @@ -19,12 +17,12 @@ namespace DiamondCreeperBrowser TitleBarTab tab = new TitleBarTab(Program.Container) { - Content = new frmBrowser + Content = new FrmBrowser { - Text = "New Tab" + Text = @"New Tab" } }; - frmBrowser frmref = (frmBrowser)tab.Content; + FrmBrowser frmref = (FrmBrowser)tab.Content; frmref.chromiumWebBrowser1.Load(targetUrl); Program.Container.Tabs.Add(tab); Program.Container.SelectedTab = tab; diff --git a/WebBrowser/MenuHandler.cs b/WebBrowser/MenuHandler.cs index 4ccea5d..8290d2e 100644 --- a/WebBrowser/MenuHandler.cs +++ b/WebBrowser/MenuHandler.cs @@ -2,81 +2,86 @@ using System.Windows.Forms; using CefSharp; -public class MenuHandler : IContextMenuHandler +namespace XeroBrowser { - public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model) + public class MenuHandler : IContextMenuHandler { - // Remove any existent option using the Clear method of the model - // - //model.Clear(); - - Console.WriteLine("Context menu opened !"); - - // You can add a separator in case that there are more items on the list - if (model.Count > 0) + public void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model) { - model.AddSeparator(); - } + // Remove any existent option using the Clear method of the model + // + //model.Clear(); + Console.WriteLine(@"Context menu opened !"); - // Add a new item to the list using the AddItem method of the model - //model.AddItem((CefMenuCommand)113, "Copy link address"); - model.AddItem((CefMenuCommand)114, "Paste"); - - // Add a separator - //model.AddSeparator(); - - } - - public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags) - { - // React to the first ID (show dev tools method) - if (commandId == (CefMenuCommand)26501) - { - browser.GetHost().ShowDevTools(); - return true; - } - - // React to the second ID (show dev tools method) - if (commandId == (CefMenuCommand)26502) - { - browser.GetHost().CloseDevTools(); - return true; - } - - - // Any new item should be handled through a new if statement - if ((int)commandId == 113) - { - //using System.Windows.Forms; - try + // You can add a separator in case that there are more items on the list + if (model.Count > 0) { - Clipboard.SetText(parameters.SourceUrl); + model.AddSeparator(); } - catch (ArgumentException) { }; + + + // Add a new item to the list using the AddItem method of the model + //model.AddItem((CefMenuCommand)113, "Copy link address"); + model.AddItem((CefMenuCommand)114, "Paste"); + + // Add a separator + //model.AddSeparator(); + } - return false; + + public bool OnContextMenuCommand(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, CefMenuCommand commandId, CefEventFlags eventFlags) + { + // React to the first ID (show dev tools method) + if (commandId == (CefMenuCommand)26501) + { + browser.GetHost().ShowDevTools(); + return true; + } + + // React to the second ID (show dev tools method) + if (commandId == (CefMenuCommand)26502) + { + browser.GetHost().CloseDevTools(); + return true; + } + + + // Any new item should be handled through a new if statement + if ((int)commandId == 113) + { + //using System.Windows.Forms; + try + { + Clipboard.SetText(parameters.SourceUrl); + } + catch (ArgumentException) { } + } + return false; #pragma warning disable CS0162 // Unreachable code detected - if ((int)commandId == 114) - { - //using System.Windows.Forms; - Clipboard.GetText(); - } +/* + if ((int)commandId == 114) + { + //using System.Windows.Forms; + Clipboard.GetText(); + } #pragma warning restore CS0162 // Unreachable code detected - return false; + return false; +*/ - // Return false should ignore the selected option of the user ! - } + // Return false should ignore the selected option of the user ! + } - public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame) - { + public void OnContextMenuDismissed(IWebBrowser browserControl, IBrowser browser, IFrame frame) + { - } + } - public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback) - { - return false; + public bool RunContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model, IRunContextMenuCallback callback) + { + return false; + } } } \ No newline at end of file diff --git a/WebBrowser/Program.cs b/WebBrowser/Program.cs index 4d3c637..7243d7f 100644 --- a/WebBrowser/Program.cs +++ b/WebBrowser/Program.cs @@ -4,7 +4,6 @@ using System.Windows.Forms; using CefSharp; using CefSharp.WinForms; using EasyTabs; -using WebBrowser; namespace XeroBrowser { @@ -41,7 +40,7 @@ namespace XeroBrowser new TitleBarTab(Container) { - Content = new frmBrowser + Content = new FrmBrowser { Text = @"New Tab" } diff --git a/WebBrowser/RequestHandler.cs b/WebBrowser/RequestHandler.cs index 5d513bb..2e4b1ab 100644 --- a/WebBrowser/RequestHandler.cs +++ b/WebBrowser/RequestHandler.cs @@ -2,7 +2,7 @@ using System.Security.Cryptography.X509Certificates; using CefSharp; -namespace DiamondCreeperBrowser +namespace XeroBrowser { public class RequestHandler : IRequestHandler { diff --git a/WebBrowser/frmBrowser.Designer.cs b/WebBrowser/frmBrowser.Designer.cs index 8f06c83..88b230c 100644 --- a/WebBrowser/frmBrowser.Designer.cs +++ b/WebBrowser/frmBrowser.Designer.cs @@ -4,9 +4,9 @@ using Bunifu.UI.WinForms; using CefSharp.WinForms; using BunifuImageButton = Bunifu.UI.WinForms.BunifuImageButton; -namespace WebBrowser +namespace XeroBrowser { - partial class frmBrowser + partial class FrmBrowser { /// /// Required designer variable. @@ -35,7 +35,7 @@ namespace WebBrowser private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBrowser)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBrowser)); Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties5 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties6 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties7 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); @@ -564,7 +564,7 @@ namespace WebBrowser this.Controls.Add(this.bunifuCards1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "frmBrowser"; + this.Name = "FrmBrowser"; this.Text = "frmBrowser"; this.bunifuCards1.ResumeLayout(false); this.ResumeLayout(false); diff --git a/WebBrowser/frmBrowser.cs b/WebBrowser/frmBrowser.cs index e019646..f80936f 100644 --- a/WebBrowser/frmBrowser.cs +++ b/WebBrowser/frmBrowser.cs @@ -4,17 +4,16 @@ using System.IO; using System.Windows.Forms; using Bunifu.Utils; using CefSharp; -using DiamondCreeperBrowser; using EasyTabs; using XeroBrowser.Properties; -namespace WebBrowser +namespace XeroBrowser { - public partial class frmBrowser : Form + public partial class FrmBrowser : Form { - Uri fileUri; - Uri fileUri2; - public frmBrowser() + Uri _fileUri; + // Uri _fileUri2; + public FrmBrowser() { InitializeComponent(); chromiumWebBrowser1.DownloadHandler = new DownloadHandler(this); @@ -22,8 +21,8 @@ namespace WebBrowser chromiumWebBrowser1.MenuHandler = new MenuHandler(); chromiumWebBrowser1.DisplayHandler = new DisplayHandler(this); string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "index.html"); - fileUri = new Uri(filePath); - string fileUrl = fileUri.AbsoluteUri; + _fileUri = new Uri(filePath); + string fileUrl = _fileUri.AbsoluteUri; chromiumWebBrowser1.Load(fileUrl); txtSearchOrUrl.Text = ""; CheckForIllegalCrossThreadCalls = false; @@ -59,7 +58,7 @@ namespace WebBrowser chromiumWebBrowser1.Reload(); } - private bool isBlocked; + private bool _isBlocked; private void chromiumWebBrowser1_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e) { if (e.IsLoading) @@ -75,14 +74,11 @@ namespace WebBrowser try { - if (this == null) - return; - Invoke((Action)delegate { if (txtSearchOrUrl != null && chromiumWebBrowser1 != null) { - if (!chromiumWebBrowser1.Address.EndsWith(fileUri.ToString())) + if (!chromiumWebBrowser1.Address.EndsWith(_fileUri.ToString())) { txtSearchOrUrl.Text = chromiumWebBrowser1.Address; } @@ -110,9 +106,9 @@ namespace WebBrowser else { txtSearchOrUrl.IconLeft = Resources.insecure1; - if (!isBlocked) + if (!_isBlocked) { - MessageBox.Show("Warning: This site is insecure!, Your personal information may be at risk or hackers can install malicious software on your device.", "Xero Browser", MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(@"Warning: This site is insecure!, Your personal information may be at risk or hackers can install malicious software on your device.", @"Xero Browser", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } @@ -137,29 +133,29 @@ namespace WebBrowser string[] blockedUrls = { "https://diamondcreeper.org/1337", "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/watch?v=xm3YgoEiEDc", "https://www.youtube.com/watch?v=xvFZjo5PgG0", "https://www.youtube.com/watch?v=O91DT1pR1ew", "https://www.youtube.com/watch?v=o-YBDTqX_ZU", "https://www.youtube.com/watch?v=H8ZH_mkfPUY", "https://www.youtube.com/watch?v=o-YBDTqX_ZU", "https://www.youtube.com/watch?v=xvFZjo5PgG0" }; string[] blockedDrms = { "netflix.com", "disneyplus.com" }; - if (!isBlocked) + if (!_isBlocked) { foreach (string blockedDrm in blockedDrms) { if (chromiumWebBrowser1.Address.StartsWith(blockedDrm)) { chromiumWebBrowser1.Stop(); // cancel the navigation - isBlocked = true; + _isBlocked = true; chromiumWebBrowser1.LoadHtml("

Error!

This website requires a DRM (Digital Rights Management) which Xero Browser does not support!

", blockedDrm); } - }; + } foreach (string blockedUrl in blockedUrls) { if (chromiumWebBrowser1.Address.StartsWith(blockedUrl)) { chromiumWebBrowser1.Stop(); // cancel the navigation - isBlocked = true; + _isBlocked = true; chromiumWebBrowser1.LoadHtml("

Rickroll Blocked!

Being rickrolled is disabled.

", blockedUrl); } - }; + } } } @@ -174,7 +170,7 @@ namespace WebBrowser private void btnSettings_Click(object sender, EventArgs e) { - Backdrop.Show(new frmSettings()); + Backdrop.Show(new FrmSettings()); } private void chromiumWebBrowser1_KeyDown(object sender, KeyEventArgs e) @@ -189,16 +185,9 @@ namespace WebBrowser 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; - } - - private void bunifuImageButton2_Click(object sender, EventArgs e, frmSettings frmSettings) - { - string url = frmSettings.bunifuTextBox1.Text; // Get the URL from the text box on the form - chromiumWebBrowser1.Load(url); // Navigate to the specified URL - + // string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "loaderror.html"); + // _fileUri2 = new Uri(filePath); + // string fileUrl = _fileUri2.AbsoluteUri; } private void txtSearchOrUrl_KeyUp(object sender, KeyEventArgs e) diff --git a/WebBrowser/frmSettings.Designer.cs b/WebBrowser/frmSettings.Designer.cs index 272676a..a35eaaf 100644 --- a/WebBrowser/frmSettings.Designer.cs +++ b/WebBrowser/frmSettings.Designer.cs @@ -3,9 +3,9 @@ using System.Windows.Forms; using Bunifu.UI.WinForms; using Bunifu.UI.WinForms.BunifuButton; -namespace WebBrowser +namespace XeroBrowser { - partial class frmSettings + partial class FrmSettings { /// /// Required designer variable. @@ -37,7 +37,7 @@ namespace WebBrowser Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties10 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties11 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties12 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSettings)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSettings)); Bunifu.UI.WinForms.BunifuButton.BunifuButton2.BorderEdges borderEdges5 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton2.BorderEdges(); Bunifu.UI.WinForms.BunifuButton.BunifuButton2.BorderEdges borderEdges6 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton2.BorderEdges(); this.tabControl1 = new System.Windows.Forms.TabControl(); @@ -1196,7 +1196,7 @@ namespace WebBrowser this.Controls.Add(this.bunifuLabel3); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "frmSettings"; + this.Name = "FrmSettings"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "frmSettings"; this.tabControl1.ResumeLayout(false); diff --git a/WebBrowser/frmSettings.cs b/WebBrowser/frmSettings.cs index 38e10d2..8c02047 100644 --- a/WebBrowser/frmSettings.cs +++ b/WebBrowser/frmSettings.cs @@ -1,27 +1,19 @@ using System; using System.Diagnostics; using System.Windows.Forms; -using Bunifu.UI.WinForms; +// using Bunifu.UI.WinForms; -namespace WebBrowser +namespace XeroBrowser { - public partial class frmSettings : Form + public partial class FrmSettings : Form { - public frmSettings() + public FrmSettings() { InitializeComponent(); } - private void bunifuToggleSwitchflash_CheckedChanged(object sender, BunifuToggleSwitch.CheckedChangedEventArgs e) - { - - } - - private void bunifuToggleSwitchcookies_CheckedChanged(object sender, BunifuToggleSwitch.CheckedChangedEventArgs e) - { - - } + private void bunifuDropdown1_SelectedIndexChanged(object sender, EventArgs e) { @@ -33,10 +25,6 @@ namespace WebBrowser Process.Start("ms-settings:network-proxy"); } - private void frmSettings_FormClosing(object sender, FormClosingEventArgs e, Form form) - { - - } private void bunifuPictureBox1_Click(object sender, EventArgs e) {