Beispiel #1
0
 public Config(Integra frm)
 {
     InitializeComponent();
     this.frm           = frm;
     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;
 }
Beispiel #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.OfType <Integra>().Count() > 0) // Verifica se o form está aberto
     {
         Application.OpenForms["Integra"].BringToFront();      //Caso esteja aberto, trago ele para frente.
     }
     else
     {
         Integra frm_integra = new Integra();
         frm_integra.Show();// Abro o form caso ele nao está aberto
     }
 }