Пример #1
0
        public Controller(LifeCanvas board)
        {
            _board    = board;
            IsRunning = false;

            _timer = new System.Threading.Timer(o =>
            {
                _board.Update();
            }, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
        }
Пример #2
0
 private void Play(object sender, RoutedEventArgs e)
 {
     LifeCanvas.Play();
     if (LifeCanvas.IsPlaying)
     {
         PlayButton.Content = "Pause";
     }
     else
     {
         PlayButton.Content = "Play";
     }
 }
Пример #3
0
 private void Clear(object send, RoutedEventArgs e)
 {
     LifeCanvas.Clear();
 }
Пример #4
0
 private void Randomize(object send, RoutedEventArgs e)
 {
     LifeCanvas.Randomize();
 }