private DlgGameLobby(SpaceSiegeGame game) { this.InitializeComponent(); this.mGame = game; this.chatPanel.AddChatParticipant(User.Current); for (int i = 0; i < this.ParticipantPanels.Length; i++) { this.ParticipantPanels[i].Game = game; this.ParticipantPanels[i].Postition = i; this.ParticipantPanels[i].CharacterChanged += new LobbyParticipantEventHandler(this.DlgGameLobby_CharacterChanged); this.ParticipantPanels[i].ReadyStateChanged += new LobbyParticipantEventHandler(this.DlgGameLobby_ReadyStateChanged); this.ParticipantPanels[i].OpenPosition += new LobbyParticipantEventHandler(this.DlgGameLobby_OpenPosition); this.ParticipantPanels[i].ClosePosition += new LobbyParticipantEventHandler(this.DlgGameLobby_ClosePosition); this.ParticipantPanels[i].LeaveLobby += new LobbyParticipantEventHandler(this.DlgGameLobby_LeaveLobby); this.ParticipantPanels[i].KickParticipant += new LobbyParticipantEventHandler(this.DlgGameLobby_KickParticipant); this.ParticipantPanels[i].DisbandLobby += new LobbyParticipantEventHandler(this.DlgGameLobby_DisbandLobby); this.ParticipantPanels[i].InviteParticipant += new LobbyParticipantEventHandler(this.DlgGameLobby_InviteParticipant); this.ParticipantPanels[i].OccupyPosition += new LobbyParticipantEventHandler(this.DlgGameLobby_OccupyPosition); this.ParticipantPanels[i].LaunchGame += new LobbyParticipantEventHandler(this.DlgGameLobby_LaunchGame); this.ParticipantPanels[i].ErrorMessage += new StringEventHandler(this.DlgGameLobby_ErrorMessage); } }
public static DlgGameLobby JoinGame(SpaceSiegeGame game) { DlgGameLobby lobby = new DlgGameLobby(game); lobby.chatPanel.gpgChatGrid.Refresh(); return lobby; }
public SpaceSiegeGameParticipant(SpaceSiegeGame game, string name, int id) : base(game, name, id) { }
public static DlgGameLobby HostGame() { SpaceSiegeGame game = new SpaceSiegeGame(new SpaceSiegeGameParticipant(User.Current.Name, User.Current.ID)); game.Host.Position = 0; DlgGameLobby lobby = new DlgGameLobby(game); lobby.chatPanel.gpgChatGrid.Refresh(); return lobby; }
public SpaceSiegeGameParticipant(SpaceSiegeGame game) : base(game) { }