コード例 #1
0
        private async void  CreateDatabaseBTN(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Sure", "Title", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.No)
            {
                return;
            }
            var watch = System.Diagnostics.Stopwatch.StartNew();
            CreateDatatableStrings str = new CreateDatatableStrings();

            //await CreateDatabaseAsync();
            sqlexec.SQLCommandKey(Properties.Settings.Default.DBName, str.FOREIGN_KEY(0));
            await CreateDatabaseAsync();

            //sqlexec.SQLCommandKey(Properties.Settings.Default.DBName, str.FOREIGN_KEY(0));
            //await FillFakeDatabase(0);
            //sqlexec.SQLCommandKey(Properties.Settings.Default.DBName, str.FOREIGN_KEY(1));
            watch.Stop();
            var elapsedMs = watch.ElapsedMilliseconds;

            MessageBox.Show(elapsedMs.ToString());
        }