Exemplo n.º 1
0
        private void _97IdReadSet(object sender, EventArgs e)
        {
            Button      btn   = (Button)sender;
            TextBox     tbVal = new TextBox();
            TextBox     tbId  = new TextBox();
            string      res   = string.Empty;
            Protocol645 p645  = new Protocol645();

            if (btn == btnRead1 || btn == btnSet1)
            {
                tbId = txtId1; tbVal = txtData1;
            }
            if (btn == btnRead2 || btn == btnSet2)
            {
                tbId = txtId2; tbVal = txtData2;
            }
            if (btn == btnRead1 || btn == btnRead2)
            {
                tbVal.Text = "";
                Functions.Delay(10);
                p645.SF_ReadData(tbId.Text, out res);
                tbVal.Text = res;
            }
            if (btn == btnSet1 || btn == btnSet2)
            {
                if (!p645.SF_SetData(tbId.Text, tbVal.Text))
                {
                    //statusReturn.Text = "";
                }
            }
        }
Exemplo n.º 2
0
        private void btnReadC14D_Click(object sender, EventArgs e)
        {
            txtRc14d.Text = "";
            Functions.Delay(10);
            string      result = string.Empty;
            Protocol645 p645   = new Protocol645();

            if (p645.SF_ReadData("C14D", out result))
            {
                txtRc14d.Text = result;
            }
        }