Example #1
0
 public function OnInit()
 {
     $main = new DemoFrame();
     $main->Show();
     $controller = new ControlFrame($main->getDemoNames(), $main->getHelpStrings());
     $controller->Show();
     $controller->setChangeDemoHandler(function ($index, $alignFlags, $borderFlags, $borderSize) use($main) {
         $main->switchDemo($index, $alignFlags, $borderFlags, $borderSize);
     });
     // Must be called after the handler is set
     $controller->setDemoChoice(0);
     return true;
 }
Example #2
0
 public function OnInit()
 {
     $main = new MainFrame();
     $main->Show();
     $controller = new ControlFrame($main->getDemoNames());
     $controller->Show();
     $controller->setChangeHandler(function ($index) use($main) {
         $main->switchDemo($index);
     });
     // Must be called after the handler is set
     $controller->setChoice(0);
     return true;
 }