/// <summary> /// /// </summary> #region UpdateGRDeviceData /// <summary> /// /// </summary> /// <param name="dbgrdatalast"></param> internal void UpdateGRDeviceData(GRDevice grdevice, CZGRDBI.DBGRDataBase dbgrdata) { this.lblStationName.Text = DeviceNameDisplayer.GetDeviceDisplayName( grdevice, Config.DeviceNameDisplayMode); this.lblDateTime.Text = dbgrdata.DT.ToString(); float[] texts = new float[] { dbgrdata.GT1, dbgrdata.BT1, dbgrdata.GP1, dbgrdata.BP1, dbgrdata.GT2, dbgrdata.BT2, dbgrdata.GP2, dbgrdata.BP2 //, //dbgrdatalast.CM, dbgrdatalast.RM }; string formatstring = "f" + Config.Digits; for (int i = 0; i < _valuelabels.Length; i++) { Label lbl = _valuelabels[i]; lbl.Text = texts[i].ToString(formatstring) + " " + _units[i]; } this.lblCMValue.Text = string.Format(strings.CyclePump, GetCMValue(dbgrdata)); this.lblRMValue.Text = string.Format(strings.RecruitePump, GetRMValue(dbgrdata)); SetValuesVisible(true); }
/// <summary> /// /// </summary> /// <param name="dbgrdata"></param> /// <returns></returns> private string GetCMValue(CZGRDBI.DBGRDataBase dbgrdata) { bool b = dbgrdata.RM1 || dbgrdata.RM2; return(b ? strings.Run : strings.Stop); }