/// <summary> /// Open the phone if the user clicks on the phone icon. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void pbox_phone_Click(object sender, EventArgs e) { GameWindow.GetInstance().RemoveAllControls(); this.FindForm().Controls.Add(new Phone()); }
/// <summary> /// Open the map of the user clicks on the map icon. /// </summary> /// <param name="sender">Control calling the method.</param> /// <param name="e">Arguments from the action whose caused the call of this method.</param> private void pbox_map_Click(object sender, EventArgs e) { GameWindow.GetInstance().RemoveAllControls(); this.FindForm().Controls.Add(new Map(this.FindForm().Text)); }
/// <summary> /// Remove the game message in the game window. /// </summary> /// <param name="sender">Control calling the method.</param> /// <param name="e">Arguments from the action whose caused the call of this method.</param> private void btn_ok_Click(object sender, EventArgs e) { GameWindow.GetInstance().Controls.Remove(this); GameWindow.GetInstance().Focus(); GameWindow.GetInstance().Refresh(); }