Beispiel #1
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            formPrinciapal childForm = new formPrinciapal();

            childForm.MdiParent = this;
            childForm.Text      = "Window " + childFormNumber++;
            childForm.Show();
        }
Beispiel #2
0
 private void simpleButton1_Click_1(object sender, EventArgs e)
 {
     if (textBox1.Text == "" || textBox2.Text == "" || comboBox1.Text == "Selectionnez Option" || comboBox1.Text == "")
     {
         MessageBox.Show("Tous les champs doivent etre completé!");
     }
     else
     {
         try
         {
             if (comboBox1.Text == "STATION")
             {
                 if (glos.LoginStation(textBox1.Text, textBox2.Text) == true)
                 {
                     formPrinciapal pc = new formPrinciapal(textBox1.Text);
                     this.Hide();
                     pc.ShowDialog();
                 }
             }
             else if (comboBox1.Text == "AUTRE")
             {
                 if (glos.LoginTest(textBox1.Text, textBox2.Text) == true)
                 {
                     formPrinciapal pc = new formPrinciapal(textBox1.Text);
                     this.Hide();
                     pc.ShowDialog();
                 }
             }
             else if (comboBox1.Text == "BUSINESS")
             {
                 if (glos.LoginStation(textBox1.Text, textBox2.Text) == true)
                 {
                     formPrinciapal pc = new formPrinciapal(textBox1.Text);
                     this.Hide();
                     pc.ShowDialog();
                 }
             }
             else
             {
                 MessageBox.Show("Selectionnez une option!!");
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show("Verifier la connexion avec le serveur!!" + ex.Message);
         }
     }
 }