SoundOutput() public method

public SoundOutput ( string header, bool IsWin8 ) : void
header string
IsWin8 bool
return void
Beispiel #1
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();
        }
        public void Show(NotifyType type, string header, string body, Action activated, Action <Exception> failed = null)
        {
            if (this.notifyIcon == null)
            {
                return;
            }

            if (activated != null)
            {
                this.notifyIcon.BalloonTipClicked -= this.activatedAction;

                this.activatedAction = (sender, args) => activated();
                this.notifyIcon.BalloonTipClicked += this.activatedAction;
            }
            sound.SoundOutput(header, false);
            notifyIcon.ShowBalloonTip(1000, header, body, ToolTipIcon.None);
        }