Exemple #1
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     Form3 f2 = new Form3();
     f2.ShowInTaskbar = false;
     f2.Owner = this;
     f2.Show();
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //boton que añadira el nuevo usuario a la base de datos
            try
            {
                if (textBox3.Text == textBox4.Text)
                {
                    byte[] jugador = System.Text.Encoding.ASCII.GetBytes("0:" + textBox1.Text + ":" + textBox3.Text + ":" + textBox2.Text);
                    server.Send(jugador);
                    byte[] bytes = new byte[80];
                    server.Receive(bytes);
                    string resultado = Encoding.ASCII.GetString(bytes);
                    int resul;
                    resul = Convert.ToInt32(resultado);

                    if (resul == 0)
                    {
                        MessageBox.Show("Bienvenido al PIM PAM PUM");
                        usuario = textBox1.Text;
                        Form3 f = new Form3(server, usuario);
                        f.Show();

                    }
                    if (resul == 1)
                    {
                        MessageBox.Show("Usuario o email ya existen");
                    }
                }
                else
                {
                    MessageBox.Show("Las contraseñas no coinciden");
                }



            }
            catch
            {
                MessageBox.Show("Error al registrar");
            }
        }
Exemple #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "" && textBox2.Text != "")
            {
                try
                {

                    byte[] login = System.Text.Encoding.ASCII.GetBytes("1:" + textBox1.Text + ":" + textBox2.Text);
                    server.Send(login);
                    byte[] bytes = new byte[80];
                    server.Receive(bytes);
                    string resultado = Encoding.ASCII.GetString(bytes);
                    int resul;
                    resul = Convert.ToInt32(resultado);

                    if (resul == 0)
                    {
                        usuario = textBox1.Text;
                        MessageBox.Show("Bienvenido al PIM PAM PUM");
                        Form3 f = new Form3(server, usuario);
                        f.Show();

                    }
                    if (resul == 1)
                    {
                        MessageBox.Show("Usuario o contraseña incorrectos");
                    }

                }
                catch (SocketException)
                {
                    MessageBox.Show("Error al conectarse");
                }
            }
            else
            {
                MessageBox.Show("Introduce un usuario y una contraseña");
            }
            
        }
Exemple #4
0
 private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 f = new Form3();
     this.Hide();
     f.Show();
 }
Exemple #5
0
 private void estadisticasToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 ofr = new Form3();
     ofr.MdiParent = this;
     ofr.Show();
 }
 private void FichierForm2ToolStripMenuItemClick( object sender, EventArgs e )
 {
     Form3 form3 = new Form3();
     form3.MdiParent = this;
     form3.Show();
 }
Exemple #7
0
 private void button3_Click(object sender, EventArgs e)
 {
     Form f = new Form3();
     f.Show();
     listBox1.Items.Clear();
     string[] files = this.scan_pack();
     if (files != null)
     {
         foreach (string file in files)
         {
             string tmp = file.Substring(file.LastIndexOf('/') + 1).Trim();
             if (tmp.EndsWith(".big"))
             {
                 string filename = tmp.Substring(0, tmp.Length - 4);
                 listBox1.Items.Add(filename);
             }
         }
     }
     else
     {
         button1.Enabled = false;
         button2.Enabled = false;
         button3.Enabled = false;
         button4.Enabled = false;
         button5.Enabled = false;
     }
 }
 private void button2_Click(object sender, EventArgs e)
 {
     // this.Visible = false;//bu formu yani Form1'i gizledik
     Form3 frm = new Form3(); //Burada Form2'nin aşırı yüklenmiş yapıcı methodunu kullanıyoruz
     frm.Show();
 }
 private void OnDeviceFound(object sender, EventArgs e)
 {
     Label lb_value = new Label();
     lb_value.Text = "Device Found!:";
     //Connector.DeviceEventArgs de = (Connector.DeviceEventArgs)e;
     //MessageBox.Show("Device found: " + de.Device.PortName, "Connect");
     System.Media.SystemSounds.Beep.Play();
     Form3 dataform1 = new Form3();
     dataform1.Show();
 }
 private void синтаксисToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 f3 = new Form3();
     f3.MdiParent = this;
     f3.Show();
 }
Exemple #11
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.Close();
     Form3 editClock = new Form3();
     editClock.Show();
 }
Exemple #12
0
 private void button2_Click(object sender, EventArgs e)
 {
     this.Visible = false;
     Form3 connectionMode = new Form3();
     connectionMode.Show();
 }
Exemple #13
0
 private void checkBox2_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox2.Checked == true)
     {
         Form3 frm3 = new Form3(this);
         frm3.Show();
     }
 }
Exemple #14
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form3 frm = new Form3();
     frm.Show();
 }
 private void button3_Click(object sender, EventArgs e)
 {
     Form3 form3 = new Form3();
     form3.Show();
 }
Exemple #16
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool valid = false;
            int userNdx = -1;
            int length = UserList.Count;

            for(int i = 0; i < length; ++i)
            {
                if (UsernameText.Text == UserList[i].UserName)
                {
                    valid = true;
                    userNdx = i;
                    i = length;
                }
            }

            if (valid && (UserList[userNdx].isPassword(passwordText.Text)))
            {

                if (UserList[userNdx].Status == "faculty")
                {
                    FacultyMain fctmain = new FacultyMain(ref Courses, ref UserList, ref UserList[userNdx] );
                    fctmain.Show();
                    this.Close();
                }

                else if (UserList[userNdx].Status == "admin")
                {
                    AdminForm adm = new AdminForm(ref Courses, ref UserList, ref UserList[userNdx]);
                    adm.Show();
                    this.Close();
                }
                else
                {
                    Form3 frm3 = new Form3( ref Courses, ref UserList, ref UserList[userNdx]);
                    frm3.Show();
                    this.Close();
                }
            }
            else
            {
                UsernameText.Text = "";
                UsernameText.Focus();
                passwordText.Text = "";
                IncorrectLabel.Visible = true;
            }
        }
Exemple #17
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form3 frm = new Form3();
            frm.Show();

        }
Exemple #18
0
 private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 form3 = new Form3();
     form3.MdiParent = this;
     form3.Show();
 }