示例#1
0
 private void frmStep2b_Load(object sender, System.EventArgs e)
 {
     globals.LoadedForms.Add(this.Name, this);
     try
     {
         ArrayList servers = DataBaseServers.GetDBServers();
         foreach (string server in servers)
         {
             cmbServer.Items.Add(server);
         }
         //set the fields in case we came back from step3
         if (globals.ConfigurationSettings.SQLServer != String.Empty)
         {
             if (globals.ConfigurationSettings.SQLServer == ".")
             {
                 cmbServer.Text = "(local)";
             }
             else
             {
                 cmbServer.Text = globals.ConfigurationSettings.SQLServer;
             }
             txtCWUser.Text  = globals.ConfigurationSettings.CWUser;
             txtCWPass.Text  = globals.ConfigurationSettings.CWPass;
             txtCWPass2.Text = globals.ConfigurationSettings.CWPass;
         }
     }
     catch
     {}
     finally
     {
         GC.Collect();
     }
 }
示例#2
0
 private void frmStep2_Load(object sender, System.EventArgs e)
 {
     globals.LoadedForms.Add(this.Name, this);
     try
     {
         ArrayList servers = DataBaseServers.GetDBServers();
         foreach (string server in servers)
         {
             cmbServer.Items.Add(server);
         }
         //set the fields in case we came back from step3
         if (globals.ConfigurationSettings.SQLServer != String.Empty)
         {
             if (globals.ConfigurationSettings.SQLServer == ".")
             {
                 cmbServer.Text = "(local)";
             }
             else
             {
                 cmbServer.Text = globals.ConfigurationSettings.SQLServer;
             }
             txtDBAUser.Text = globals.ConfigurationSettings.DBAUser;
             txtDBAPass.Text = globals.ConfigurationSettings.DBAPass;
             txtCWUser.Text  = globals.ConfigurationSettings.CWUser;
             txtCWPass.Text  = globals.ConfigurationSettings.CWPass;
             txtCWPass2.Text = globals.ConfigurationSettings.CWPass;
             nudDBSize.Value = globals.ConfigurationSettings.DBSize;
             if (globals.ConfigurationSettings.DBSizeMax != 0)
             {
                 chkDBSizeMax.Checked = true;
                 nudDBSizeMax.Value   = globals.ConfigurationSettings.DBSizeMax;
                 nudDBSizeMax.Enabled = true;
             }
             txtDBIndexesPath.Text = globals.ConfigurationSettings.DBIndexesPath;
             txtDBDataPath.Text    = globals.ConfigurationSettings.DBDataPath;
             txtDBLogPath.Text     = globals.ConfigurationSettings.DBLogPath;
         }
     }
     catch
     {}
     finally
     {
         GC.Collect();
     }
 }