// Opens related form on key press private void OpenFormsOnKeyPress(object sender, KeyPressEventArgs e) { var key = e.KeyChar; switch (key) { case 'a': Form addQuoteForm = new AddQuote(); addQuoteForm.ShowDialog(); break; case 'v': Form viewQuotesForm = new ViewAllQuotes(); viewQuotesForm.ShowDialog(); break; case 's': Form searchQuotesForm = new searchQuotes(); searchQuotesForm.ShowDialog(); break; case 'x': Application.Exit(); break; } // Prevents event from firing multiple times e.Handled = true; }
public void searchQuotes() { //Login loginobj2 = new Login test = extent.StartTest("Searching Quotes for the Job"); searchQuotes searchquoteobj = new searchQuotes(); searchquoteobj.seacchingQuotesSteps(); }
// Opens Search Quotes form on button click private void SearchQuotes_Click(object sender, EventArgs e) { Form searchQuotesForm = new searchQuotes(); searchQuotesForm.ShowDialog(); }