Exemplo n.º 1
0
        /*===============================*\
        |*         Constructeurs         *|
        \*===============================*/
        public MainWindow()
        {
            InitializeComponent();

            timer          = new DispatcherTimer();
            timer.Tick    += new EventHandler(Timer_Tick);
            timer.Interval = TimeSpan.FromSeconds(1);

            numberWidth.SetValue(10);
            numberHeight.SetValue(10);
            labelSpeed.Content = "1 " + this.FindResource("seconds");

            view = grid;
            groupBoxStatistics.DataContext = view.Statistics;
            groupBoxShape.DataContext      = view.Patterns;
        }
Exemplo n.º 2
0
        /*===============================*\
        |*        Méthodes Privées       *|
        \*===============================*/

        /// <summary>
        /// Change de grille affichée sur l'interface
        /// </summary>
        /// <param name="newGrid">La nouvelle grille</param>
        private void SetGrid(Views.Grid newGrid)
        {
            view = newGrid;
            panelGrid.Children.Clear();
            panelGrid.Children.Add(newGrid);
        }