Esempio n. 1
0
        private void CreateWrite()
        {
            PasswordWriteBox b = new PasswordWriteBox();

            Viewport                    = b;
            Viewport.DataContext        = this;
            b.x_fail.SelectedItem       = Outcomes[Data.Definition.FailureId];
            b.x_success.SelectedItem    = Outcomes[Data.Definition.SuccessId];
            b.x_countdown.SelectedIndex = Data.Definition.Hints.Count;
            b.x_hints_holder.Visibility = Data.Definition.Hints.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
            b.RefillHints();
            b.x_countdown.SelectionChanged += b.x_countdown_SelectionChanged;
        }
Esempio n. 2
0
        public void CreateReadOnly()
        {
            PasswordBox b = new PasswordBox();

            DisplayPage = b;
            PasswordWriteBox p = Viewport as PasswordWriteBox;

            b.x_description.Text = p.x_description.Text;

            // answer was done
            if (Data.Answer.Id >= 0)
            {
                Answered();
            }
            else
            {
                b.x_send_answer.Click += X_send_answer_Click;
            }
        }