private void btnSearchQuotes_Click(object sender, EventArgs e)
        {
            SearchQuotes searchQuotes = new SearchQuotes();

            searchQuotes.Tag = this;
            searchQuotes.Show(this);
            Hide();
        }
Пример #2
0
 private void btnOpenSearchQuotes_Click(object sender, EventArgs e)
 {
     try {
         //This creates the new form
         var searchQuotesForm = new SearchQuotes();
         //Tag this object so that it can open when another window is opened
         searchQuotesForm.Tag = this;
         searchQuotesForm.Show();
         Hide();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         MessageBox.Show("There was an error loading quotes.\nPlease make sure there are quotes saved.", "Error", MessageBoxButtons.OK);
     }
 }