Exemple #1
0
        private void FastConfirmationWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            ConfirmationTag confirmationTag = (ConfirmationTag)Tag;

            CancelBtn.Content  = confirmationTag.CancelButton;
            ConfirmBtn.Content = confirmationTag.ContinueButton;
            DescriptionTb.Text = confirmationTag.DescriptionText;
            if (confirmationTag.Icon != null)
            {
                Icon = confirmationTag.Icon;
            }

            Height = DescriptionTb.LineCount * ConfirmationWindow.FontSizeMultiplier + 89;
        }
Exemple #2
0
        private void ConfirmationWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            ConfirmationTag confirmationTag = (ConfirmationTag)Tag;

            CancelBtn.Content              = confirmationTag.CancelButton;
            ConfirmBtn.Content             = confirmationTag.ContinueButton;
            DescriptionTb.Text             = confirmationTag.DescriptionText;
            WhatToWriteTb.Text             = string.Format(ConfirmationStrings.WriteInstructions, confirmationTag.Confirmation);
            ConfirmationBoxTb.TextChanged += ConfirmationBoxTb_OnTextChanged;
            if (confirmationTag.Icon != null)
            {
                Icon = confirmationTag.Icon;
            }

            Title  = confirmationTag.Title;
            Height = DescriptionTb.LineCount * FontSizeMultiplier + 123;
        }
Exemple #3
0
        internal bool Confirm()
        {
            ConfirmationTag confirmationTag = Tag;

            confirmationTag.Sound?.Play();

            if (ConfirmByRetyping)
            {
                ConfirmationWindow window = new ConfirmationWindow(confirmationTag);
                window.ShowDialog();
                return(window.Tag is ConfirmationTag b && b.Confirmed);
            }
            else
            {
                FastConfirmationWindow window = new FastConfirmationWindow(confirmationTag);
                window.ShowDialog();
                return(window.Tag is ConfirmationTag b && b.Confirmed);
            }
        }
Exemple #4
0
 internal ConfirmationWindow(ConfirmationTag tag)
 {
     InitializeComponent();
     Tag = tag;
 }