Пример #1
0
 private void showToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     Form9 objektForm9 = new Form9();
       objektForm9.Show();
 }
Пример #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            Form9 f9 = new Form9();

            f9.Show();
        }
Пример #3
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form9 form9 = new Form9();

            form9.Show();
        }
Пример #4
0
        public void Afisare_Forma(string Text_Forma, Form frn, string Close_or_Hide)
        {
            Form f = new Form();

            switch (Text_Forma)
            {
            case "MENIU": f = new Form1(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "LECTII": f = new Form2(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE1":
                f = new Form3(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE2":
                f = new Form4(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA INTRODUCERE3":
                f = new Form5(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI1":
                f = new Form6(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI2":
                f = new Form7(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI3":
                f = new Form8(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI4":
                f = new Form9(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI5":
                f = new Form10(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA CAZURI6":
                f = new Form11(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "CONGRUENTA DREPTUNGHICE":
                f = new Form12(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TESTE":
                f = new Form16(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST USOR":
                f = new Test_Usor_Pagina_1(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST MEDIU":
                f = new Test_Mediu(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;

            case "TEST GREU":
                f = new Test_Greu(); f.Show();
                Verifica_daca_Close_sau_Hide(Close_or_Hide, frn);
                break;
            }
        }
Пример #5
0
        private void деманстрационныеРежимыToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (V == true)
            {
                for (int i = 0; i < 5; i++)
                {
                    number1[i].Visible = false;
                    number2[i].Visible = false;
                    result[i].Visible  = false;
                }
                button2.Visible   = false;
                button17.Visible  = false;
                button18.Visible  = false;
                button19.Visible  = false;
                button20.Visible  = false;
                label1.Visible    = false;
                label2.Visible    = false;
                label3.Visible    = false;
                comboBox1.Visible = false;
                comboBox2.Visible = false;
                pictureBox1.Image = global::WindowsFormsApplication1.Properties.Resources.ИК_заставка;
            }

            if (VV == true)
            {
                button21.Visible = false;
                label4.Visible   = false;
                label14.Visible  = false;
                label15.Visible  = false;
                label16.Visible  = false;
                label17.Visible  = false;
                label18.Visible  = false;
                listBox1.Visible = false;

                for (int i = 0; i < 8; i++)
                {
                    arrows[i].Visible = false;
                }

                for (int i = 0; i < 9; i++)
                {
                    numbers[i].Visible  = false;
                    massivsg[i].Visible = false;
                }

                listBox1.Items.Clear();
                listBox1.Visible = false;

                globcount = 0;

                pictureBox2.Visible = false;
                button21.Text       = "Начать!";
            }

            richTextBox1.Visible = false;
            pictureBox1.Image    = global::WindowsFormsApplication1.Properties.Resources.ИК_заставка;
            Form9 f1 = new Form9();

            f1.Hide();
            f1.Show();
            f1.label1.Text      = "1";
            f1.Text             = "Демонстрационные режимы";
            f1.pictureBox1.Size = new System.Drawing.Size(560, 440);
            //richTextBox1.Visible = false;
            //richTextBox2.Visible = false;
            //richTextBox3.Visible = false;
        }
Пример #6
0
        private void buttSave_Click(object sender, EventArgs e)
        {
            if (txtRef.Text == "")
            {
                string    order = "select Deliveryidfrom CustomerOrderDelivery";
                DataTable dt1   = dbMainClass.getDetailByQuery(order);
                string    id2   = "";
                string    id5   = "";
                foreach (DataRow dr in dt1.Rows)
                {
                    id5 = dr[0].ToString();
                }
                string    order1 = "select Orderid from VendorOrderDetails";
                DataTable dt4    = dbMainClass.getDetailByQuery(order1);
                foreach (DataRow dr in dt4.Rows)
                {
                    id2 = dr[0].ToString();
                }
                string OrderID = "";
                if (id2 == "")
                {
                    id2     = "1";
                    OrderID = id2;
                    string insertqurry  = "insert into VendorOrderDetails values('" + txtVendorId.Text + "','" + dtpInvoiceDate.Text + "','" + txtTotalAmount.Text + "')";
                    int    insertedRows = dbMainClass.saveDetails(insertqurry);
                    //if (insertedRows > 0)
                    //{
                    DataGridViewRowCollection RowCollection = dataGridView1.Rows;
                    List <string>             sf            = new List <string>();
                    for (int a = 0; a < RowCollection.Count; a++)
                    {
                        DataGridViewRow            currentRow     = RowCollection[a];
                        DataGridViewCellCollection cellCollection = currentRow.Cells;
                        string txtItemCod = cellCollection[0].Value.ToString();
                        string txtRate    = cellCollection[2].Value.ToString();
                        string txtQuanit  = cellCollection[3].Value.ToString();
                        string txtAmoun   = cellCollection[5].Value.ToString();

                        string Query = "insert into VendorOrderDesc Values('" + OrderID + "','" + txtItemCod + "','" + txtRate + "','" + txtQuanit + "','" + txtAmoun + "')";
                        //MessageBox.Show(Query);
                        sf.Add(Query);
                    }
                    int insertedRows1 = dbMainClass.saveDetails(sf);
                    if (insertedRows1 > 0)
                    {
                        if (id5 == "")
                        {
                            string    deleteQurry = "delete VendorOrderDesc where Orderid='" + id2 + "'";
                            DataTable dt          = dbMainClass.getDetailByQuery(deleteQurry);
                            //dataGridView1.DataSource = "";


                            DataGridViewRowCollection RowCollection2 = dataGridView1.Rows;
                            List <string>             sf1            = new List <string>();
                            for (int a = 0; a < RowCollection2.Count; a++)
                            {
                                DataGridViewRow            currentRow     = RowCollection2[a];
                                DataGridViewCellCollection cellCollection = currentRow.Cells;
                                string txtItemCode = cellCollection[0].Value.ToString();
                                string txtRate     = cellCollection[2].Value.ToString();
                                string txtQuanity  = cellCollection[4].Value.ToString();
                                string txtAmoun    = cellCollection[5].Value.ToString();
                                string OrderID1    = id2;

                                string Query = "insert into VendorOrderDesc Values('" + OrderID1 + "','" + txtItemCode + "','" + txtRate + "','" + txtQuanity + "','" + txtAmoun + "')";
                                //MessageBox.Show(Query);

                                sf1.Add(Query);
                            }
                            int insertedRows4 = dbMainClass.saveDetails(sf1);
                            if (insertedRows4 > 0)
                            {
                                string insertQurry   = "insert into CustomerOrderDelivery Values('" + txtRef.Text + "','true','" + dtpInvoiceDate.Text + "')";
                                int    insertedRows2 = dbMainClass.saveDetails(insertQurry);
                                if (insertedRows2 > 0)
                                {
                                    MessageBox.Show("Details Saved Successfully");
                                }
                                else
                                {
                                    MessageBox.Show("Details Not Saved Successfully");
                                }
                            }
                        }
                    }
                }
                else
                {
                    int id3 = Convert.ToInt32(id2);
                    int id4 = id3 + 1;
                    OrderID = id4.ToString();
                    string insertqurry1  = "insert into VendorOrderDetails values('" + txtVendorId.Text + "','" + dtpInvoiceDate.Text + "','" + txtTotalAmount.Text + "')";
                    int    insertedRows1 = dbMainClass.saveDetails(insertqurry1);
                    //if (insertedRows1 > 0)
                    //{
                    DataGridViewRowCollection RowCollection = dataGridView1.Rows;
                    List <string>             sf            = new List <string>();
                    for (int a = 0; a < RowCollection.Count; a++)
                    {
                        DataGridViewRow            currentRow     = RowCollection[a];
                        DataGridViewCellCollection cellCollection = currentRow.Cells;
                        string txtItemCod = cellCollection[0].Value.ToString();
                        string txtRate    = cellCollection[2].Value.ToString();
                        string txtQuanit  = cellCollection[3].Value.ToString();
                        string txtAmoun   = cellCollection[4].Value.ToString();

                        string Query = "insert into VendorOrderDesc Values('" + OrderID + "','" + txtItemCod + "','" + txtRate + "','" + txtQuanit + "','" + txtAmoun + "')";
                        //MessageBox.Show(Query);
                        sf.Add(Query);
                    }
                    int insertedRows2 = dbMainClass.saveDetails(sf);
                    if (insertedRows2 > 0)
                    {
                        string    deleteQurry1 = "delete VendorOrderDesc where Orderid='" + OrderID + "'";
                        DataTable dt5          = dbMainClass.getDetailByQuery(deleteQurry1);
                        //dataGridView1.DataSource = "";

                        DataGridViewRowCollection RowCollection1 = dataGridView1.Rows;
                        List <string>             sf2            = new List <string>();
                        for (int a = 0; a < RowCollection1.Count; a++)
                        {
                            DataGridViewRow            currentRow     = RowCollection1[a];
                            DataGridViewCellCollection cellCollection = currentRow.Cells;
                            string txtItemCode = cellCollection[0].Value.ToString();
                            string txtRate     = cellCollection[2].Value.ToString();
                            string txtQuanity  = cellCollection[3].Value.ToString();
                            string txtAmoun    = cellCollection[4].Value.ToString();
                            string OrderID2    = OrderID;

                            string Query = "insert into VendorOrderDesc Values('" + OrderID2 + "','" + txtItemCode + "','" + txtRate + "','" + txtQuanity + "','" + txtAmoun + "')";
                            //MessageBox.Show(Query);

                            sf2.Add(Query);
                        }
                        int insertedRows3 = dbMainClass.saveDetails(sf2);
                        if (insertedRows3 > 0)
                        {
                            string insertQurry   = "insert into CustomerOrderDelivery Values('" + OrderID + "','true','" + dtpInvoiceDate.Text + "')";
                            int    insertedRows5 = dbMainClass.saveDetails(insertQurry);
                            if (insertedRows5 > 0)
                            {
                                string    select1 = "select * from CustomerOrderDelivery where Orderid='" + OrderID + "'";
                                DataTable dt2     = dbMainClass.getDetailByQuery(select1);
                                if (dt2 != null && dt2.Rows != null && dt2.Rows.Count > 0)
                                {
                                    DataRow dr1 = dt2.Rows[0];
                                    string  r   = dr1[1].ToString();
                                    string  s   = dr1[0].ToString();

                                    string    select = "select * from CustomerOrderDelivery where Deliveryid='" + s + "'";
                                    DataTable dt     = dbMainClass.getDetailByQuery(select);
                                    if (dt != null && dt.Rows != null && dt.Rows.Count > 0)
                                    {
                                        DataRow dr = dt.Rows[0];
                                        string  c  = dr[0].ToString();

                                        string Qurry1       = "insert into CustomerOrderInvoice Values('" + c + "','" + r + "','" + dtpInvoiceDate.Text + "')";
                                        int    insertedRows = dbMainClass.saveDetails(Qurry1);
                                        if (insertedRows > 0)
                                        {
                                            MessageBox.Show("Details Saved Successfully");
                                        }
                                        else
                                        {
                                            MessageBox.Show("Details Not Saved Successfully");
                                        }
                                    }
                                }
                                // }
                            }
                        }
                    }
                }


                int id  = Convert.ToInt32(txtSrNo.Text);
                int id1 = id + 1;
                txtSrNo.Text = id1.ToString();
                // F9.MdiParent = this;
                Form9 F9 = new Form9(id.ToString());
                F9.Show();
                makeBlank();
            }

            if (txtRef.Text != "")
            {
                string    select1 = "select * from CustomerOrderDelivery where Deliveryid='" + txtRef.Text + "'";
                DataTable dt2     = dbMainClass.getDetailByQuery(select1);
                if (dt2 != null && dt2.Rows != null && dt2.Rows.Count > 0)
                {
                    DataRow   dr1         = dt2.Rows[0];
                    string    r           = dr1[1].ToString();
                    string    deleteQurry = "delete VendorOrderDesc where Orderid='" + r + "'";
                    DataTable dt3         = dbMainClass.getDetailByQuery(deleteQurry);
                }
                counter = 0;
                if (counter == 0)
                {
                    //string insertqurry = "insert into VendorOrderDetails values('" +txtVendorId.Text + "','" + txtdate.Text + "','" + txtTotalAmount.Text + "')";
                    //int insertedRows = dbMainClass.saveDetails(insertqurry);
                    //if (insertedRows > 0)
                    //{

                    //    MessageBox.Show("Details Saved Successfully");

                    //}
                    //else
                    //{
                    //    MessageBox.Show("Details Not Saved Successfully");
                    //}
                    string    select = "select * from CustomerOrderDelivery where Deliveryid='" + txtRef.Text + "'";
                    DataTable dt     = dbMainClass.getDetailByQuery(select);
                    if (dt != null && dt.Rows != null && dt.Rows.Count > 0)
                    {
                        DataRow dr = dt.Rows[0];
                        string  c  = dr[1].ToString();
                        DataGridViewRowCollection RowCollection4 = dataGridView1.Rows;
                        List <string>             sf4            = new List <string>();
                        for (int a = 0; a < RowCollection4.Count; a++)
                        {
                            DataGridViewRow            currentRow     = RowCollection4[a];
                            DataGridViewCellCollection cellCollection = currentRow.Cells;
                            string txtItemCode = cellCollection[0].Value.ToString();
                            string txtRate     = cellCollection[2].Value.ToString();
                            string txtQuanity  = cellCollection[3].Value.ToString();
                            string txtAmoun    = cellCollection[4].Value.ToString();
                            string OrderID3    = c;
                            string Query       = "insert into VendorOrderDesc Values('" + OrderID3 + "','" + txtItemCode + "','" + txtRate + "','" + txtQuanity + "','" + txtAmoun + "')";
                            //MessageBox.Show(Query);
                            sf4.Add(Query);
                        }
                        int insertedRows5 = dbMainClass.saveDetails(sf4);
                        if (insertedRows5 > 0)
                        {
                            string Qurry1       = "insert into CustomerOrderInvoice Values('" + txtRef.Text + "','" + c + "','" + dtpInvoiceDate.Text + "')";
                            int    insertedRows = dbMainClass.saveDetails(Qurry1);
                            if (insertedRows > 0)
                            {
                                MessageBox.Show("Details Saved Successfully");
                            }
                            else
                            {
                                MessageBox.Show("Details Not Saved Successfully");
                            }
                        }
                    }
                }
                //}

                //F9.MdiParent = this;
                makeBlank();
                int id  = Convert.ToInt32(txtSrNo.Text);
                int id1 = id + 1;
                txtSrNo.Text = id1.ToString();
                Form9 F9 = new Form9(id.ToString());
                F9.Show();
            }
        }
Пример #7
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();
 }
Пример #8
0
        // V Header Links
        private void dataGridView7_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView7.CurrentCellAddress.X == 4)
            {
                tabControl1.SelectedIndex = 1;
                comboBox6.SelectedIndex = Convert.ToInt32(dataGridView7.CurrentCell.Value);
                return;
            }
            if (dataGridView7.CurrentCellAddress.X == 5 || dataGridView7.CurrentCellAddress.X == 6)
            {
                tabControl1.SelectedIndex = 4;
                comboBox5.SelectedIndex = Convert.ToInt32(dataGridView7.CurrentCell.Value);
                return;
            }
            if (dataGridView7.CurrentCellAddress.X == 7)
            {
                tabControl1.SelectedIndex = 3;
                radioButton15.Checked = true;
                comboBox3.SelectedIndex = Convert.ToInt32(dataGridView7.CurrentCell.Value);
                return;
            }

            if (dataGridView7.CurrentCellAddress.X == 16)
            {
                wildIndex = nameText.IndexOf(dataGridView7.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString());
                Form4_2 nameEditor = new Form4_2();
                nameEditor.ShowDialog(this);
                dataGridView7.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = nameText[wildIndex];
                return;
            }
            if (dataGridView7.CurrentCellAddress.X == 21)
            {
                mapFlags = Convert.ToInt32(dataGridView7.CurrentCell.Value);
                Form4 flagEditor = new Form4();
                flagEditor.ShowDialog(this);
                dataGridView7.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = mapFlags;
                return;
            }
            if (dataGridView7.CurrentCellAddress.X == 12)
            {
                wildIndex = Convert.ToInt32(dataGridView7.CurrentCell.Value);
                Form9 wildEditor = new Form9();
                wildEditor.ShowDialog(this);
            }
        }
Пример #9
0
 private void button3_Click(object sender, EventArgs e)
 {
     this.Visible = false;
     Form9 connectionMode = new Form9();
     connectionMode.Show();
 }
Пример #10
0
        // Header Links
        private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            // DPPt Links

            if (dataGridView1.CurrentCellAddress.X == 2 && Convert.ToInt32(dataGridView1.CurrentCell.Value) < comboBox12.Items.Count)
            {
                comboBox12.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentCell.Value);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 4)
            {
                tabControl1.SelectedIndex = 1;
                comboBox1.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentCell.Value);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 5 || dataGridView1.CurrentCellAddress.X == 6)
            {
                tabControl1.SelectedIndex = 4;
                comboBox5.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentCell.Value);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 7)
            {
                tabControl1.SelectedIndex = 3;
                comboBox3.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentCell.Value);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 10 && (gameID == 0x45414441 || gameID == 0x45415041 || gameID == 0x53414441 || gameID == 0x53415041 || gameID == 0x46414441 || gameID == 0x46415041 || gameID == 0x49414441 || gameID == 0x49415041 || gameID == 0x44414441 || gameID == 0x44415041 || gameID == 0x4A414441 || gameID == 0x4A415041 || gameID == 0x4B414441 || gameID == 0x4B415041 || gameID == 0x45555043 || gameID == 0x53555043 || gameID == 0x46555043 || gameID == 0x49555043 || gameID == 0x44555043 || gameID == 0x4A555043 || gameID == 0x4B555043))
            {
                wildIndex = (int)Convert.ToUInt32(dataGridView1.CurrentCell.Value);
                Form9 wildEditor = new Form9();
                wildEditor.ShowDialog(this);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 11 && (gameID == 0x45414441 || gameID == 0x45415041 || gameID == 0x53414441 || gameID == 0x53415041 || gameID == 0x46414441 || gameID == 0x46415041 || gameID == 0x49414441 || gameID == 0x49415041 || gameID == 0x44414441 || gameID == 0x44415041 || gameID == 0x4A414441 || gameID == 0x4A415041 || gameID == 0x4B414441 || gameID == 0x4B415041 || gameID == 0x45555043 || gameID == 0x53555043 || gameID == 0x46555043 || gameID == 0x49555043 || gameID == 0x44555043 || gameID == 0x4A555043 || gameID == 0x4B555043))
            {
                tabControl1.SelectedIndex = 5;
                comboBox10.SelectedIndex = Convert.ToInt32(dataGridView1.CurrentCell.Value);
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 12 && (gameID == 0x45414441 || gameID == 0x45415041 || gameID == 0x53414441 || gameID == 0x53415041 || gameID == 0x46414441 || gameID == 0x46415041 || gameID == 0x49414441 || gameID == 0x49415041 || gameID == 0x44414441 || gameID == 0x44415041 || gameID == 0x4A414441 || gameID == 0x4A415041 || gameID == 0x4B414441 || gameID == 0x4B415041 || gameID == 0x45555043 || gameID == 0x53555043 || gameID == 0x46555043 || gameID == 0x49555043 || gameID == 0x44555043 || gameID == 0x4A555043 || gameID == 0x4B555043))
            {
                wildIndex = nameText.IndexOf(dataGridView1.CurrentCell.Value.ToString());
                Form4_2 nameEditor = new Form4_2();
                nameEditor.ShowDialog(this);
                dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = nameText[wildIndex];
                return;
            }
            if (dataGridView1.CurrentCellAddress.X == 16 && (gameID == 0x45414441 || gameID == 0x45415041 || gameID == 0x53414441 || gameID == 0x53415041 || gameID == 0x46414441 || gameID == 0x46415041 || gameID == 0x49414441 || gameID == 0x49415041 || gameID == 0x44414441 || gameID == 0x44415041 || gameID == 0x4A414441 || gameID == 0x4A415041 || gameID == 0x4B414441 || gameID == 0x4B415041))
            {
                mapFlags = Convert.ToUInt16(dataGridView1.CurrentCell.Value);
                Form4 flagEditor = new Form4();
                flagEditor.ShowDialog(this);
                dataGridView1.CurrentCell.Value = mapFlags;
                return;
            }

            // Platinum Links

            if (dataGridView1.CurrentCellAddress.X == 17 && (gameID == 0x45555043 || gameID == 0x53555043 || gameID == 0x46555043 || gameID == 0x49555043 || gameID == 0x44555043 || gameID == 0x4A555043 || gameID == 0x4B555043))
            {
                mapFlags = Convert.ToUInt16(dataGridView1.CurrentCell.Value);
                Form4 flagEditor = new Form4();
                flagEditor.ShowDialog(this);
                dataGridView1.CurrentCell.Value = mapFlags;
                return;
            }

            // HGSS Links

            if (dataGridView13.CurrentCellAddress.X == 6)
            {
                tabControl1.SelectedIndex = 1;
                comboBox1.SelectedIndex = Convert.ToInt32(dataGridView13.CurrentCell.Value);
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 7 || dataGridView13.CurrentCellAddress.X == 8)
            {
                tabControl1.SelectedIndex = 4;
                comboBox5.SelectedIndex = Convert.ToInt32(dataGridView13.CurrentCell.Value);
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 9)
            {
                tabControl1.SelectedIndex = 3;
                comboBox3.SelectedIndex = Convert.ToInt32(dataGridView13.CurrentCell.Value);
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 12 && (gameID == 0x454B5049 || gameID == 0x45475049 || gameID == 0x534B5049 || gameID == 0x53475049 || gameID == 0x464B5049 || gameID == 0x46475049 || gameID == 0x494B5049 || gameID == 0x49475049 || gameID == 0x444B5049 || gameID == 0x44475049 || gameID == 0x4A4B5049 || gameID == 0x4A475049 || gameID == 0x4B4B5049 || gameID == 0x4B475049))
            {
                tabControl1.SelectedIndex = 5;
                comboBox10.SelectedIndex = Convert.ToInt32(dataGridView13.CurrentCell.Value);
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 13 && (gameID == 0x454B5049 || gameID == 0x45475049 || gameID == 0x534B5049 || gameID == 0x53475049 || gameID == 0x464B5049 || gameID == 0x46475049 || gameID == 0x494B5049 || gameID == 0x49475049 || gameID == 0x444B5049 || gameID == 0x44475049 || gameID == 0x4A4B5049 || gameID == 0x4A475049 || gameID == 0x4B4B5049 || gameID == 0x4B475049))
            {
                wildIndex = nameText.IndexOf(dataGridView13.CurrentCell.Value.ToString());
                Form4_2 nameEditor = new Form4_2();
                nameEditor.ShowDialog(this);
                dataGridView13.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = nameText[wildIndex];
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 2 && (gameID == 0x454B5049 || gameID == 0x45475049 || gameID == 0x534B5049 || gameID == 0x53475049 || gameID == 0x464B5049 || gameID == 0x46475049 || gameID == 0x494B5049 || gameID == 0x49475049 || gameID == 0x444B5049 || gameID == 0x44475049 || gameID == 0x4A4B5049 || gameID == 0x4A475049 || gameID == 0x4B4B5049 || gameID == 0x4B475049))
            {
                wildIndex = (int)Convert.ToUInt32(dataGridView13.CurrentCell.Value);
                Form9 wildEditor = new Form9();
                wildEditor.ShowDialog(this);
                return;
            }
            if (dataGridView13.CurrentCellAddress.X == 18 && (gameID == 0x454B5049 || gameID == 0x45475049 || gameID == 0x534B5049 || gameID == 0x53475049 || gameID == 0x464B5049 || gameID == 0x46475049 || gameID == 0x494B5049 || gameID == 0x49475049 || gameID == 0x444B5049 || gameID == 0x44475049 || gameID == 0x4A4B5049 || gameID == 0x4A475049 || gameID == 0x4B4B5049 || gameID == 0x4B475049))
            {
                mapFlags = Convert.ToUInt16(dataGridView13.CurrentCell.Value);
                Form4 flagEditor = new Form4();
                flagEditor.ShowDialog(this);
                dataGridView13.CurrentCell.Value = mapFlags;
                return;
            }
        }
Пример #11
0
 // Load Wild Editor
 private void button19_Click(object sender, EventArgs e)
 {
     wildIndex = 0;
     Form9 wildEditor = new Form9();
     wildEditor.ShowDialog(this);
 }
Пример #12
0
 //通过ToolStripMenuItem控件,在其时间中调用串口设置的窗体
 private void 串口参数配置ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form9 form9config = new Form9();
     form9config.Show();
 }
Пример #13
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form1.ActiveForm.Hide();
     Form9 frm9 = new Form9();
 }
Пример #14
0
        private void btnView_Click(object sender, EventArgs e)
        {
            var views = new Form9();

            views.ShowDialog();
        }