Exemple #1
0
        private void Caserne2Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (Producer2 == null)
            {
                Task <SoldiersProducer> newProducer = RecupProducer(2);
                Producer2 = newProducer.Result;
                Producer2 = newSoldierProducerMySQLManager.GetSoldiersProducer(Producer2);
            }
            SoldierProducerViewModel popUp = SoldierProducerViewModel.GetProducersViewModelMultition(Producer2);

            popUp.View.SoldierView.DataContext = Producer2.SoldierType;
            popUp.View.Visibility = System.Windows.Visibility.Visible;
        }
Exemple #2
0
        private void Caserne3Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (Producer3 == null)
            {
                Task <SoldiersProducer> newProducer = RecupProducer(3);
                Producer3 = newProducer.Result;
                Producer3 = newSoldierProducerMySQLManager.GetSoldiersProducer(Producer3);
            }
            SoldierProducerViewModel popUp = SoldierProducerViewModel.GetProducersViewModelMultition(Producer3);

            if (Producer3.IsActive == true)
            {
                popUp.View.Background             = Brushes.Green;
                popUp.View.SoldierView.Visibility = System.Windows.Visibility.Visible;
            }
            popUp.View.SoldierView.DataContext = Producer3.SoldierType;
            popUp.View.Visibility = System.Windows.Visibility.Visible;
        }