Пример #1
0
 /// <summary>
 /// Add new Screen
 /// </summary>
 /// <param name="screen">New screen, name must be unique</param>
 static public void add_screen(Screen screen)
 {
     foreach (Screen scr in _screens)
     {
         if (scr.Name == screen.Name)
         {
             return;
         }
     }
     _screens.Add(screen);
 }
Пример #2
0
 /// <summary>
 /// Go to screen
 /// </summary>
 /// <param name="name">Screen name</param>
 static public void goto_screen(string name)
 {
     foreach (Screen screen in _screens)
     {
         if (screen.Name == name)
         {
             // Shutsdown Previous Screen           
             _previous = ActiveScreen;
             if (ActiveScreen != null)
             {
                 ActiveScreen.Shutdown();
             }
             // Inits New Screen
             ActiveScreen = screen;
             if (_started) ActiveScreen.Init();
             return;
         }
     }
 }