public bool SwitchScreens(string screenName) { var found = false; foreach (var screen in _screenList) { if (screen.Name != screenName) continue; _currentScreen = screen; found = true; break; } return (found); }
public bool AddScreen(Screen screen) { var found = false; foreach (var scr in _screenList) { if (scr.Name != screen.Name) continue; found = true; } if(!found) _screenList.Add(screen); if (_screenList.Count == 1) _currentScreen = screen; return (!found); }