Exemplo n.º 1
0
        public ShopForm(MainForm mf)
        {
            InitializeComponent();

            mainForm = mf;

            this.basketMoneyLabel.Text = basketMoney.ToString();
            this.coinsCountLabel.Text  = ServerEmu.getCoins().ToString();
        }
Exemplo n.º 2
0
        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();
        }