Ejemplo n.º 1
0
        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        internal Grille()
        {
            thisOne = this;
            InitialisationMatrice();
            MouseRightButtonDown += Grille_MouseClickRight;
            MouseLeftButtonDown  += Grille_MouseClickLeft;

            MainWindow.thisOne.bomberestante__.Source      = DicoTuiles[Motifs.comptmoins];
            MainWindow.thisOne.bomberestantedizaine.Source = DicoTuiles[Motifs.compt2];
            MainWindow.thisOne.bomberestanteunité.Source   = DicoTuiles[Motifs.compt7];
        }
Ejemplo n.º 2
0
        // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        public MainWindow()
        {
            InitializeComponent();
            thisOne = this;
            grille  = new Grille();
            mainGrid.Children.Insert(0, grille);

            //menu = new MenuPrincipal();
            //Grid1.Children.Add(menu);
            //this.Content = mainGrid;
            Loaded += MainWindow_Loaded;
        }
Ejemplo n.º 3
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            int result;

            if (int.TryParse(textBox.Text, out result))
            {
                Grille.ChangeCotéMap(result);
            }

            if (int.TryParse(textBox1.Text, out result))
            {
                Grille.ChangeUnitésVisibles(result);
            }

            if (int.TryParse(textBox2.Text, out result))
            {
                Grille.Changeiov(result);
            }

            if (int.TryParse(textBox3.Text, out result))
            {
                Grille.Changejov(result);
            }
        }