/// <summary> /// Handle Register button press. /// </summary> public void BtnRegister_Click(object sender, EventArgs e) { if (C_NetworkConfig.Socket.IsConnected == true) { C_Sound.PlaySound("Click.ogg"); C_UpdateUI.PnlRegisterVisible = true; C_UpdateUI.PnlLoginVisible = false; C_UpdateUI.PnlCharCreateVisible = false; C_UpdateUI.PnlCreditsVisible = false; pnlIPConfig.Visible = false; } }
/// <summary> /// Handle Credits button press. /// </summary> public void BtnCredits_Click(object sender, EventArgs e) { C_Sound.PlaySound("Click.ogg"); if (C_UpdateUI.PnlCreditsVisible == false) { tmrCredits.Enabled = true; } C_UpdateUI.PnlCreditsVisible = true; C_UpdateUI.PnlLoginVisible = false; C_UpdateUI.PnlRegisterVisible = false; C_UpdateUI.PnlCharCreateVisible = false; pnlIPConfig.Visible = false; }
/// <summary> /// Handle Play button press. /// </summary> public void BtnPlay_Click(object sender, EventArgs e) { if (C_NetworkConfig.Socket.IsConnected == true) { C_Sound.PlaySound("Click.ogg"); C_UpdateUI.PnlRegisterVisible = false; C_UpdateUI.PnlLoginVisible = true; C_UpdateUI.PnlCharCreateVisible = false; C_UpdateUI.PnlCreditsVisible = false; pnlIPConfig.Visible = false; txtLogin.Focus(); if (C_Types.Options.SavePass == true) { txtLogin.Text = C_Types.Options.Username; txtPassword.Text = C_Types.Options.Password; chkSavePass.Checked = true; } } }
/// <summary> /// Handles Exit button press. /// </summary> public void BtnExit_Click(object sender, EventArgs e) { C_Sound.PlaySound("Click.ogg"); C_General.DestroyGame(); }