Exemplo n.º 1
0
        private void MainMenu_Shown(object sender, EventArgs e)
        {
            try
            {
                Database.DatabaseHandler.Setup();
            }
            catch
            {
                Form errorForm = new DatabaseUnavailable();
                errorForm.ShowDialog();
                switch (errorForm.DialogResult)
                {
                case DialogResult.Abort:
                    Environment.Exit(0);
                    break;

                case DialogResult.Yes:
                    Form dbSettings = new DatabaseSettingsForm();
                    dbSettings.ShowDialog();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        private void databaseSettings_Click(object sender, EventArgs e)
        {
            Form dbSettings = new DatabaseSettingsForm();

            dbSettings.ShowDialog();
        }