private void setBankConfigData(DeviceInfo pCurDev, int bankID) { string text = this.labDevModel.Text; string value = bankID.ToString(); BankInfo bankInfoByID = DeviceOperation.GetBankInfoByID(bankID); DevModelConfig deviceModelConfig = DevAccessCfg.GetInstance().getDeviceModelConfig(text, pCurDev.FWVersion); int selNo = System.Convert.ToInt32(bankInfoByID.PortLists); this.labBankNo.Text = selNo.ToString(); System.Collections.Generic.List <BankInfo> bankInfo = pCurDev.GetBankInfo(); for (int i = 1; i <= bankInfo.Count; i++) { Control[] array = this.gbBankConfig.Controls.Find("butBank" + i, false); if (array.Length > 0) { string text2 = ((Button)array[0]).Tag.ToString(); if (!text2.Equals(value)) { ((Button)array[0]).BackColor = Color.PaleTurquoise; } else { ((Button)array[0]).BackColor = Color.DarkCyan; } } } this.tbBankNm.Text = bankInfoByID.BankName; int num = devcfgUtil.UIThresholdEditFlg(deviceModelConfig, "bank"); if (deviceModelConfig.commonThresholdFlag == Constant.APC_PDU) { this.labMaxPortCurrentBound.Text = ((!this.tbOMinCurrent.ReadOnly || !this.tbOMaxCurrent.ReadOnly) ? devcfgUtil.RangeCurrent(deviceModelConfig, "bank", selNo, "F0") : ""); ThresholdUtil.SetUIEdit(this.tbOMinCurrent, (num & 1) == 0, bankInfoByID.Min_current, 0, "F0"); ThresholdUtil.SetUIEdit(this.tbOMaxCurrent, (num & 2) == 0, bankInfoByID.Max_current, 0, "F0"); } else { this.labMaxPortCurrentBound.Text = ((!this.tbOMinCurrent.ReadOnly || !this.tbOMaxCurrent.ReadOnly) ? devcfgUtil.RangeCurrent(deviceModelConfig, "bank", selNo, "F1") : ""); ThresholdUtil.SetUIEdit(this.tbOMinCurrent, (num & 1) == 0, bankInfoByID.Min_current, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMaxCurrent, (num & 2) == 0, bankInfoByID.Max_current, 0, "F1"); } ThresholdUtil.SetUIEdit(this.tbOMinVoltage, (num & 4) == 0, bankInfoByID.Min_voltage, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMaxVoltage, (num & 8) == 0, bankInfoByID.Max_voltage, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMinPower, (num & 16) == 0, bankInfoByID.Min_power, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMaxPower, (num & 32) == 0, bankInfoByID.Max_power, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMinPowerDiss, (num & 64) == 0, bankInfoByID.Min_power_diss, 0, "F1"); ThresholdUtil.SetUIEdit(this.tbOMaxPowerDiss, (num & 128) == 0, bankInfoByID.Max_power_diss, 0, "F1"); this.labMaxVoltageBound.Text = ((!this.tbOMinVoltage.ReadOnly || !this.tbOMaxVoltage.ReadOnly) ? devcfgUtil.RangeVoltage(deviceModelConfig, "bank", selNo) : ""); this.labMaxPowerBound.Text = ((!this.tbOMinPower.ReadOnly || !this.tbOMaxPower.ReadOnly) ? devcfgUtil.RangePower(deviceModelConfig, "bank", selNo, 1.0) : ""); this.labMaxPowerDisBound.Text = ((!this.tbOMinPowerDiss.ReadOnly || !this.tbOMaxPowerDiss.ReadOnly) ? devcfgUtil.RangePowerDiss(deviceModelConfig, "bank", selNo) : ""); this.tbBankNm.BackColor = Color.White; }