private void okButton_Click( object sender, EventArgs e )
{
if ( activeThresholdValue != newThreshold.Value )
{
rfid.Constants.Result status = rfid.Constants.Result.OK;
try
{
status = reader.API_AntennaPortSetSenseThreshold( (uint)newThreshold.Value );
}
catch ( Exception )
{
status = rfid.Constants.Result.RADIO_FAILURE;
}
if ( rfid.Constants.Result.OK != status )
{
MessageBox.Show
(
"Reader Error.\n\n" +
"An error occurred while updating the antenna threshold value.\n\n" +
"The follow error occurred: " + status,
"Antenna Threshold Setting Error",
MessageBoxButtons.OK,
MessageBoxIcon.Error
);
return;
}
}
DialogResult = DialogResult.OK;
}