Exemplo n.º 1
0
 private void NewExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     MainWindow newMainWindow = new MainWindow(this);
       newMainWindow.Show();
 }
Exemplo n.º 2
0
 public MainWindow(MainWindow creator)
 {
     InitializeComponent();
       if (creator == null) {
     ArenaLevels = 16;
     ArenaWidth = 256;
     ArenaHeight = 256;
     Scale = 1;
     SpeedSlider.Value = Math.Floor((SpeedSlider.Minimum + SpeedSlider.Maximum) / 4);
     Neighbourhood = CellNeighbourhood.VonNeumann;
       }
       else {
     ArenaLevels = creator.ArenaLevels;
     ArenaWidth = creator.ArenaWidth;
     ArenaHeight = creator.ArenaHeight;
     Scale = creator.Scale;
     SpeedSlider.Value = creator.SpeedSlider.Value;
     Neighbourhood = creator.Neighbourhood;
       }
       Reset();  // draw an initial random image
 }