diff --git a/Core/Notification/FormNotificationBase.cs b/Core/Notification/FormNotificationBase.cs index a3515506..70a5527a 100644 --- a/Core/Notification/FormNotificationBase.cs +++ b/Core/Notification/FormNotificationBase.cs @@ -134,13 +134,7 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){ this.browser.Dock = DockStyle.None; this.browser.ClientSize = ClientSize; this.browser.IsBrowserInitializedChanged += browser_IsBrowserInitializedChanged; - - #if DEBUG - this.browser.ConsoleMessage += BrowserUtils.HandleConsoleMessage; - #endif - - DpiScale = this.GetDPIScale(); - + browser.SetupResourceHandler(TwitterUtils.TweetDeckURL, this.resourceHandler); browser.SetupResourceHandler(TweetNotification.AppLogo); @@ -151,6 +145,8 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){ this.owner.FormClosed -= owner_FormClosed; }; + DpiScale = this.GetDPIScale(); + // ReSharper disable once VirtualMemberCallInContructor UpdateTitle(); } diff --git a/Core/TweetDeckBrowser.cs b/Core/TweetDeckBrowser.cs index 2bd63a58..8a5ad9c1 100644 --- a/Core/TweetDeckBrowser.cs +++ b/Core/TweetDeckBrowser.cs @@ -43,10 +43,6 @@ public TweetDeckBrowser(FormBrowser owner, TweetDeckBridge bridge){ RequestHandler = new RequestHandlerBrowser() }; - #if DEBUG - this.browser.ConsoleMessage += BrowserUtils.HandleConsoleMessage; - #endif - this.browser.LoadingStateChanged += browser_LoadingStateChanged; this.browser.FrameLoadStart += browser_FrameLoadStart; this.browser.FrameLoadEnd += browser_FrameLoadEnd; diff --git a/Core/Utils/BrowserUtils.cs b/Core/Utils/BrowserUtils.cs index 47e43b58..17b95fb1 100644 --- a/Core/Utils/BrowserUtils.cs +++ b/Core/Utils/BrowserUtils.cs @@ -174,11 +174,5 @@ public static int Scale(int baseValue, double scaleFactor){ public static void SetZoomLevel(IBrowser browser, int percentage){ browser.GetHost().SetZoomLevel(Math.Log(percentage/100.0, 1.2)); } - - #if DEBUG - public static void HandleConsoleMessage(object sender, ConsoleMessageEventArgs e){ - Debug.WriteLine("[Console] {0} ({1}:{2})", e.Message, e.Source, e.Line); - } - #endif } }