From 910a1c455e0176bfff7776e47f9160e349cfaf67 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 25 Feb 2017 10:03:36 -0500 Subject: Notification counter on desktop. --- ShiftOS.WinForms/WinformsDesktop.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ShiftOS.WinForms/WinformsDesktop.cs') diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index ded68ba..957c793 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -60,6 +60,14 @@ namespace ShiftOS.WinForms { InitializeComponent(); this.TopMost = false; + + NotificationDaemon.NotificationMade += (note) => + { + //Soon this will pop a balloon note. + btnnotifications.Text = "Notifications (" + NotificationDaemon.GetUnreadCount().ToString() + ")"; + + }; + this.LocationChanged += (o, a) => { if (this.Left != 0) @@ -80,6 +88,10 @@ namespace ShiftOS.WinForms { if(this.Visible == true) this.Invoke(new Action(() => SetupDesktop())); + this.Invoke(new Action(() => + { + btnnotifications.Text = "Notifications (" + NotificationDaemon.GetUnreadCount().ToString() + ")"; + })); }; Shiftorium.Installed += () => { -- cgit v1.2.3