public AntennaEditForm(LakeChabotReader reader, Source_Antenna antenna) { this.reader = reader; this.antennaMaster = antenna; this.antennaActive = new Source_Antenna(antenna); InitializeComponent( ); //Logic Port antennaNumberLabel.Text = String.Format("Antenna {0}", antennaActive.Port); //Status foreach (rfid.Constants.AntennaPortState item in Enum.GetValues(typeof(rfid.Constants.AntennaPortState))) { state.Items.Add(item); } state.Items.Remove(rfid.Constants.AntennaPortState.UNKNOWN); state.SelectedIndex = antennaActive.State == rfid.Constants.AntennaPortState.DISABLED ? 0 : 1; state.SelectedValueChanged += state_SelectedValueChanged; //clark. Set the limit of port number Aotomatically PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM; PhysicalPort.DataBindings.Add("Value", this.antennaActive, "PhysicalPort"); dwellTime.Minimum = 0; dwellTime.Maximum = 1000000; dwellTime.DataBindings.Add("Value", this.antennaActive, "DwellTime"); inventoryCycles.Minimum = 0; inventoryCycles.Maximum = 1000000; inventoryCycles.DataBindings.Add("Value", this.antennaActive, "NumberInventoryCycles"); //Clark 2011.2.21 Cpoied from R1000 Tracer powerLevel.Minimum = Source_Antenna.POWER_MINIMUM; powerLevel.Maximum = Source_Antenna.POWER_MAXIMUM; powerLevel.DataBindings.Add("Value", this.antennaActive, "PowerLevel"); }
public AntennaEditForm(LakeChabotReader reader, Source_Antenna antenna) { this.reader = reader; this.antennaMaster = antenna; this.antennaActive = new Source_Antenna(antenna); InitializeComponent( ); //Logic Port antennaNumberLabel.Text = String.Format("Antenna {0}", antennaActive.Port); //Status foreach (rfid.Constants.AntennaPortState item in Enum.GetValues(typeof(rfid.Constants.AntennaPortState))) { state.Items.Add(item); } state.Items.Remove(rfid.Constants.AntennaPortState.UNKNOWN); state.SelectedIndex = antennaActive.State == rfid.Constants.AntennaPortState.DISABLED ? 0 : 1; state.SelectedValueChanged += state_SelectedValueChanged; //Mod by FJ for change caption of "Antenna Ports" and "GPIO" GUI for HP SiP, 2015-01-22 //clark. Set the limit of port number Aotomatically //Mod by FJ for change the error message appear, 2015-01-30 //rfid.Constants.Result m_result = rfid.Constants.Result.OK; if (rfid.Constants.Result.OK != reader.result_major) { throw new Exception(reader.result_major.ToString()); //throw new Exception(result.ToString()); //End by FJ for change the error message appear, 2015-01-30 } //Mod by FJ for revert physical port display in M03 module, 2016-11-03 //Mod by FJ for antenna port only set one port in M06 module, 2016-10-28 if (reader.uiModelNameMAJOR == 0x4D303658)//0x4D303658 = M06X { PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; PhysicalPort.Maximum = Source_Antenna.PHY_MINIMUM; } //if (reader.uiModelNameMAJOR == 0x4D303358)//0x4D303358==M03X //{ // PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM + 1; // PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM + 1; //} //else if (reader.uiModelNameMAJOR == 0x4D303658)//0x4D303658 = M06X //{ // PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; // PhysicalPort.Maximum = Source_Antenna.PHY_MINIMUM; //} else { PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM; } /* * if (reader.uiModelNameMAJOR != 0x4D303358)//0x4D303358==M03X * { * PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; * PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM; * } * else { * PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM + 1; * PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM + 1; * } */ //End by FJ for antenna port only set one port in M06 module, 2016-10-28 //End by FJ for revert physical port display in M03 module, 2016-11-03 PhysicalPort.DataBindings.Add("Value", this.antennaActive, "PhysicalPort"); /* * //clark. Set the limit of port number Aotomatically * PhysicalPort.Minimum = Source_Antenna.PHY_MINIMUM; * PhysicalPort.Maximum = Source_Antenna.PHY_MAXIMUM; * PhysicalPort.DataBindings.Add( "Value", this.antennaActive, "PhysicalPort" ); */ //End by FJ for change caption of "Antenna Ports" and "GPIO" GUI for HP SiP, 2015-01-22 dwellTime.Minimum = 0; dwellTime.Maximum = 1000000; dwellTime.DataBindings.Add("Value", this.antennaActive, "DwellTime"); inventoryCycles.Minimum = 0; inventoryCycles.Maximum = 1000000; inventoryCycles.DataBindings.Add("Value", this.antennaActive, "NumberInventoryCycles"); //Clark 2011.2.21 Cpoied from R1000 Tracer //Mod by FJ for power level set 0~30dbm in M06 module, 2016-10-28 if (reader.uiModelNameMAJOR == 0x4D303658)//0x4D303658 = M06X { powerLevel.Minimum = Source_Antenna.POWER_MINIMUM; powerLevel.Maximum = 300; } else { powerLevel.Minimum = Source_Antenna.POWER_MINIMUM; powerLevel.Maximum = Source_Antenna.POWER_MAXIMUM; } //powerLevel.Minimum = Source_Antenna.POWER_MINIMUM; //powerLevel.Maximum = Source_Antenna.POWER_MAXIMUM; powerLevel.DataBindings.Add("Value", this.antennaActive, "PowerLevel"); //End by FJ for power level set 0~30dbm in M06 module, 2016-10-28 }