Exemplo n.º 1
0
 private void SearchItemTextBox_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         SearchItemButton.PerformClick();
         e.Handled          = true;
         e.SuppressKeyPress = true;
     }
 }
Exemplo n.º 2
0
        public void RefreshForm()
        {
            if (OpenCon())
            {
                string          query  = "SELECT name, money, image FROM users WHERE id_user='******'";
                MySqlCommand    cmd    = new MySqlCommand(query, Con);
                MySqlDataReader reader = cmd.ExecuteReader();
                reader.Read();
                UserNameLabel.Text           = reader["name"].ToString();
                UserDescriptionTextBox.Text  = "Баланс: " + reader["money"].ToString();
                UserPictureBox.ImageLocation = reader["image"].ToString();

                //SearchItemTextBox.Clear();
                //SearchTraderTextBox.Clear();
                //SearchInventoryItemTextBox.Clear();
                CloseCon();
            }
            SearchItemButton.PerformClick();
            SearchTraderButton.PerformClick();
            SearchInventoryButton.PerformClick();
        }