Ejemplo n.º 1
0
        /// <summary>
        /// Creates a confirmation behavior. If you have form controls that should open the same dialog via implicit submission, use
        /// <see cref="ConfirmationFormAction"/> instead.
        /// </summary>
        /// <param name="dialogContent"></param>
        /// <param name="postBack">Pass null to use the post-back corresponding to the first of the current data modifications.</param>
        public ConfirmationButtonBehavior(IReadOnlyCollection <FlowComponent> dialogContent, PostBack postBack = null)
        {
            var id = new ConfirmationDialogId();

            dialog             = new ConfirmationDialog(id, dialogContent, postBack: postBack);
            confirmationAction = new ConfirmationFormAction(id);
        }
 /// <summary>
 /// Creates a confirmation dialog.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="content"></param>
 /// <param name="postBack">Pass null to use the post-back corresponding to the first of the current data modifications.</param>
 public ConfirmationDialog(ConfirmationDialogId id, IEnumerable <FlowComponent> content, PostBack postBack = null)
 {
     children =
         new ModalBox(
             id.ModalBoxId,
             content.Concat(
                 new Paragraph(
                     new EwfButton(
                         new StandardButtonStyle("Cancel"),
                         behavior: new CustomButtonBehavior(() => "document.getElementById( '{0}' ).close();".FormatWith(id.ModalBoxId.ElementId.Id))).Concat(
                         " ".ToComponents()).Concat(new EwfButton(new StandardButtonStyle("Continue"), behavior: new PostBackBehavior(postBack: postBack))))
                 .ToCollection())).ToCollection();
 }
 public ConfirmationFormAction(ConfirmationDialogId dialogId)
 {
     this.dialogId = dialogId;
 }