Ejemplo n.º 1
0
        private void MnuDatabaseMigration_Click(object sender, EventArgs e)
        {
            FormDatabaseMigrate.ShowDialog(FormMain.Connection);

            if (FormMain.RestartRequired)
            {
                DialogResult = DialogResult.OK;
            }
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Shows the dialog.
    /// </summary>
    /// <param name="connection">A <see cref="SQLiteConnection"/> instance.</param>
    /// <returns><c>true</c> if changes were made to the database, <c>false</c> otherwise.</returns>
    public static bool ShowDialog(SQLiteConnection connection)
    {
        var form = new FormDatabaseMigrate {
            Connection = connection
        };

        using (form)
        {
            return(form.ShowDialog() == DialogResult.OK);
        }
    }