Example #1
0
        private void migrateToGemFireXDToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DBMigrate.MigrateCfg cfg = new DBMigrate.MigrateCfg();

            try
            {
                if (cfg.ShowDialog() == DialogResult.OK)
                {
                    DBMigrate.Progressor progessor = new DBMigrate.Progressor();
                    Thread pThread = new Thread(new ThreadStart(progessor.Run));
                    pThread.Start();
                    //pThread.Join();

                    if (progessor.DialogResult == DialogResult.Abort)
                    {
                        MessageBox.Show(
                            "Operation canceled!", "GemFireXDDBI", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else if (progessor.DialogResult == DialogResult.OK)
                    {
                        if (DBMigrate.Migrator.Errorred)
                        {
                            MessageBox.Show(
                                "Database migration completed with errors. Check log for details!", "GemFireXDDBI",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                        else
                        {
                            MessageBox.Show("Database migration completed successfully!", "GemFireXDDBI",
                                            MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Encountered exception during database migration. Check log for detail",
                                "DB Migration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                Util.Helper.Log(ex);
            }
        }
Example #2
0
        private void migrateToGemFireXDToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DBMigrate.MigrateCfg cfg = new DBMigrate.MigrateCfg();

            try
            {
                if (cfg.ShowDialog() == DialogResult.OK)
                {
                    DBMigrate.Progressor progessor = new DBMigrate.Progressor();
                    Thread pThread = new Thread(new ThreadStart(progessor.Run));
                    pThread.Start();
                    //pThread.Join();

                    if (progessor.DialogResult == DialogResult.Abort)
                        MessageBox.Show(
                            "Operation canceled!", "GemFireXDDBI", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    else if (progessor.DialogResult == DialogResult.OK)
                    {
                        if (DBMigrate.Migrator.Errorred)
                            MessageBox.Show(
                                "Database migration completed with errors. Check log for details!", "GemFireXDDBI",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        else
                            MessageBox.Show("Database migration completed successfully!", "GemFireXDDBI",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Encountered exception during database migration. Check log for detail",
                    "DB Migration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                Util.Helper.Log(ex);
            }
        }