Example #1
0
    private void connect()
    {
        String timeout;

        try
        {
            reader.ConnectUSB(0);
            this.textBoxDeviceID.Text          = reader.GetPortPara("Device-ID");
            this.buttonSearchForReader.Enabled = false;
            this.buttonSearchForLabels.Enabled = true;

            // demonstration of increasing the timeout
            // changing can be done only after successful connection
            timeout = reader.GetPortPara("Timeout");
            reader.SetPortPara("Timeout", "3000");
            timeout = reader.GetPortPara("Timeout");
        }
        catch (FePortDriverException ex)
        {
            Console.WriteLine(ex.ToString());
        }
        catch (FeReaderDriverException ex)
        {
            Console.WriteLine(ex.ToString());
        }
        catch (FedmException ex)
        {
            Console.WriteLine(ex.ToString());
        }
    }