private void homeButton_Click(object sender, EventArgs e) { //Remove the cuurent panel and load the home panel HomePanel panel = new HomePanel(); this.Parent.Invoke(new MethodInvoker(delegate() { this.Parent.Controls.Add(panel); })); this.Parent.Invoke(new MethodInvoker(delegate() { this.Parent.Controls.Remove(this); })); panel.Initialize(); }
public GameLobbyAdmin(string gameID, string playerName, string password, string jwt, Socket sock, HomePanel homePanel) : base() { this.gameID = gameID; this.password = password; this.playerName = playerName; this.jwt = jwt; this.sock = sock; this.Dock = DockStyle.Fill; this.waiting = true; this.inGame = false; this.homePanel = homePanel; }
public Form1() { InitializeComponent(); //Resize thw window to be a square this.Size = new Size(this.Width, this.Width); //Load the home window HomePanel panel = new HomePanel(); panel.Parent = this; this.Controls.Add(panel); panel.Initialize(); }
public JoinGamePanel(HomePanel homepanel) { this.Dock = DockStyle.Fill; this.homepanel = homepanel; }
public CreateGamePanel(HomePanel homePanel) : base() { this.Dock = DockStyle.Fill; this.homePanel = homePanel; }