예제 #1
0
        private void paris_Click_1(object sender, RoutedEventArgs e)
        {
            if (Jedis1.SelectedItem != null && Jedis2.SelectedItem != null)
            {
                bn.lancerPhaseTournoi(Int32.Parse(BettingPlayer1.Text), (Jedi)Jedis1.SelectedItem, Int32.Parse(BettingPlayer2.Text), (Jedi)Jedis2.SelectedItem);
                Jedis1.SelectedItem = null;
                Jedis1.ItemsSource = bn.Jedis;
                Jedis2.SelectedItem = null;
                Jedis2.ItemsSource = bn.Jedis;
                textBox.Text = bn.toString();
                if (bn.End)
                {
                    if (bn.Joueur1.Score > bn.Joueur2.Score)
                    {
                        MessageBox.Show("Joueur 1 a gagne");
                    }
                    else if (bn.Joueur1.Score == bn.Joueur2.Score)
                    {
                        MessageBox.Show("Egalite");

                    } else
                    {
                        MessageBox.Show("Joueur 2 a gagne");
                    }
                    Principale fenetre = new Principale();
                    fenetre.Show();
                    this.Close();
                }
            }
        }
        private void Retour_Click(object sender, RoutedEventArgs e)
        {
            Principale fenetre = new Principale();
            fenetre.Show();
            this.Close();

        }
예제 #3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (manager.CheckConnexionUser(LoginInput.Text.ToLower(), PasswordInput.Password))
     {
         ErrorLabel.Visibility = Visibility.Hidden;
         /*MainWindow win = new MainWindow();
         win.Show();*/
         Principale fenetre = new Principale();
         fenetre.Show();
         this.Close();
     }
     else
     {
         ErrorLabel.Visibility = Visibility.Visible;
     }
 }
예제 #4
0
        private void Refresh(){
            textBoxJedi.Text = "Match Courant : \n" + pm.title() + "\nResultat dernier match : \n" + pm.StatLastTurn;
            if (pm.End)
            {
                if (pm.Win)
                {
                    MessageBox.Show("Vous avez gagne !!");
                }
                else
                {
                    MessageBox.Show("Vous avez perdu !!");
                }

                Principale fenetre = new Principale();
                fenetre.Show();
                this.Close();
            }
        }
        private void Refresh()
        {
            textBoxJedi.Text = "Match Courant : \n" + pm.title() + "\nResultat dernier match : \n" + pm.StatLastTurn;
            if (pm.End)
            {
                if (pm.Win)
                {
                    MessageBox.Show("Vous avez gagne !!");
                }
                else
                {
                    MessageBox.Show("Vous avez perdu !!");
                }

                Principale fenetre = new Principale();
                fenetre.Show();
                this.Close();
            }
        }
        private void Jedi_Tournament_2016_Closing_1(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Principale fenetre = new Principale();

            fenetre.Show();
        }