Exemplo n.º 1
0
        private void UserControl_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyboardDevice.Modifiers == ModifierKeys.Alt &&
                e.SystemKey == Key.Left)
            {
                controller.MoveToPreviousQuestion();
            }
            else if (e.KeyboardDevice.Modifiers == ModifierKeys.Alt &&
                     e.SystemKey == Key.Right)
            {
                controller.MoveToNextQuestion();
            }
            else if (e.KeyboardDevice.Modifiers == ModifierKeys.Control &&
                     e.Key == Key.D)
            {
                RemoveQuestion.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));

                // Stop the character from being entered in textboxes
                e.Handled = true;
            }
            else if (e.KeyboardDevice.Modifiers == ModifierKeys.Control &&
                     e.Key == Key.S)
            {
                SaveQuestions.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));

                // Stop the character from being entered in textboxes
                e.Handled = true;
            }
            else if (e.Key == Key.Escape)
            {
                CloseCreator.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
            }
        }
Exemplo n.º 2
0
        public AnswerStatusResponse Post(RemoveQuestionRequest request)
        {
            var command = new RemoveQuestion()
            {
                AggregateId = request.QuestionId
            };

            SendCommand(command);

            return new AnswerStatusResponse()
            {
                AnswerId = request.QuestionId
            };
        }
Exemplo n.º 3
0
 private void removeQuestionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     player.Stop();
     RemoveQuestion?.Invoke(this, EventArgs.Empty);
 }