mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-30 14:34:09 +02:00
parent
d48da3d51c
commit
f7e9ad74d1
@ -48,10 +48,13 @@ public bool IsWaiting{
|
|||||||
|
|
||||||
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
private readonly TweetDeckBrowser browser;
|
private readonly TweetDeckBrowser browser;
|
||||||
|
private readonly FormNotificationTweet notification;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private readonly PluginManager plugins;
|
private readonly PluginManager plugins;
|
||||||
private readonly UpdateHandler updates;
|
private readonly UpdateHandler updates;
|
||||||
private readonly FormNotificationTweet notification;
|
|
||||||
private readonly ContextMenu contextMenu;
|
private readonly ContextMenu contextMenu;
|
||||||
private readonly UpdateBridge updateBridge;
|
private readonly UpdateBridge updateBridge;
|
||||||
|
|
||||||
@ -90,6 +93,7 @@ public FormBrowser(){
|
|||||||
Disposed += (sender, args) => {
|
Disposed += (sender, args) => {
|
||||||
Config.MuteToggled -= Config_MuteToggled;
|
Config.MuteToggled -= Config_MuteToggled;
|
||||||
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
|
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
|
||||||
|
browser.Dispose();
|
||||||
};
|
};
|
||||||
|
|
||||||
Config.MuteToggled += Config_MuteToggled;
|
Config.MuteToggled += Config_MuteToggled;
|
||||||
@ -115,9 +119,7 @@ protected override void Dispose(bool disposing){
|
|||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
|
|
||||||
browser.Dispose();
|
|
||||||
updates.Dispose();
|
updates.Dispose();
|
||||||
notification.Dispose();
|
|
||||||
contextMenu.Dispose();
|
contextMenu.Dispose();
|
||||||
|
|
||||||
notificationScreenshotManager?.Dispose();
|
notificationScreenshotManager?.Dispose();
|
||||||
|
@ -103,8 +103,11 @@ protected virtual FormBorderStyle NotificationBorderStyle{
|
|||||||
protected double SizeScale => DpiScale * Config.ZoomLevel / 100.0;
|
protected double SizeScale => DpiScale * Config.ZoomLevel / 100.0;
|
||||||
|
|
||||||
protected readonly FormBrowser owner;
|
protected readonly FormBrowser owner;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
protected readonly ChromiumWebBrowser browser;
|
protected readonly ChromiumWebBrowser browser;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
||||||
|
|
||||||
private DesktopNotification currentNotification;
|
private DesktopNotification currentNotification;
|
||||||
@ -144,7 +147,11 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
|||||||
this.browser.SetupZoomEvents();
|
this.browser.SetupZoomEvents();
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
Disposed += (sender, args) => this.owner.FormClosed -= owner_FormClosed;
|
|
||||||
|
Disposed += (sender, args) => {
|
||||||
|
this.owner.FormClosed -= owner_FormClosed;
|
||||||
|
this.browser.Dispose();
|
||||||
|
};
|
||||||
|
|
||||||
DpiScale = this.GetDPIScale();
|
DpiScale = this.GetDPIScale();
|
||||||
|
|
||||||
@ -155,7 +162,6 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
|||||||
protected override void Dispose(bool disposing){
|
protected override void Dispose(bool disposing){
|
||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
browser.Dispose();
|
|
||||||
resourceHandler.Dispose();
|
resourceHandler.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,10 @@ public static void Show(string hash = null){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
private readonly ChromiumWebBrowser browser;
|
private readonly ChromiumWebBrowser browser;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private string nextUrl;
|
private string nextUrl;
|
||||||
|
|
||||||
private FormGuide(string url, FormBrowser owner){
|
private FormGuide(string url, FormBrowser owner){
|
||||||
@ -87,12 +90,12 @@ private FormGuide(string url, FormBrowser owner){
|
|||||||
browser.SetupZoomEvents();
|
browser.SetupZoomEvents();
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
Disposed += (sender, args) => browser.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing){
|
protected override void Dispose(bool disposing){
|
||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
browser.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
Loading…
Reference in New Issue
Block a user