private void btn_edit_Click(object sender, EventArgs e)//dataGridView1 edit the selected line
        {
            serializeSigh = "serialize";

            serializeForm = new gf_serialize(this, "edit", dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString());
            serializeForm.Show();

            serializeForm.TopMost = true;
            this.Enabled          = false;
        }
        private void btn_add_Click(object sender, EventArgs e)//dataGridView1 add a new line
        {
            serializeSigh = "serialize";

            serializeForm       = new gf_serialize(this, "add", null);
            serializeForm.Owner = this;
            serializeForm.Show();

            serializeForm.TopMost = true;
            this.Enabled          = false;
        }
Example #3
0
        private void button_Click(object sender, EventArgs e)
        {
            Button btn_Click = (Button)sender;

            if (gf_main.serializeSigh == "serialize")
            {
                gf_serialize a = mMainFormTrans("serializeFrm");
                a.remoteEventReceive(btn_Click.Text);
                return;
            }

            for (int i = 0; i < cc_control.dtEvent.Rows.Count; i++)
            {
                if (cc_control.dtEvent.Rows[i][gf_main.CTRLEVENTNAME].ToString() == btn_Click.Text)
                {
                    ConsoleU.writeLine(String.Format("you click: {0} button, \"{1}\"", btn_Click.Text, cc_control.dtEvent.Rows[i][gf_main.CTRLLINE].ToString()), ConsoleU.Level.Info);
                    ProtocolObject.remoteWrite(SocProtocol.Drive.remote, System.Text.Encoding.ASCII.GetBytes(cc_control.dtEvent.Rows[i][gf_main.CTRLLINE].ToString()));

                    break;
                }
            }
        }
        private void btn_edit_Click(object sender, EventArgs e)//dataGridView1 edit the selected line
        {
            serializeSigh = "serialize";

            serializeForm = new gf_serialize(this, "edit", dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString());
            serializeForm.Show();

            serializeForm.TopMost = true;
            this.Enabled = false;
        }
        private void btn_add_Click(object sender, EventArgs e)//dataGridView1 add a new line 
        {
            serializeSigh = "serialize";

            serializeForm = new gf_serialize(this,"add",null);
            serializeForm.Owner = this;
            serializeForm.Show();

            serializeForm.TopMost = true;
            this.Enabled = false;
        }