private ToastNativeMessage(string uri, string transactionId, bool isSuccess, int code, string message) { _uri = uri; _transactionId = transactionId; _extras = new Dictionary <string, JSONNode>(); _result = new ToastResult(isSuccess, code, message); }
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) { base.OnMouseLeftButtonUp(e); bool captured = IsMouseCaptured; ReleaseMouseCapture(); if (IsMouseOver && captured) { _toastResult = ToastResult.Activated; Close(); } }
protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); // Handle Alt+F4 closing of toast. if (_toastResult == ToastResult.Null) { e.Cancel = true; _toastResult = ToastResult.Dismissed; Close(); } else if (_isMediaPlaying) { ToastManager.IsAudioRunning = false; } }
protected override void OnMouseEnter(MouseEventArgs e) { base.OnMouseEnter(e); if (timeOutTimer != null) { timeOutTimer.Stop(); } if (_toastResult != ToastResult.Null) { _toastResult = ToastResult.Null; Duration duration = new Duration(TimeSpan.FromMilliseconds(100)); outerBorder.BeginAnimation(OpacityProperty, new DoubleAnimation(1, duration)); FadeInAudio(duration); } }
internal ToastHandledEventArgs(ToastResult result, object state) { Result = result; State = state; }
private void dismissButton_Click(object sender, RoutedEventArgs e) { _toastResult = ToastResult.Dismissed; Close(); }
internal ToastHandledEventArgs(ToastResult result, object state) { Result = result; State = state; }