Event args for the IInteractionRequest.Raised event.
Inheritance: System.EventArgs
コード例 #1
0
        /// <summary>
        /// Invoked when the interaction request is raised and displays
        /// a message box with content specified in the <see cref="InteractionRequestedEventArgs"/>.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void Notify(object sender, InteractionRequestedEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            MessageBox.Show((string)e.Context.Content, e.Context.Title, MessageBoxButton.OK);
            if (e.Callback != null)
            {
                e.Callback.Invoke();
            }
        }
コード例 #2
0
 /// <summary>
 /// Shows the popup for 6 seconds and then closes it.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected override void Notify(object sender, InteractionRequestedEventArgs e)
 {
     if (e == null)
     {
         return;
     }
     
     var popUp = (Popup)this.AssociatedObject.FindName(this.PopupElementName);
     popUp.DataContext = e.Context;
     popUp.IsOpen = true;
     this.DisposeTimer();
     this.closePopupTimer = new Timer(
         s => Deployment.Current.Dispatcher.BeginInvoke(() => popUp.IsOpen = false),
         null,
         6000,
         5000);
     popUp.Closed += this.OnPopupClosed;
 }
コード例 #3
0
		private void DeletePriceListConfirmation(object o, InteractionRequestedEventArgs args)
		{
			(args.Context as Confirmation).Confirmed = true;
			args.Callback.Invoke();
		}
コード例 #4
0
 void LaunchPopupRequest_Raised(object sender, InteractionRequestedEventArgs e)
 {
     OnPopupClosed(e.Context as Confirmation);
 }
コード例 #5
0
		private void EditValueSetConfirmation(object o, InteractionRequestedEventArgs args)
		{
			var confirmation = (Confirmation)args.Context;
			var propertyvalueVM = (PropertyValueBaseViewModel)confirmation.Content;

			if (propertyvalueVM.IsBooleanValue)
			{
				propertyvalueVM.InnerItem.Value.BooleanValue = true;
			}
			else if (propertyvalueVM.IsDateTimeValue)
			{
				propertyvalueVM.InnerItem.Value.DateTimeValue = DateTime.UtcNow;
			}
			else if (propertyvalueVM.IsDecimalValue)
			{
				propertyvalueVM.InnerItem.Value.DecimalValue = DecimalValue;
			}
			else if (propertyvalueVM.IsIntegerValue)
			{
				propertyvalueVM.InnerItem.Value.IntegerValue = 1234;
			}
			else if (propertyvalueVM.IsLongStringValue)
			{
				propertyvalueVM.InnerItem.Value.LongTextValue = LongTextValue;
			}
			else if (propertyvalueVM.IsShortStringValue)
			{
				propertyvalueVM.InnerItem.Value.ShortTextValue = "shrt";
			}

			confirmation.Confirmed = true;
			args.Callback.Invoke();
		}
コード例 #6
0
 /// <summary>
 /// Invoked when the interaction request is raised.
 /// </summary>
 /// <param name="sender">The sender of the event.</param>
 /// <param name="e">InteractionRequest events</param>
 protected void Notify(object sender, InteractionRequestedEventArgs e)
 {
     this.InvokeActions(e);
 }