private void btnNewGame_Click(object sender, EventArgs e) { FrmPlaygame frmPlaygame = new FrmPlaygame(); frmPlaygame.Show(); Hide(); }
// start the game button private void newGameButtonClick(object sender, EventArgs e) { // start the actual game form and hide this title form Hide(); FrmPlaygame frmPlaygame = new FrmPlaygame(); frmPlaygame.FormBorderStyle = this.FormBorderStyle; frmPlaygame.WindowState = this.WindowState; frmPlaygame.ShowDialog(); Close(); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case (Keys.Shift | Keys.N): FrmPlaygame frmPlaygame = new FrmPlaygame(userName); frmPlaygame.Show(); Hide(); return(true); case (Keys.Shift | Keys.R): if (btnViewRuleBook.Text.StartsWith("View", true, null)) { picRulebook.Visible = true; btnViewRuleBook.Text = "Close Rule Book"; } else { picRulebook.Visible = false; btnViewRuleBook.Text = "View Rule Book"; } return(true); case (Keys.Shift | Keys.S): FrmSettings frmSettings = new FrmSettings(this); frmSettings.Show(); Hide(); return(true); case (Keys.Shift | Keys.Q): Application.Exit(); return(true); default: return(base.ProcessCmdKey(ref msg, keyData)); } }
public FrmTitle() { InitializeComponent(); FrmPlaygame.change_background(Resources.ResourceManager.GetObject("Background_Red") as Bitmap); // Gabrielle: Automatically makes red bg }
private void image_handler(String resourcename) { FrmPlaygame.change_background(Resources.ResourceManager.GetObject(resourcename) as Bitmap); }