private void MirrorTablesForm_Load(object sender, EventArgs e)
        {
            ConnectionSetupForm csf = new ConnectionSetupForm();

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

            _fm = new FastMirror(csf.Server, csf.MainDatabase, csf.User, csf.Password,
                                 csf.Server, csf.MirrorDatabase, csf.User, csf.Password);
            try { _fm.Connect(); }
            catch (Exception ex)
            {
                MessageBox.Show("Failed to connect to MySQL server:  " + ex);
                Close();
            }
        }
Example #2
0
 private void TestForm_Load(object sender, EventArgs e)
 {
     try
     {
         ConnectionSetupForm csf = new ConnectionSetupForm();
         if (csf.ShowDialog() == DialogResult.OK)
         {
             _mirror = new FastMirror(csf.Server, csf.MainDatabase, csf.User, csf.Password,
                                      csf.Server, csf.MirrorDatabase, csf.User, csf.Password);
             _mirror.Connect();
         }
         else
         {
             Close();
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to connect:  " + ex);
         return;
     }
 }