// 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; }
private void ViewQuotesButton_Click(object sender, EventArgs e) { this.Hide(); ViewAllQuotes vq = new ViewAllQuotes(); vq.ShowDialog(); this.Close(); }
private void view_button_Click(object sender, EventArgs e) { this.Hide(); ViewAllQuotes view = new ViewAllQuotes(); view.ShowDialog(); this.Close(); }
private void bttnViewQuotes_Click(object sender, EventArgs e) { ViewAllQuotes ViewQuotes = new ViewAllQuotes(); ViewQuotes.ShowDialog(); }
// Opens View All Quotes form on button click private void ViewAllQuotes_Click(object sender, EventArgs e) { Form viewQuotesForm = new ViewAllQuotes(); viewQuotesForm.ShowDialog(); }