aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-25 14:32:02 -0500
committerMichael <[email protected]>2017-02-25 14:32:08 -0500
commit569ad6fd7a3944b970fd08e715c8107a14ae117b (patch)
treee470887b3886d72b51147ffca3d205ff1393cf34 /ShiftOS.WinForms
parented5b6549369d470f8aaafbae7716081448377369 (diff)
downloadshiftos_thereturn-569ad6fd7a3944b970fd08e715c8107a14ae117b.tar.gz
shiftos_thereturn-569ad6fd7a3944b970fd08e715c8107a14ae117b.tar.bz2
shiftos_thereturn-569ad6fd7a3944b970fd08e715c8107a14ae117b.zip
Fire event when note is marked read
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/Applications/Notifications.cs7
-rw-r--r--ShiftOS.WinForms/WinformsDesktop.cs7
2 files changed, 14 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/Notifications.cs b/ShiftOS.WinForms/Applications/Notifications.cs
index 6fb659d..540d2b5 100644
--- a/ShiftOS.WinForms/Applications/Notifications.cs
+++ b/ShiftOS.WinForms/Applications/Notifications.cs
@@ -23,9 +23,14 @@ namespace ShiftOS.WinForms.Applications
{
SetupUI();
};
+ onRead += () =>
+ {
+ SetupUI();
+ };
}
Action<Notification> onMade = null;
+ Action onRead = null;
public void SetupUI()
{
@@ -227,6 +232,7 @@ namespace ShiftOS.WinForms.Applications
{
SetupUI();
NotificationDaemon.NotificationMade += onMade;
+ NotificationDaemon.NotificationRead += onRead;
}
public void OnSkinLoad()
@@ -236,6 +242,7 @@ namespace ShiftOS.WinForms.Applications
public bool OnUnload()
{
NotificationDaemon.NotificationMade -= onMade;
+ NotificationDaemon.NotificationRead -= onRead;
return true;
}
diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs
index 957c793..bcb853f 100644
--- a/ShiftOS.WinForms/WinformsDesktop.cs
+++ b/ShiftOS.WinForms/WinformsDesktop.cs
@@ -68,6 +68,13 @@ namespace ShiftOS.WinForms
};
+ NotificationDaemon.NotificationRead += () =>
+ {
+ //Soon this will pop a balloon note.
+ btnnotifications.Text = "Notifications (" + NotificationDaemon.GetUnreadCount().ToString() + ")";
+
+ };
+
this.LocationChanged += (o, a) =>
{
if (this.Left != 0)