Exemplo n.º 1
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     Form3 f2 = new Form3();
     f2.ShowInTaskbar = false;
     f2.Owner = this;
     f2.Show();
 }
Exemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form3 fm3 = new Form3();
     fm3.ShowDialog();
     dolo +=1;
     label1.Text = " " + dolo;
 }
Exemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            db.connect();
            DataSet ds2 = new DataSet();
            Form3 supplieraddForm = new Form3();
            if (supplieraddForm.ShowDialog() == DialogResult.OK)
            {
                comboBox1.DataSource = null;
                comboBox1.Items.Clear();
                db.dataSet(ds2, "suppliertable", db.con);

                dRow = new DataRow[ds2.Tables["suppliers"].Rows.Count];

                for (int i = 0; i < ds2.Tables["suppliers"].Rows.Count; i++)
                {
                    dRow[i] = ds2.Tables["suppliers"].Rows[i];
                }

                System.Object[] SupplierObject = new System.Object[dRow.Length];

                for (int i = 0; i < dRow.Length; i++)
                {
                    SupplierObject[i] = dRow[i].ItemArray.GetValue(1).ToString();
                }
                comboBox1.Items.AddRange(SupplierObject);

                comboBox1.SelectedIndex = comboBox1.Items.Count - 1;
            }
        }
Exemplo n.º 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form3 frmdeutsch = new Form3();
     this.Hide();
     frmdeutsch.ShowDialog();
     this.Close();
 }
Exemplo n.º 5
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            //XmlDocument xml = new XmlDocument();
            XmlReader reader = XmlReader.Create("http://openapi.naver.com/search?key=244f0fbe47576aa19d05fc5a79ebd70f&query=" + textBox1.Text + "&display=5&start=1&target=shop&sort=sim");

                if (reader != null)
                {
                    reader.ReadToFollowing("lprice");
                    string value = reader.ReadElementContentAsString();
                    label2.Text = value;
                }

            /*
            XmlReader reader_3 = XmlReader.Create("http://openapi.naver.com/search?key=244f0fbe47576aa19d05fc5a79ebd70f&query=" + textBox1.Text + "&display=5&start=1&target=shop&sort=sim");
            reader_3.ReadToFollowing("lprice");
            string value_3 = reader_3.ReadElementContentAsString();
            label4.Text = value_3;

            XmlReader reader_4 = XmlReader.Create("http://openapi.naver.com/search?key=244f0fbe47576aa19d05fc5a79ebd70f&query=" + textBox1.Text + "&display=5&start=1&target=shop&sort=sim");
            reader_4.ReadToFollowing("lprice");
            string value_4 = reader_4.ReadElementContentAsString();
            label5.Text = value_4;
            */
            Form3 frmForm3 = new Form3(label2.Text, label3.Text, label4.Text, label5.Text);
            frmForm3.ShowDialog();
        }
Exemplo n.º 6
0
 private void addSupplierToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 supplieraddForm = new Form3();
        if (supplieraddForm.ShowDialog() == DialogResult.OK)
     {
         generatesupplierlist();
     }
 }
Exemplo n.º 7
0
 private void button1_Click(object sender, EventArgs e)
 {
     Person p = new Person(Convert.ToInt32(textBox4.Text), textBox1.Text,
         Convert.ToInt32(textBox2.Text),textBox3.Text);
     new PersonAction().add(p);
     Form myForm = new Form3();
     myForm.ShowDialog();
 }
Exemplo n.º 8
0
        public Form1()
        {
            InitializeComponent();
            Form1.initialized = false;
            Form1.wwlDetected = false;
            Form1.loginTried = false;

            this.waitingMessage = new Form3();
            this.waitingMessage.Show();
        }
Exemplo n.º 9
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            title form1 = new title();//タイトル
            Form3 form3 = new Form3();//メイン画面
            Application.Run(form1);//タイトル走らせる

            //ここからタイトルが閉じたときの処理
            if (form1.finfrag == false)//終了フラグが立ってない
            {
                if(Flag.loadfrag==true)//ロードフラグ立ってたらロードしてスタート
                    saveload.load();
                Application.Run(form3);//じゃない場合はデフォルト起動
            }
        }
Exemplo n.º 10
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");
            }
        }
Exemplo n.º 11
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");
            }
            
        }
Exemplo n.º 12
0
 private void estadisticasToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 ofr = new Form3();
     ofr.MdiParent = this;
     ofr.Show();
 }
Exemplo n.º 13
0
 private void menu1ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 objektForm3 = new Form3();
 }
Exemplo n.º 14
0
 private void Form1_Load(object sender, EventArgs e)
 {
     form = new Form3();
 }
Exemplo n.º 15
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Form3 frm3 = new Form3();//about

            frm3.ShowDialog();
        }
Exemplo n.º 16
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form3 form = new Form3(); //ดึง form มาใช้

            form.Show();              //แสดง from ที่ดึงมา
        }
Exemplo n.º 17
0
 public static String ShowPromptBox(String title, String question, String defaultText)
 {
     Form3 testDialog = new Form3();
     testDialog.textBox1.Text = defaultText;
     testDialog.textBox2.Text = question;
     testDialog.Text = title;
     String txtResult;
     // Show testDialog as a modal dialog and determine if DialogResult = OK.
     if (testDialog.ShowDialog() == DialogResult.OK)
     {
         // Read the contents of testDialog's TextBox.
         txtResult = testDialog.textBox1.Text;
     }
     else
     {
         txtResult = "Cancelled";
     }
     testDialog.Dispose();
     return txtResult;
 }
Exemplo n.º 18
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form frm = new Form3();

            frm.Show();
        }
Exemplo n.º 19
0
 private void openOptionsMenu(object sender, EventArgs e)
 {
     Form3 options = new Form3();
     options.ShowDialog();
 }
Exemplo n.º 20
0
        private void выборОбработкиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form3 b = new Form3();

            b.ShowDialog();
        }
Exemplo n.º 21
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form3 f3 = new Form3();

            f3.Show();
        }
Exemplo n.º 22
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (SignUp.Checked)
            {
                Form2 F2 = new Form2();
                F2.ShowDialog();
                nombre     = F2.SetNombre();
                usuario    = F2.SetUsuario();
                contraseña = F2.SetContraseña();
                // Quiero saber si me he podido dar de alta o no
                string mensaje = "1/" + nombre + "/" + usuario + "/" + contraseña;
                // Enviamos al servidor el nombre tecleado

                byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else if (LogIn.Checked)
            {
                Form3 F3 = new Form3();

                F3.ShowDialog();
                user_login     = F3.SetUser();
                password_login = F3.SetPassword();
                // Quiere loguearse

                string mensaje = "2/" + user_login + "/" + password_login;
                // Enviamos al servidor el nombre tecleado
                byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else if (consulta_fecha.Checked)
            {
                Form4 F4 = new Form4();

                F4.ShowDialog();
                fecha = F4.getFecha();

                string mensaje = "3/" + fecha;
                // Enviamos al servidor el nombre tecleado
                byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else if (consulta_duracion.Checked)
            {
                Form5 F5 = new Form5();
                F5.ShowDialog();
                duracion = F5.getDuracion();

                string mensaje = "4/" + duracion;
                // Enviamos al servidor la duracion que nos han pasado por consola
                byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else if (consulta_lista.Checked)
            {
                string mensaje = "5/";
                // Enviamos el código pertinente a la solicitud
                byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else if (invitar.Checked)
            {
                Form6 F6 = new Form6();
                F6.setListado(conectados);
                F6.ShowDialog();
                string invitados = F6.GetListado();
                string mensaje   = "6/" + usuario + "/" + invitados; //    6/anakilator/1/juanito23
                byte[] msg       = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
        }
Exemplo n.º 23
0
        // Metodo Jogada //

        private void Jogada_Click(object COMPONENTE, EventArgs e)
        {
            // Tabela Emabaralhada //

            ITEM = ((PictureBox)COMPONENTE).Tag.ToString();
            string ITEM_IMG     = TABELA[int.Parse(ITEM)].ToString();
            string ENDERECO_TXT = string.Concat(LOCAL_TXT_FOTOS, ITEM_IMG, EXT_TXT);
            string ENDERECO_IMG = string.Concat(LOCAL_TXT_FOTOS, ITEM_IMG, EXT_IMG);



            // Carregando Imagem e Texto nos componentes //

            ((PictureBox)COMPONENTE).Image   = Bitmap.FromFile(ENDERECO_IMG);
            ((PictureBox)COMPONENTE).Enabled = false;

            pictureBox_Visual.Image = Bitmap.FromFile(ENDERECO_IMG);

            StreamReader ARQUIVO = new StreamReader(ENDERECO_TXT, System.Text.ASCIIEncoding.UTF7);

            while (!ARQUIVO.EndOfStream)
            {
                string ARQ_DICA = ARQUIVO.ReadLine();
                textBox_Principal.Text = ARQ_DICA;
            }


            // Teste de Verificação //

            if (TESTE == 0)
            {
                TESTE++;
                JOGADA      = TABELA[int.Parse(ITEM)];
                ITEM_COMP_1 = ITEM;
            }
            else
            {
                TESTE       = 0;
                ITEM_COMP_2 = ITEM;


                // Pausa Antes da Verificação //


                Refresh();


                Thread.Sleep(1500);



                if (JOGADA == TABELA[int.Parse(ITEM)])
                {
                    foreach (Object COMP in this.Controls)
                    {
                        if (COMP is PictureBox)
                        {
                            if (((PictureBox)COMP).Tag.ToString() == ITEM_COMP_1)
                            {
                                string ENDERECO = string.Concat(LOCAL_IMG_TURING, ITEM_COMP_1, EXT_IMG);
                                ((PictureBox)COMP).Image   = Bitmap.FromFile(ENDERECO);
                                ((PictureBox)COMP).Enabled = false;
                            }

                            if (((PictureBox)COMP).Tag.ToString() == ITEM_COMP_2)
                            {
                                string ENDERECO = string.Concat(LOCAL_IMG_TURING, ITEM_COMP_2, EXT_IMG);
                                ((PictureBox)COMP).Image   = Bitmap.FromFile(ENDERECO);
                                ((PictureBox)COMP).Enabled = false;
                            }
                        }
                    }


                    FIM = 0;

                    foreach (Object COMP in this.Controls)
                    {
                        if (COMP is PictureBox)
                        {
                            if (((PictureBox)COMP).Enabled == true)
                            {
                                FIM = 1;
                            }
                        }
                    }


                    if (FIM == 0)
                    {
                        timer.Dispose();
                        FIM = 0;

                        Form2 cadastro = new Form2(labelClock.Text);
                        cadastro.ShowDialog();

                        string nome  = cadastro.Name.Replace(" ", "_");
                        string tempo = labelClock.Text;

                        if (File.Exists(strPathFile))
                        {
                            using (StreamWriter sw = File.AppendText(strPathFile))
                            {
                                sw.WriteLine("\n" + nome + ";" + tempo);
                            }
                        }

                        Form3 Rank = new Form3();
                        Rank.ShowDialog();
                    }
                }
                else
                {
                    foreach (Object COMP in this.Controls)
                    {
                        if (COMP is PictureBox)
                        {
                            if (((PictureBox)COMP).Tag.ToString() == ITEM_COMP_1)
                            {
                                string ENDERECO = string.Concat(LOCAL_IMG, ITEM_COMP_1, EXT_IMG);
                                ((PictureBox)COMP).Image   = Bitmap.FromFile(ENDERECO);
                                ((PictureBox)COMP).Enabled = true;
                            }

                            if (((PictureBox)COMP).Tag.ToString() == ITEM_COMP_2)
                            {
                                string ENDERECO = string.Concat(LOCAL_IMG, ITEM_COMP_2, EXT_IMG);
                                ((PictureBox)COMP).Image   = Bitmap.FromFile(ENDERECO);
                                ((PictureBox)COMP).Enabled = true;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 24
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form3 Rank = new Form3();

            Rank.ShowDialog();
        }
Exemplo n.º 25
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form3 frm = new Form3();
            frm.Show();

        }
Exemplo n.º 26
0
        private void form3ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form3 frm = new Form3();

            frm.Show();
        }
Exemplo n.º 27
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form3 form3 = new Form3();

            form3.ShowDialog();
        }
        private void button6_Click(object sender, EventArgs e)
        {
            Form3 f2 = new Form3();

            f2.Visible = true;
        }
 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();
 }
Exemplo n.º 30
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form3 frm3 = new Form3();

            frm3.ShowDialog();
        }
Exemplo n.º 31
0
 private void pROJECTDETAILSToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 form = new Form3();
     form.ShowDialog();
 }
Exemplo n.º 32
0
 private void label3_Click(object sender, EventArgs e)
 {
     this.Hide();
     Form3 p2 = new Form3();
     p2.ShowDialog();
 }
Exemplo n.º 33
0
        private void button3_Click(object sender, EventArgs e)
        {
            textBox1.ForeColor = Color.Black;
            using (connection = new MySqlConnection(ConnectionString))
            {
                try
                {
                    Mi_DataSet.Clear();
                    Mi_DataSet.Tables.Clear();
                    dataGridView1.Columns.Clear();
                    //Limpiamos el datagridview

                    if (boton_consultar.Checked)
                    //si hacemos una consulta
                    {
                        if ((Tabla_sel == null)|| (Tabla_sel == ""))
                        {
                            if ( idioma )
                                MessageBox.Show(fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/errorSeleccion1").InnerText, fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/errorSeleccion2").InnerText);
                            else
                                MessageBox.Show(fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/errorSeleccion1").InnerText, fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/errorSeleccion2").InnerText);
                            return;
                        }
                        QueryString = "Select * from "+ Tabla_sel;
                        //se realizará un Select *
                        connection.Open();
                        adapter = new MySqlDataAdapter(QueryString, ConnectionString);
                        adapter.Fill(Mi_DataSet);
                        dataGridView1.DataSource = Mi_DataSet.Tables[0];
                        dataGridView1.AutoResizeColumns();
                        bindingSource1.DataSource = Mi_DataSet.Tables[0];
                        dataGridView1.ReadOnly = true;
                        //Se pone el datagridview en modo solo lectura
                        if (idioma)
                            textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ConsultaOK").InnerText;
                        else
                            textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ConsultaOK").InnerText;
                        usuarios = false;
                        get_table_name_Click(sender, e);

                    }
                    else
                    {
                        if (boton_borrar.Checked)
                        //Si queremos eliminar una tabla
                        {
                            usuarios = false;
                            //Se lanza la ventana para pedir confirmación
                            Form2 confirmacion = new Form2(Tabla_sel);
                            if (confirmacion.ShowDialog(this) == DialogResult.Yes)
                            {
                                NonQueryString = "DROP TABLE " + Tabla_sel;
                                command = connection.CreateCommand();
                                command.CommandText = NonQueryString;
                                connection.Open();
                                adapter = new MySqlDataAdapter(command);
                                command.ExecuteNonQuery();
                                if (idioma)
                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ElimTabla1").InnerText
                                        + Tabla_sel + fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ElimTabla2").InnerText;
                                else
                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ElimTabla1").InnerText
                                        + Tabla_sel + fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ElimTabla2").InnerText;
                                comboBox1.ResetText();
                                get_table_name_Click(sender, e);

                            }
                        }
                        else
                        {
                            if (boton_modificar.Checked)
                            {
                                usuarios = false;
                                //PRIMERO RECUPERAMOS LA TABLA

                                QueryString = "SELECT  * from " + Tabla_sel;
                                queryDataSet = "SELECT  * from " + Tabla_sel;
                                //se realizará un Select *
                                connection.Open();
                                adapter = new MySqlDataAdapter(QueryString, ConnectionString);
                                adapter.Fill(Mi_DataSet);
                                dataGridView1.DataSource = Mi_DataSet.Tables[0];
                                dataGridView1.AutoResizeColumns();
                                bindingSource1.DataSource = Mi_DataSet.Tables[0];
                                dataGridView1.ReadOnly = false;
                                button4.Visible = true;
                                if (idioma)
                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/RecTabla").InnerText;
                                else
                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/RecTabla").InnerText;
                            }
                            else
                            {
                                if (boton_insertar.Checked)
                                {
                                    usuarios = false;
                                    Form3 crear = new Form3(idioma);
                                    // Mostramos la ventana de creación de tabla
                                    if (crear.ShowDialog(this) == DialogResult.OK)
                                    {
                                        command = connection.CreateCommand();
                                        command.CommandText = crear.sentencia;
                                        connection.Open();
                                        adapter = new MySqlDataAdapter(command);
                                        command.ExecuteNonQuery();
                                        if (idioma)
                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/CreateTabla").InnerText;
                                        else
                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/CreateTabla").InnerText;
                                        get_table_name_Click(sender, e);
                                    }
                                }
                                else
                                {
                                    if (consultar_usuarios.Checked)
                                    {
                                        usuarios = true;
                                        QueryString = "select Host,User,Password,Select_priv,Insert_priv, Update_priv,Delete_priv,"+
                                            "Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv," +
                                            "References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, "+
                                            "Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv,"+
                                            "Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv,"+
                                            "Trigger_priv, Create_tablespace_priv, ssl_type, max_questions, max_updates, max_connections, "+
                                            "max_user_connections, plugin from mysql.user;";
                                        //se realizará un Select *
                                        connection.Open();
                                        adapter = new MySqlDataAdapter(QueryString, ConnectionString);
                                        adapter.Fill(Mi_DataSet);
                                        dataGridView1.DataSource = Mi_DataSet.Tables[0];
                                        dataGridView1.AutoResizeColumns();
                                        bindingSource1.DataSource = Mi_DataSet.Tables[0];
                                        dataGridView1.ReadOnly = true;
                                        //Se pone el datagridview en modo solo lectura
                                        if (idioma)
                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ConsultaOK").InnerText;
                                        else
                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ConsultaOK").InnerText;
                                        usuarios = true;
                                        get_table_name_Click(sender, e);
                                    }
                                    else
                                    {
                                        if (crear_usuarios.Checked)
                                        {
                                            usuarios = true;
                                            Form5 crear = new Form5(idioma, servidor);
                                            // Mostramos la ventana de creación de usuario
                                            if (crear.ShowDialog(this) == DialogResult.OK)
                                            {
                                                command = connection.CreateCommand();
                                                command.CommandText = crear.sentencia;
                                                connection.Open();
                                                adapter = new MySqlDataAdapter(command);
                                                command.ExecuteNonQuery();
                                                if (idioma)
                                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/CreateUsuario").InnerText;
                                                else
                                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/CreateUsuario").InnerText;
                                                get_table_name_Click(sender, e);
                                            }
                                        }
                                        else
                                        {
                                            if (mod_usuarios.Checked)
                                            {
                                                usuarios = true;
                                                // PRIMERO RECUPERAMOS LA TABLA
                                                // Con los parámetros necesarios (hay valores que son irrelevantes y dan problemas)
                                                QueryString = "select Host,User,Password,Select_priv,Insert_priv, Update_priv,Delete_priv," +
                                            "Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv," +
                                            "References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, " +
                                            "Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv," +
                                            "Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv," +
                                            "Trigger_priv, Create_tablespace_priv, ssl_type, max_questions, max_updates, max_connections, " +
                                            "max_user_connections, plugin from mysql.user;";
                                                queryDataSet = "select Host,User,Password,Select_priv,Insert_priv, Update_priv,Delete_priv," +
                                            "Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv," +
                                            "References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, " +
                                            "Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv, Create_view_priv," +
                                            "Show_view_priv, Create_routine_priv, Alter_routine_priv, Create_user_priv, Event_priv," +
                                            "Trigger_priv, Create_tablespace_priv, ssl_type, max_questions, max_updates, max_connections, " +
                                            "max_user_connections, plugin from mysql.user;";
                                                //se realizará un Select *
                                                connection.Open();
                                                adapter = new MySqlDataAdapter(QueryString, ConnectionString);
                                                adapter.Fill(Mi_DataSet);
                                                dataGridView1.DataSource = Mi_DataSet.Tables[0];
                                                dataGridView1.AutoResizeColumns();
                                                bindingSource1.DataSource = Mi_DataSet.Tables[0];
                                                dataGridView1.ReadOnly = false;
                                                button4.Visible = true;
                                                if (idioma)
                                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/CambGuardado").InnerText;
                                                else
                                                    textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/CambGuardado").InnerText;

                                            }
                                            else
                                            {
                                                if (eliminiar_usuarios.Checked)
                                                {
                                                    usuarios = true;
                                                    //Se lanza la ventana para pedir confirmación
                                                    Form2 confirmacion = new Form2(Tabla_sel);
                                                    if (confirmacion.ShowDialog(this) == DialogResult.Yes)
                                                    {
                                                        NonQueryString = "DROP USER " + Tabla_sel;
                                                        command = connection.CreateCommand();
                                                        command.CommandText = NonQueryString;
                                                        connection.Open();
                                                        adapter = new MySqlDataAdapter(command);
                                                        command.ExecuteNonQuery();
                                                        if (idioma)
                                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ElimUsuario1").InnerText
                                                                + Tabla_sel + fichero.SelectSingleNode("/localizacion/es/ventanaprincipal/ElimUsuario2").InnerText;
                                                        else
                                                            textBox1.Text = fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ElimUsuario1").InnerText
                                                                + Tabla_sel + fichero.SelectSingleNode("/localizacion/en/ventanaprincipal/ElimUsuario2").InnerText;
                                                        comboBox1.ResetText();
                                                        get_table_name_Click(sender, e);

                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                }
                catch (Exception ex)
                {
                    textBox1.ForeColor = Color.Red;
                    textBox1.Text = ex.Message;
                }
            }
        }
Exemplo n.º 34
0
        private void AbreArquivo(string arquivo)
        {
            StreamReader ler          = new StreamReader(arquivo);
            ArrayList    textoPadroes = new ArrayList();
            string       linhaTexto;
            bool         possuiClasse = false;

            while (ler.Peek() > -1)
            {
                linhaTexto = ler.ReadLine();
                if (linhaTexto.Substring(0, 1) == "@")
                {
                    if (linhaTexto.Contains("class"))
                    {
                        possuiClasse = true;
                    }
                }
                else if (linhaTexto.Substring(0, 1) != "%")
                {
                    textoPadroes.Add(linhaTexto);
                }
            }
            String[] quantidadeAtributos = textoPadroes[0].ToString().Split(',');
            colunas = quantidadeAtributos.Length;
            linhas  = textoPadroes.Count;
            if (possuiClasse == true)
            {
                classe = new string[linhas];
                colunas--;
            }
            if (classe != null)
            {
                string valorClasse;
                for (int i = 0; i < linhas; i++)
                {
                    valorClasse = textoPadroes[i].ToString().Split(',')[colunas];
                    if (valorClasse == "")
                    {
                        classe[i] = "Unknown";
                    }
                    else
                    {
                        classe[i] = valorClasse;
                    }
                }
            }
            string valor;
            bool   resultado;
            double valida;

            int[] tiposAtributos = new int[colunas];
            for (int i = 0; i < colunas; i++)
            {
                valor     = textoPadroes[i].ToString().Split(',')[i];
                resultado = double.TryParse(valor, out valida);
                if (resultado)
                {
                    tiposAtributos[i] = 0;
                }
                else
                {
                    tiposAtributos[i] = 1;
                }
            }
            padroes = new double[linhas, colunas];
            Dictionary <string, int> letrasNumeros;
            bool   valorAusente      = false;
            bool   alteraPadroes     = false;
            string ausentes          = "";
            string letrasParaNumeros = "";
            string ruido             = "";

            for (int j = 0; j < colunas; j++)
            {
                letrasNumeros = new Dictionary <string, int>(linhas);
                int numero = 0;
                for (int i = 0; i < linhas; i++)
                {
                    valor     = textoPadroes[i].ToString().Split(',')[j];
                    resultado = double.TryParse(valor, out valida);
                    if (resultado)
                    {
                        padroes[i, j] = valida;
                    }
                    else if (valor != "")
                    {
                        alteraPadroes = true;
                        if (letrasNumeros.ContainsKey(valor))
                        {
                            padroes[i, j] = letrasNumeros[valor];
                        }
                        else
                        {
                            if (valor != "" && tiposAtributos[j] == 1)
                            {
                                letrasNumeros.Add(valor, numero);
                                padroes[i, j]      = numero;
                                letrasParaNumeros += "A" + (j + 1) + " '" + valor + "' = " + numero + "\n";
                                numero++;
                            }
                            else
                            {
                                padroes[i, j] = double.NaN;
                                valorAusente  = true;
                                ruido        += "P" + (i + 1) + " Attribute " + (j + 1) + "\n";
                            }
                        }
                    }
                    else
                    {
                        padroes[i, j] = double.NaN;
                        valorAusente  = true;
                        alteraPadroes = true;
                        ausentes     += "P" + (i + 1) + " Attribute " + (j + 1) + "\n";
                    }
                }
            }
            if (valorAusente)
            {
                AtributoAusente atributoAusente = new AtributoAusente(padroes, tiposAtributos);
                atributoAusente.ImputaAtributo();
            }
            if (alteraPadroes)
            {
                Form3 form3 = new Form3(ausentes, letrasParaNumeros, ruido);
                form3.Show();
            }
            InicializaPadroes();
            ler.Close();
        }
Exemplo n.º 35
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;
     }
 }
Exemplo n.º 36
0
 //登录按键响应事件
 private void ButtonLogin_Click(object sender, EventArgs e)
 {
     //新建ClassSqlConnect类,调用重构的ViewCount方法返回从数据库中查询的结果
     ClassSqlConnect log = new ClassSqlConnect();
     SqlDataReader reader = log.ViewCount(ComboxUserName.Text.ToString(),TxtPassword.Text.ToString());
     if (reader.Read())//判断有数据,说明登录成功
     {
         /*保存账号信息,将这部分信息保存在数据库(XML)中更好*/
         ComboxUserName.Items.Add(ComboxUserName.Text.ToString());
         Form nfm;
         //提取用户名信息
         string UName = reader[1].ToString();
         MessageBox.Show("欢迎你,"+ UName);
         //提取权限信息并选择应打开的界面
         switch((int)reader[2])
         {
             case 0:
                 nfm = new Form2();//系统管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 1:
                 nfm = new Form7();//人事经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 2:
                 nfm = new Form3();//人事员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 3:
                 nfm = new Form8();//财务经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 4:
                 nfm = new Form4();//财务员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 5:
                 nfm = new Form9();//销售经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 6:
                 nfm = new Form6();//销售员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 7:
                 nfm = new Form10();//仓库经理管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             case 8:
                 nfm = new Form5();//仓库员工管理界面
                 this.Hide();
                 if (nfm.ShowDialog() == DialogResult.OK)
                 {
                     this.Show();
                 }
                 break;
             default:
                 MessageBox.Show("你没有登录权限," + UName,"没有权限");
                 ComboxUserName.Text = "";
                 TxtPassword.Text = "";
                 break;
         }
     }
     else
     {
         MessageBox.Show("用户名或密码错误!","错误");
         TxtPassword.Text = "";
     }
     //调用自定义的Close方法关闭sql连接
     log.Close();
 }
Exemplo n.º 37
0
 private void FichierForm2ToolStripMenuItemClick( object sender, EventArgs e )
 {
     Form3 form3 = new Form3();
     form3.MdiParent = this;
     form3.Show();
 }
Exemplo n.º 38
0
        private void AtenderServidor()
        {
            DelegadoParaEscribir delegado = new DelegadoParaEscribir(CambiaString);

            while (true)
            {
                //recibimos mensaje del servidor
                byte[] msg2 = new byte[80];
                server.Receive(msg2);
                string[] recibido = Encoding.ASCII.GetString(msg2).Split('/');
                int      codigo   = Convert.ToInt32(recibido[0]);
                string   mensaje  = recibido[1].Split('\0')[0];
                switch (codigo)
                {
                case 3:      //número de partidas ganadas por un jugador
                    if (mensaje == "NO EXISTE")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "El jugador introducido no existe.", null });
                    }
                    else if (mensaje == "ERROR")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "No se ha podido realizar la búsqueda en la base de datos.", null });
                    }
                    else
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "Número de partidas ganadas: " + mensaje, null });
                    }
                    break;

                case 4:     //nombre del ganador de una partida concreta
                    if (mensaje == "NO EXISTE")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "La partida introducida no existe.", null });
                    }
                    else if (mensaje == "ERROR")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "No se ha podido realizar la búsqueda en la base de datos.", null });
                    }
                    else
                    {
                        //MessageBox.Show("Nombre del ganador: " + mensaje);
                        resultado1.Invoke(delegado, new object[] { "resultado1", "Nombre del ganador: " + mensaje, null });
                    }
                    break;

                case 5:     //numero de goles de un jugador en concreto
                    if (mensaje == "NO EXISTE")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "El jugador introducido no existe.", null });
                    }
                    else if (mensaje == "ERROR")
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "No se ha podido realizar la búsqueda en la base de datos.", null });
                    }
                    else
                    {
                        resultado1.Invoke(delegado, new object[] { "resultado1", "Número de goles marcados: " + mensaje, null });
                    }
                    break;

                case 6:     //lista de conectados
                    mensaje = recibido[2].Split('\0')[0];
                    String[] lista = mensaje.Split(',');
                    NConectados.Invoke(delegado, new object[] { "NConectados", recibido[1], null });
                    listBox1.Invoke(delegado, new object[] { "listBox1", null, lista });
                    break;

                case 7:
                    Form3 invi = new Form3(mensaje);
                    invi.ShowDialog();
                    while (invi.resultadoinvitacion == 0)
                    {
                    }
                    invi.Close();
                    string ms;
                    if (invi.resultadoinvitacion == 1)     //ha aceptado la invitacion
                    {
                        ms = "8/SI," + mensaje + "," + usuario;
                        byte[] msg = System.Text.Encoding.ASCII.GetBytes(ms);
                        server.Send(msg);
                        //
                        //iniciar partida
                        //
                    }
                    if (invi.resultadoinvitacion == 2)     //no ha aceptado la invitacion
                    {
                        ms = "8/NO," + mensaje + "," + usuario;
                        byte[] msg = System.Text.Encoding.ASCII.GetBytes(ms);
                        server.Send(msg);
                    }
                    break;

                case 8:
                    string[] trozos = mensaje.Split(',');
                    if (trozos[0] == "SI")     //la otra persona ha aceptado la invitación
                    {
                        MessageBox.Show(trozos[1] + " ha aceptado tu invitación. Prepárate para jugar.");
                        //
                        //iniciar partida
                        //
                    }

                    if (trozos[0] == "NO")    //la otra persona no ha aceptado la invitación
                    {
                        MessageBox.Show(trozos[1] + " ha rechazado tu invitación.");
                    }
                    break;

                case 9:
                    string[] partes = mensaje.Split('$');
                    listBox2.Invoke(delegado, new object[] { "listBox2", null, partes });
                    break;
                }
            }
        }
Exemplo n.º 39
0
 private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 f = new Form3();
     this.Hide();
     f.Show();
 }
Exemplo n.º 40
0
 private void fullVersionRequestToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form3 request = new Form3();
     request.ShowDialog();
 }
Exemplo n.º 41
0
 private void button3_Click(object sender, EventArgs e)
 {
     Form3 form3 = new Form3();
     form3.Show();
 }
Exemplo n.º 42
0
 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();
 }
Exemplo n.º 43
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;
            }
        }
Exemplo n.º 44
0
 public void Form2_1(Form3 f3)
 {
     this.f3 = f3;
 }
Exemplo n.º 45
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Form3 form3 = new Form3();
     form3.Visible = true;
 }
Exemplo n.º 46
0
        //private void PonConectados(string [] trozos)
        //{
        //    int n = Convert.ToInt32(trozos[1]);
        //    int i = 0;
        //    dataGridView1.Rows.Clear();
        //    dataGridView1.Refresh();

        //    while (i < n)
        //    {
        //        if (i < n - 1)
        //        {
        //            dataGridView1.Rows.Add();
        //        }
        //        dataGridView1.Rows[i].Cells[0].Value = trozos[i + 2];
        //        i++;
        //    }
        //}

        private void AtenderServidor()
        {
            while (true)
            {
                //Recibimos la respuesta del servidor
                byte[] msg2 = new byte[80];
                server.Receive(msg2);

                string [] trozos    = Encoding.ASCII.GetString(msg2).Split('/');
                int       numtrozos = trozos.Length;
                int       codigo    = Convert.ToInt32(trozos[0]);
                string    mensaje;
                int       nForm;
                switch (codigo)
                {
                case 1:     //Registra al nuevo usuario
                    mensaje = trozos[1].Split('\0')[0];
                    Enviar de = new Enviar(PonMensaje);
                    this.Invoke(de, new object[] { mensaje });
                    if (mensaje == "Usuario registrado")
                    {
                        ThreadStart ts = delegate { PonerEnMarchaFormulario4(); };
                        Thread      T  = new Thread(ts);
                        T.Start();
                    }

                    break;

                case 2:     //Inicia sesión
                    mensaje = trozos[1].Split('\0')[0];
                    de      = new Enviar(PonMensaje);
                    this.Invoke(de, new object[] { mensaje });
                    if (mensaje == "Usuario iniciado")
                    {
                        ThreadStart ts = delegate { PonerEnMarchaFormulario4(); };
                        Thread      T  = new Thread(ts);
                        T.Start();
                    }
                    else
                    {
                        MessageBox.Show("Vuelve a intentarlo, los datos son incorrectos");
                    }
                    break;

                case 3:     //Consulta el jugador que ganó en menor tiempo
                    mensaje = trozos[1].Split('\0')[0];
                    nForm   = Convert.ToInt32(trozos[1]);
                    mensaje = trozos[2];
                    formularios[nForm].TomaJugador(mensaje);

                    //de = new Enviar(PonMensaje);
                    //this.Invoke(de, new object[] { mensaje });
                    //MessageBox.Show(mensaje);
                    break;

                case 4:     //Consulta el menor tiempo en ganar del jugador "usuario"
                    mensaje = trozos[1].Split('\0')[0];
                    nForm   = Convert.ToInt32(trozos[1]);
                    mensaje = trozos[2];
                    formularios[nForm].TomaTiempo(mensaje);

                    //de = new Enviar(PonMensaje);
                    //this.Invoke(de, new object[] { mensaje });
                    //MessageBox.Show(mensaje);
                    break;

                case 5:     //Consulta el número de partidas ganadas por el jugador "usuario"
                    mensaje = trozos[1].Split('\0')[0];
                    nForm   = Convert.ToInt32(trozos[1]);
                    mensaje = trozos[2];
                    formularios[nForm].TomaPartidas(mensaje);

                    //de = new Enviar(PonMensaje);
                    //this.Invoke(de, new object[] { mensaje });
                    //MessageBox.Show(mensaje);
                    break;

                case 6:     //Notificación lista conectados
                    //EnviarTrozos de1 = new EnviarTrozos(PonConectados);
                    //this.Invoke(de1, new object[] { trozos });
                    mensaje = trozos[2].Split('\0')[0];
                    if (mensaje != "0")
                    {
                        nForm = Convert.ToInt32(trozos[1]);
                        int i = 3;
                        while (i < trozos.Length)
                        {
                            mensaje = mensaje + "/" + trozos[i];
                            i++;
                        }
                        formularios[nForm].TomaConectados(mensaje);
                    }
                    break;

                case 7:     //Recibe invitación del invitador
                    string invitador = trozos[3].Split('\0')[0];
                    nForm = Convert.ToInt32(trozos[1]);
                    string letra = trozos[2];
                    Form2  f2    = new Form2();
                    f2.enviado      += new Form2.Enviar(Ejecutar);
                    f2.textBox1.Text = invitador;
                    f2.textBox2.Text = letra;
                    f2.ShowDialog();
                    if (textBox3.Text == "Rechazada")
                    {
                        string mensaje2 = "7/" + nForm + "/Rechazada/" + invitador;
                        // Enviamos al servidor
                        byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                        server.Send(msg);
                    }
                    else
                    {
                        string mensaje2 = "7/" + nForm + "/Aceptada/" + letra + "/" + invitador;
                        //Enviamos al servidor
                        byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                        server.Send(msg);
                    }
                    break;

                case 8:     //Recibe contestación del invitado
                    mensaje = trozos[3].Split('\0')[0];
                    nForm   = Convert.ToInt32(trozos[1]);
                    if (trozos[2] == "Rechazada")
                    {
                        string invitado = trozos[3];
                        MessageBox.Show(": ha finalizado la partida", invitado);
                    }
                    else
                    {
                        string invitado = trozos[4];
                        letra = trozos[3];
                        Form3 f3 = new Form3();
                        f3.enviado      += new Form3.Enviar(Ejecutar);
                        f3.textBox1.Text = invitado;
                        f3.label8.Text   = letra;
                        f3.ShowDialog();
                        if (textBox3.Text == "Rechazada")
                        {
                            string mensaje2 = "8/" + nForm + "/Rechazada/" + invitado;
                            // Enviamos al servidor
                            byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                            server.Send(msg);
                        }
                        else
                        {
                            string mensaje2 = "8/" + nForm + "/Aceptada/" + letra + "/" + f3.textBox2.Text + "/" + f3.textBox3.Text + "/" + f3.textBox4.Text + "/" + f3.textBox5.Text + "/" + f3.textBox6.Text + "/" + invitado;
                            //Enviamos al servidor
                            byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                            server.Send(msg);
                        }
                    }
                    break;

                case 9:     //recibe contestación del invitador
                    mensaje = trozos[2].Split('\0')[0];
                    nForm   = Convert.ToInt32(trozos[1]);
                    if (trozos[2] == "Rechazada")
                    {
                        string invitador2 = trozos[3];
                        MessageBox.Show(": ha finalizado la partida", invitador2);
                    }
                    else
                    {
                        string invitador2 = trozos[9];
                        letra = trozos[3];
                        Form3 f3 = new Form3();
                        f3.enviado      += new Form3.Enviar(Ejecutar);
                        f3.textBox1.Text = invitador2;
                        f3.label8.Text   = letra;
                        f3.textBox2.Text = trozos[4];
                        f3.textBox3.Text = trozos[5];
                        f3.textBox4.Text = trozos[6];
                        f3.textBox5.Text = trozos[7];
                        f3.textBox6.Text = trozos[8];
                        f3.ShowDialog();
                        if (textBox3.Text == "Rechazada")
                        {
                            string mensaje2 = "8/" + nForm + "/Rechazada/" + invitador2;
                            // Enviamos al servidor
                            byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                            server.Send(msg);
                        }
                        else
                        {
                            string mensaje2 = "8/" + nForm + "/Aceptada/" + letra + "/" + f3.textBox2.Text + "/" + f3.textBox3.Text + "/" + f3.textBox4.Text + "/" + f3.textBox5.Text + "/" + f3.textBox6.Text + "/" + invitador2;
                            //Enviamos al servidor
                            byte[] msg = System.Text.Encoding.ASCII.GetBytes(mensaje2);
                            server.Send(msg);
                        }
                    }
                    break;

                    //case 10: //Elimina al usuario
                    //    mensaje = trozos[1].Split('\0')[0];
                    //    de = new Enviar(PonMensaje);
                    //    this.Invoke(de, new object[] { mensaje });
                    //    break;
                }
            }
        }