Example #1
0
 private void Reset()
 {
     // If the worker is going, cancel it
     StopExecuted(null, null);
     if (RecordStream != null)
     {
         ShutdownRecording();
     }
     if (Arena != null)
     {
         Arena.Dispose();
     }
     Arena         = new DefectGrid(ArenaWidth, ArenaHeight, ArenaLevels, Neighbourhood);
     Output.Width  = ArenaWidth * Scale;
     Output.Height = ArenaHeight * Scale;
     InitializeBitmap();
     InitializeColorData();
     InitializePalette();
     UpdateColorData();
     UpdateBitmap();
     Output.Source = Bitmap;
     Status.Text   = "Ready";
     if (RecordFilename != null)
     {
         InitializeRecording();
     }
 }
Example #2
0
 private void Reset()
 {
     // If the worker is going, cancel it
       StopExecuted(null, null);
       if (RecordStream != null) {
     ShutdownRecording();
       }
       if (Arena != null) {
     Arena.Dispose();
       }
       Arena = new DefectGrid(ArenaWidth, ArenaHeight, ArenaLevels, Neighbourhood);
       Output.Width = ArenaWidth * Scale;
       Output.Height = ArenaHeight * Scale;
       InitializeBitmap();
       InitializeColorData();
       InitializePalette();
       UpdateColorData();
       UpdateBitmap();
       Output.Source = Bitmap;
       Status.Text = "Ready";
       if (RecordFilename != null) {
     InitializeRecording();
       }
 }