private void ShowHostGameDialog() { hostGameDialog = new HostGameSettings(); hostGameDialog.Show(DialogPlaceHolder); hostGameDialog.OnClose += HostGameSettingsDialogOnClose; BorderButtons.IsEnabled = false; }
private void HostGameSettingsDialogOnClose(object o, DialogResult dialogResult) { BorderButtons.IsEnabled = true; if (dialogResult == DialogResult.OK) { if (hostGameDialog.SuccessfulHost) { if (WindowManager.PreGameLobbyWindow == null) { WindowManager.PreGameLobbyWindow = new PreGameLobbyWindow(); WindowManager.PreGameLobbyWindow.Setup(hostGameDialog.IsLocalGame, WindowManager.Main); } } } hostGameDialog.Dispose(); hostGameDialog = null; }