public DetailsAttaqueView(AttaqueInfoVM aVM)
        {
            InitializeComponent();

            this.DataContext      = aVM;
            aVM.DemandeFermeture += Fermeture;
        }
        public DetailsAttaqueView()
        {
            InitializeComponent();

            AttaqueInfoVM attaqueInfoVM = new AttaqueInfoVM();

            this.DataContext = attaqueInfoVM;
            attaqueInfoVM.DemandeFermeture += Fermeture;
        }
Exemple #3
0
        private void TestDetailsDmg_Click(object sender, RoutedEventArgs e)
        {
            DetailsAttaqueView detailsAttaqueView = new DetailsAttaqueView();

            if (detailsAttaqueView.ShowDialog() == true)
            {
                MessageBox.Show("VRAI!!");
                AttaqueInfoVM viewModel = (AttaqueInfoVM)detailsAttaqueView.DataContext;
            }
            else
            {
                MessageBox.Show("FAUX!!");
            }
        }