//When pressed, the button raises event for closing SearchFile Form //When pressed, the IsPressed property of CreateFileBindingModel is set to true private void button2_Click(object sender, EventArgs e) { SearchMenuController.SetSearchFileBindingModelIsPressedAsync(bindingModel); //Resets textbox for next use textBox1.Text = String.Empty; this.Close(); }
//When used, the KeyEvent handler checks if user presses enter. //When used, the KeyEvent handler checks if user uses the program correctly private void textBox1_KeyPress(object sender, KeyPressEventArgs keyEvent) { SearchMenuController.CheckIfUserPressesEnterAsync(textBox1.Text, this, keyEvent, bindingModel); }
//When pressed, the button raises event for checking if the user uses the program correctly private void button1_Click(object sender, EventArgs e) { SearchMenuController.CheckIfTextBoxIsEmptyAsync(textBox1.Text, this, bindingModel); textBox1.Text = String.Empty; }