示例#1
0
 public void GoScript()
 {
     /* Note: This class is how to progress in to the program.   *
      * It has been placed in a separate class from the "Script" *
      * button so that it can be called from more than one user  *
      * interaction method.                                      */
     if (tbxServerName.Text != "" && cbxDatabaseName.Text != "")
     {
         frmScript ScriptForm = new frmScript(tbxServerName.Text, cbxDatabaseName.Text, tbxDestination.Text);
         this.Hide();
         ScriptForm.ShowDialog();//Loads the new form as a modal window
         ScriptForm.Dispose();
         this.Show();
     }
     else if (tbxServerName.Text == "")
     {
         lblStatus.Text = "Please input a server name...";
         lblStatus.Update();
         ActiveControl = tbxServerName;
     }
     else if (cbxDatabaseName.Text == "")
     {
         lblStatus.Text = "Please select a database...";
         lblStatus.Update();
         ActiveControl = cbxDatabaseName;
     }
 }
示例#2
0
 public void GoScript()
 {
     /* Note: This class is how to progress in to the program.   *
     * It has been placed in a separate class from the "Script" *
     * button so that it can be called from more than one user  *
     * interaction method.                                      */
     if (tbxServerName.Text != "" && cbxDatabaseName.Text != "")
     {
         frmScript ScriptForm = new frmScript(tbxServerName.Text, cbxDatabaseName.Text, tbxDestination.Text);
         this.Hide();
         ScriptForm.ShowDialog();//Loads the new form as a modal window
         ScriptForm.Dispose();
         this.Show();
     }
     else if (tbxServerName.Text == "")
     {
         lblStatus.Text = "Please input a server name...";
         lblStatus.Update();
         ActiveControl = tbxServerName;
     }
     else if (cbxDatabaseName.Text == "")
     {
         lblStatus.Text = "Please select a database...";
         lblStatus.Update();
         ActiveControl = cbxDatabaseName;
     }
 }