Beispiel #1
0
        /// <inheritdoc/>
        public void ShowModal(IModalData modalData)
        {
            if (modalData == null)
            {
                if (ActiveModalData == null)
                {
                    return;
                }
            }
            else
            {
                ModalActive     = true;
                ActiveModalData = modalData;
            }

            if (ActiveModalData.Card != null)
            {
                if (ActiveModalData.Card.StepModalData == null)
                {
                    ActiveModalData.Instructions     = "The Step \"" + ActiveModalData.Card.StepTitle + "\" Failed at step #" + (ActiveModalData.Card.CardStepIndex + 1).ToString() + Environment.NewLine + "Select an action below:";
                    ActiveModalData.InstructionImage = (BitmapImage)ActiveModalData.Card.StepImage ! ?? null;
                }
            }

            if (ActiveModalData.CustomButtonGlyph != null && ActiveModalData.CustomButtonText != null)
            {
                ActiveModalData.CanCustom = true;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModalService"/> class.
 /// </summary>
 /// <param name="modalFactory">The modalFactory<see cref="IModalFactory"/>.</param>
 public ModalService(IModalFactory modalFactory)
 {
     _modalFactory    = modalFactory;
     _activeModalData = _modalFactory.CreateModalData();
 }