Ejemplo n.º 1
0
                public static void CreateButtonsEvents()
                {
                    LeftButton.Click += (s, e) =>
                    {
                        QuestionPath.SelectAnswer(AnswerType.Left);

                        if (QuestionPath.NextQuestion())
                        {
                            Render(QuestionPath.CurrentQuestion);
                        }
                        else
                        {
                            IsTestFinished = true;
                            Test.Release();
                            PostScreen.Render();
                        }
                    };
                    RightButton.Click += (s, e) =>
                    {
                        QuestionPath.SelectAnswer(AnswerType.Right);

                        if (QuestionPath.NextQuestion())
                        {
                            Render(QuestionPath.CurrentQuestion);
                        }
                        else
                        {
                            IsTestFinished = true;
                            Test.Release();
                            PostScreen.Render();
                        }
                    };
                }
Ejemplo n.º 2
0
        private void BtnPost_Click(object sender, RoutedEventArgs e)
        {
            if (MyUser == null)
            {
                MessageBox.Show("Please login to post!");
            }
            else
            {
                PostScreen post = new PostScreen(this);

                post.ShowDialog();
            }
        }