public ShopForm(MainForm mf) { InitializeComponent(); mainForm = mf; this.basketMoneyLabel.Text = basketMoney.ToString(); this.coinsCountLabel.Text = ServerEmu.getCoins().ToString(); }
private void tryLoginButton_Click(object sender, EventArgs e) { if (this.loginTextBox.Text.Length != 0 && this.passwordTextBox.Text.Length != 0 && ServerEmu.TryLogin(this.loginTextBox.Text, this.passwordTextBox.Text)) { mainForm.setUsername(ServerEmu.getUsername()); mainForm.Show(); this.Hide(); } else { MessageBox.Show("Error", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); } this.loginTextBox.Clear(); this.passwordTextBox.Clear(); }