mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-02 09:35:38 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ace91684c |
@@ -54,9 +54,6 @@ public partial class MainWindow : IDisposable
|
|||||||
// Set up the update handler
|
// Set up the update handler
|
||||||
InitializeUpdate();
|
InitializeUpdate();
|
||||||
|
|
||||||
// Show the notification icon
|
|
||||||
NotificationIcon.Initialize(this);
|
|
||||||
|
|
||||||
// Load window settings
|
// Load window settings
|
||||||
LoadWindowSettings();
|
LoadWindowSettings();
|
||||||
|
|
||||||
@@ -93,6 +90,16 @@ public partial class MainWindow : IDisposable
|
|||||||
NewVersionLink.Visibility = Visibility.Visible;
|
NewVersionLink.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Show the notification icon
|
||||||
|
NotificationIcon.Initialize(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.Logger.Error(e, "");
|
||||||
|
}
|
||||||
|
|
||||||
Log.Logger.Information("MainForm creation finished");
|
Log.Logger.Information("MainForm creation finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ internal static class NotificationIcon
|
|||||||
_notificationIcon = new TaskbarIcon { Icon = Resources.Application };
|
_notificationIcon = new TaskbarIcon { Icon = Resources.Application };
|
||||||
_notificationIcon.TrayMouseDoubleClick += HandleNotificationIconDoubleClick;
|
_notificationIcon.TrayMouseDoubleClick += HandleNotificationIconDoubleClick;
|
||||||
|
|
||||||
// Setup the menu
|
// Set up the menu
|
||||||
var contextMenu = new ContextMenu();
|
var contextMenu = new ContextMenu();
|
||||||
contextMenu.Opened += HandleContextMenuOpened;
|
contextMenu.Opened += HandleContextMenuOpened;
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ internal static class NotificationIcon
|
|||||||
public static void Dispose()
|
public static void Dispose()
|
||||||
{
|
{
|
||||||
// Get rid of the icon
|
// Get rid of the icon
|
||||||
_notificationIcon.Dispose();
|
_notificationIcon?.Dispose();
|
||||||
_notificationIcon = null;
|
_notificationIcon = null;
|
||||||
|
|
||||||
_mainWindow = null;
|
_mainWindow = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user