Differences From Artifact [e185ff3281d95738]:
- File        
src/gui.d
- 2012-07-14 14:33:25 - part of checkin [aea6cfc7e3] on branch trunk - further clean up. (user: kinaba) [annotate]
 
To Artifact [bcbc7e6a97423060]:
- File        
src/gui.d
- 2012-07-14 16:04:29 - part of checkin [0c10424b3c] on branch trunk - Minor fix for danger avoidance. (user: kinaba) [annotate]
 
   17          private void delegate(char c) fn;                                             17          private void delegate(char c) fn;
   18          void set_fn(F)(F f) { this.fn = f; }                                          18          void set_fn(F)(F f) { this.fn = f; }
   19                                                                                        19  
   20          void run(bool automate = false)                                               20          void run(bool automate = false)
   21          {                                                                             21          {
   22                  if(automate) {                                                        22                  if(automate) {
   23                          Timer t = new Timer;                                          23                          Timer t = new Timer;
   24                          t.interval = 100;                                        |    24                          t.interval = 50;
   25                          t.tick ~= (Timer sender, EventArgs ea){                       25                          t.tick ~= (Timer sender, EventArgs ea){
   26                                  fn(solver.single_step());                             26                                  fn(solver.single_step());
   27                          };                                                            27                          };
   28                          t.start();                                                    28                          t.start();
   29                          this.closing ~= (Form f,CancelEventArgs c){t.stop();};        29                          this.closing ~= (Form f,CancelEventArgs c){t.stop();};
   30                  }                                                                     30                  }
   31                  Application.run(this);                                                31                  Application.run(this);