Example #1
0
 private void ShowSearchFromDatabaseForm(TextBox textBoxToChange, DatabaseSearchFormType searchType)
 {
     using (SearchFromDatabaseForm searchFromDatabaseForm = new SearchFromDatabaseForm(textBoxToChange, searchType))
         searchFromDatabaseForm.ShowDialog(this);
 }
Example #2
0
        public void ShowSearchFromDatabaseForm(TextBox textBoxToChange, DatabaseSearchFormType searchType)
        {
            if (!Settings.Default.UseWorldDatabase)
            {
                MessageBox.Show("You are unable to search for this in the creator-mode because a database connection is required.", "Can't search in creator-mode", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (SearchFromDatabaseForm searchFromDatabaseForm = new SearchFromDatabaseForm(textBoxToChange, searchType))
                searchFromDatabaseForm.ShowDialog(this);

            textBoxToChange.Focus();
        }