protected override void Initialize() { spriteManager = new SpriteManager(this); Components.Add(spriteManager); base.Initialize(); gameGateway.OnGameFinished += GameFinishedHandler; LoginForm loginForm = new LoginForm(); loginForm.OnStartWithAI += (nickname) => { gameGateway.SpriteManager = spriteManager; gameGateway.StartGame(); }; loginForm.OnStartWithNetUser += (nickname) => { MessageBox.Show("Comming soon"); }; loginForm.OnAboutShow += () => { About about = new About(); about.ShowDialog(); }; loginForm.OnExit += () => { _exitCommand = true; }; loginForm.ShowDialog(); }
private void GameFinishedHandler(string status) { ResultWindow result = new ResultWindow(status); result.OnStartWithAI += () => { gameGateway.SpriteManager = spriteManager; gameGateway.StartGame(); }; result.OnStartWithNetUser += () => { MessageBox.Show("Comming soon"); }; result.OnAboutShow += () => { About about = new About(); about.ShowDialog(); }; result.OnExit += () => { _exitCommand = true; }; result.ShowDialog(); }