Exemple #1
0
 private void disconnectReaderToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         rdr.Destroy();
     }
     catch { }
 }
Exemple #2
0
 private void CloseReader()
 {
     if (null == rdr)
     {
         PrintLn("Reader already closed");
     }
     else
     {
         PrintLn("Closing reader...");
         string portName = Utilities.ReaderPortName;
         try
         {
             rdr.Destroy();
         }
         catch (Exception ex)
         {
             PrintLn("Caught Exception closing reader: " + ex);
         }
         finally
         {
             rdr = null;
         }
         PrintLn("Closed reader on serial port " + portName);
     }
 }
Exemple #3
0
 private void thingMagicReaderToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         try
         {
             string software = (string)rdr.ParamGet("/reader/version/software");
             MessageBox.Show(string.Concat("Hardware: M6e", "  ", "Software: ", software), "About ThingMagic Reader...", MessageBoxButtons.OK);
         }
         catch (NullReferenceException)
         {
             reader = Reader.Create(string.Concat("tmr:///", readerAddress.Text));
             reader.Connect();
             rdr = (SerialReader)reader;
             string software = (string)rdr.ParamGet("/reader/version/software");
             MessageBox.Show(string.Concat("Hardware: M6e", "  ", "Software: ", software), "About ThingMagic Reader...", MessageBoxButtons.OK);
             rdr.Destroy();
         }
     }
     catch
     {
         MessageBox.Show("Connection to ThingMagic Reader not established", "Error!", MessageBoxButtons.OK);
     }
 }
Exemple #4
0
 private void thingMagicReaderToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         try
         {
             string software = (string)rdr.ParamGet("/reader/version/software");
             MessageBox.Show(string.Concat("Hardware: M6e", "  ", "Software: ", software), "About ThingMagic Reader...", MessageBoxButtons.OK);
         }
         catch (NullReferenceException)
         {
             reader = Reader.Create(string.Concat("tmr:///", readerAddress.Text));
             reader.Connect();
             rdr = (SerialReader)reader;
             string software = (string)rdr.ParamGet("/reader/version/software");
             MessageBox.Show(string.Concat("Hardware: M6e", "  ", "Software: ", software), "About ThingMagic Reader...", MessageBoxButtons.OK);
             rdr.Destroy();
         }
     }
     catch
     {
         MessageBox.Show("Connection to ThingMagic Reader not established", "Error!", MessageBoxButtons.OK);
     }
 }