Example #1
0
 public Config(SERV frm_serv)
 {
     InitializeComponent();
     this.frm_serv      = frm_serv;
     txtport.Text       = Properties.Settings.Default.port;
     txtuser.Text       = Properties.Settings.Default.user;
     txtpass.Text       = Properties.Settings.Default.pass;
     txtdb.Text         = Properties.Settings.Default.bd;
     txthost.Text       = Properties.Settings.Default.host;
     txt_schema.Text    = Properties.Settings.Default.schema;
     btn_salvar.Enabled = false;
 }
Example #2
0
File: home.cs Project: redpown/Thor
 private void button1_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <SERV>().Count() > 0) // Verifica se o form está aberto
     {
         Application.OpenForms["SERV"].BringToFront();      //Caso esteja aberto, trago ele para frente.
     }
     else
     {
         SERV frm_serv = new SERV();
         frm_serv.Show(); // Abro o form caso ele nao está aberto
     }
 }