コード例 #1
0
        private void Submit_Click(object sender, RoutedEventArgs e)
        {
            Question question = new Question
            {
                Title            = TitleBox.Text,
                Text             = BodyTextBox.Text,
                PrefilledAnswers = PrefilledAnswers.Select(x => x.Answer).ToList()
            };

            SubmitClicked?.Invoke(this, question);
        }
コード例 #2
0
        private void OtpSubmit_Clicked(object sender, EventArgs e)
        {
            string otp = OtpTextBox.Text.Trim();

            if (string.IsNullOrEmpty(otp) && otp.Length < 6)
            {
                return;
            }

            if (SubmitClicked.CanExecute(otp))
            {
                SubmitClicked.Execute(otp);
            }
        }
コード例 #3
0
 private void Submit_Clicked(object sender, EventArgs e)
 {
     SubmitClicked?.Invoke(this, EventArgs.Empty);
 }