Windows 8 のトースト通知機能を提供します。
예제 #1
0
        protected override void NotifyCore(string header, string body, Action activated, Action<Exception> failed)
        {
            var toast = new Toast(header, body);
            toast.Activated += activated;
            if (failed != null) toast.ToastFailed += () => failed(new Exception("Toast failed."));

            toast.Show();
        }
예제 #2
0
 public void Show(NotifyType type, string header, string body, Action activated, Action<Exception> failed = null)
 {
     var toast = new Toast(header, body);
     toast.Activated += (sender, args) => activated();
     if (failed != null)
         toast.ToastFailed += (sender, args) => failed(args.ErrorCode);
     sound.SoundOutput(header, true);
     toast.Show();
 }