Example #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            WriteRFIDcardcs writeRFI = new WriteRFIDcardcs();

            if (radioButton1.Checked == true)
            {
                writeRFI.KeyA = radioButton1.Text;
                MessageBox.Show(writeRFI.KeyA);
                // Check Selected radiobutton KeyA
            }
            else
            {
                writeRFI.KeyB = radioButton2.Text;
                MessageBox.Show(writeRFI.KeyB);
                // Check Selected radiobutton KeyB
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            WriteRFIDcardcs writeRF = new WriteRFIDcardcs();

            writeRF.Portcom  = comboBox1.Text;
            writeRF.Buadrate = int.Parse(comboBox2.Text);
            System.IO.Ports.SerialPort spot = new System.IO.Ports.SerialPort(writeRF.Portcom, writeRF.Buadrate, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);

            try
            {
                spot.Open();
                spot.Write("Connection Success Port: " + writeRF.Portcom + " Buadrate: " + writeRF.Buadrate);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Connection Failed " + ex.ToString());
            }
            //MessageBox.Show("Port :" + writeRF.Portcom + " Buad : " + writeRF.Buadrate);
            // Check Connection Port and Buad
        }
Example #3
0
        private void button6_Click(object sender, EventArgs e)
        {
            WriteRFIDcardcs writeRFI = new WriteRFIDcardcs();

            if (radioButton3.Checked == true)
            {
                writeRFI.Datablock = radioButton3.Text;
                writeRFI.Value     = textBox1.Text;
                writeRFI.Sector    = comboBox3.Text;
                writeRFI.Block     = comboBox4.Text;
                MessageBox.Show(writeRFI.Datablock + " Value " + writeRFI.Value, "Writting Sector " + writeRFI.Sector + " Block " + writeRFI.Block);
                // Check Value, Sector, Block,write DatablockMode checked
            }
            else
            {
                writeRFI.Valueblock = radioButton4.Text;
                writeRFI.Value      = textBox1.Text;
                writeRFI.Sector     = comboBox3.Text;
                writeRFI.Block      = comboBox4.Text;
                MessageBox.Show(writeRFI.Valueblock + " Value " + writeRFI.Value, "Writting Sector " + writeRFI.Sector + " Block " + writeRFI.Block);
                // Check Value, Sector, Block,write valueblockMode  checked
            }
        }