Ejemplo n.º 1
0
        public KerdesKartya(GameTable parent)
        {
            InitializeComponent();
            this.Left = parent.Left + 75;
            this.Top = parent.Top + 100;
            /*
            ImageBrush myBrush = new ImageBrush();
            myBrush.ImageSource = new BitmapImage(new Uri(".\\Resources\\keret.png", UriKind.Relative));
            this.Background = myBrush;
             */
            answer = AnswerState.Null;

            timeoutworker = new BackgroundWorker();
            timeoutworker.WorkerReportsProgress = true;
            timeoutworker.WorkerSupportsCancellation = true;
            timeoutworker.DoWork += getTime;
            timeoutworker.ProgressChanged += tick;
            timeoutworker.RunWorkerCompleted += timeout;

            Question kerdes = Client.getQuestion(User);

            kerdess.Text = kerdes.Questionn;
            valasz1.Content = kerdes.GoodAnswer;
            valasz2.Content = kerdes.BadAnswer1;
            valasz3.Content = kerdes.BadAnswer2;
            valasz4.Content = kerdes.BadAnswer3;
        }
Ejemplo n.º 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            // Userek bepakolása szobákba

            GameTable game = new GameTable(null);
            game.Show();
        }
Ejemplo n.º 3
0
 void startGame(object sender, RunWorkerCompletedEventArgs e)
 {
     if (!e.Cancelled)
     {
         GameTable game = new GameTable(this);
         this.Hide();
         game.Show();
     }
 }