load() public method

public load ( rfid transport, UInt32 readerHandle ) : rfid.Constants.Result
transport rfid
readerHandle System.UInt32
return rfid.Constants.Result
Example #1
0
        private void okButton_Click( object sender, EventArgs e )
        {
            rfid.Constants.Result result =
                rfid.Constants.Result.OK;

            try
            {
                result = this.channelActive.store( LakeChabotReader.MANAGED_ACCESS, this.reader.ReaderHandle );
            }
            catch ( Exception exp )
            {
                MessageBox.Show( "Reader Error.\n\nAn error occurred while updating the frequency channel settings.\n\nThe follow error occurred: " + exp.Message, "RF Frequency Band Error", MessageBoxButtons.OK, MessageBoxIcon.Error );
                return;
            }

            if ( rfid.Constants.Result.OK != result )
            {
                MessageBox.Show( "Reader Error.\n\nThe Reader was unable to configure the specified frequency channel settings.\n\nThe follow error occurred: " + result.ToString( ), "RF Frequency Band Error", MessageBoxButtons.OK, MessageBoxIcon.Error );
                return;
            }

            // Need to retrieve the affinityBand value since potentially
            // modified by the radio during set operation(s)

            Source_FrequencyBand channelUpdated = new Source_FrequencyBand( channelActive.Band );

            try
            {
                 result = channelUpdated.load( LakeChabotReader.MANAGED_ACCESS, this.reader.ReaderHandle );
            }
            catch ( Exception exp )
            {
                MessageBox.Show( "Reader Error.\n\nAn error occurred while retrieving updated frequency channel information.\n\nThe follow error occurred: " + exp.Message, "RF Frequency Band Error", MessageBoxButtons.OK, MessageBoxIcon.Error );
                return;
            }

            if ( rfid.Constants.Result.OK != result )
            {
                MessageBox.Show( "Reader Error.\n\nThe Reader was unable to configure the specified frequency channel settings.\n\nThe follow error occurred: " + result.ToString( ), "RF Frequency Band Error", MessageBoxButtons.OK, MessageBoxIcon.Error );
                return;
            }

            this.channelMaster.Copy( this.channelActive );

            DialogResult = DialogResult.OK;
        }