Пример #1
0
        private void buttonCreateNewDatabase_Click(object sender, EventArgs e)
        {
            var frmDatabaseName = new FrmDatabaseName();

            if (DialogResult.OK != frmDatabaseName.ShowDialog())
            {
                return;
            }

            string dbName = frmDatabaseName.Result;

            if (DbExists(dbName))
            {
                lblResultMessage.Text = MultiLanguageStrings.GetString(Ressource.FrmDatabaseSettings, "FileException.Text");
            }
            else
            {
                groupBoxDatabaseManagement.Enabled = false;
                lblResultMessage.ForeColor         = Color.Black;
                lblResultMessage.Text = MultiLanguageStrings.GetString(Ressource.FrmDatabaseSettings, "DatabaseCreation.Text");
                bWDatabaseCreation.RunWorkerAsync(dbName);
            }
        }
Пример #2
0
        private void buttonCreateNewDatabase_Click(object sender, EventArgs e)
        {
            var frmDatabaseName = new FrmDatabaseName();
            if (DialogResult.OK != frmDatabaseName.ShowDialog()) return;

            string dbName = frmDatabaseName.Result;
            if (DbExists(dbName))
            {
                lblResultMessage.Text = MultiLanguageStrings.GetString(Ressource.FrmDatabaseSettings, "FileException.Text");
            }
            else
            {
                groupBoxDatabaseManagement.Enabled = false;
                lblResultMessage.ForeColor = Color.Black;
                lblResultMessage.Text = MultiLanguageStrings.GetString(Ressource.FrmDatabaseSettings, "DatabaseCreation.Text");
                bWDatabaseCreation.RunWorkerAsync(dbName);
            }
        }