static void Main(string[] args) { Console.WriteLine(string.Format("{0}{1}", "Please choose from the following options: ", CRLF)); Console.WriteLine(string.Format("{0}{1}", "1: Reset Application Configuration Defaults ", CRLF)); Console.WriteLine(string.Format("{0}{1}", "2: Test VBPowerPack Toast Module. ", CRLF)); Console.Write("Numeric Choice: "); switch (Console.ReadLine().Trim()) { case ("1"): { ResetConfigurationDefaults(); break; } case ("2"): { NotificationWindow toast = new NotificationWindow(); toast.Click += new NotificationWindow.ClickEventHandler(toast_Click); toast.TextIsHyperLink = true; toast.ShowStyle = NotificationShowStyle.Slide; // toast.CornerImage = Resources.Properties.Resources.DIIcon.ToBitmap(); toast.CloseButton = true; toast.Notify("This is some C# toast! ", 10000); Console.ReadLine(); break; } } }
private void NotifyInternal(string text, bool spec) { _notificationWindow.Dispatcher.BeginInvoke(new Action(() => { _notificationWindow.Notify(text, spec); })); }