/// <summary> /// 获取历史数据 /// </summary> /// <param name="context"></param> /// <returns></returns> private static HistoryDataModel GetHistoryData(string context) { HistoryDataModel historyDataModel = new HistoryDataModel(); string[] dataArray = context.Split(';'); foreach (string data in dataArray) { string[] cmdArray = data.Split('='); if (cmdArray[0] == "BeginTime") { string year = cmdArray[1].Substring(0, 2); string month = cmdArray[1].Substring(4, 2); string day = cmdArray[1].Substring(6, 2); string hour = cmdArray[1].Substring(8, 2); string minute = cmdArray[1].Substring(10, 2); string second = cmdArray[1].Substring(12, 2); historyDataModel.BeginTime = Convert.ToDateTime(string.Format("{0}-{1}-{2} {3}:{4}:{5}", year, month, day, hour, minute, second)); } if (cmdArray[0] == "EndTime") { string year = cmdArray[1].Substring(0, 2); string month = cmdArray[1].Substring(4, 2); string day = cmdArray[1].Substring(6, 2); string hour = cmdArray[1].Substring(8, 2); string minute = cmdArray[1].Substring(10, 2); string second = cmdArray[1].Substring(12, 2); historyDataModel.EndTime = Convert.ToDateTime(string.Format("{0}-{1}-{2} {3}:{4}:{5}", year, month, day, hour, minute, second)); } } return(historyDataModel); }
/// <summary> /// Populate the ex list /// </summary> private async Task PopulateExercises() { try { if (this._hdm == null) { this._hdm = new HistoryDataModel(); await this._hdm.RefreshExerciseHistory(); } if (this._hdm.History == null) { await this._hdm.RefreshExerciseHistory(); } this.ExList.ItemsSource = this._hdm.History; } catch (UnsuccessfulApiCallException ex) { Tools.Logger.Log(this.GetType().ToString(), "PopulateExercises", ex); // TODO: Add activity indicator // this.SwitchActivityIndicator(false); } catch (System.Exception ex) { Tools.Logger.Log(this.GetType().ToString(), "PopulateExercises", ex); // TODO: Add activity indicator // this.SwitchActivityIndicator(false); } }
/// <summary> /// 上传设备运行时间日历史数据 /// </summary> private void UploadDeviceRunTimeDayData(HJ212Model model) { string content = string.Empty; HistoryDataModel historyDataModel = Deserialize.GetDeviceRunTimeDayData(model.CP); if (null == historyDataModel.BeginTime || null == historyDataModel.EndTime) { content = Serialize.ExecuteResponse(config, model.QN, ExecuteResult.CommandError); } else { for (DateTime dt = (DateTime)historyDataModel.BeginTime; dt <= historyDataModel.EndTime; dt = dt.AddDays(1)) { string qn = Util.GetTimeStamp(); IList <DeviceRunTimeModel> datas = new List <DeviceRunTimeModel>(); foreach (DeviceConfig param in config.Devices) { DeviceRunTimeModel deviceRunTimeModel = new DeviceRunTimeModel(); deviceRunTimeModel.DeviceNumber = param.DeviceNumber; deviceRunTimeModel.DeviceRunTime = Util.GetRunHourRandom(); datas.Add(deviceRunTimeModel); } string c = Serialize.UploadDeviceRunTimeDayData(config, qn, dt, datas); SendData(content); } content = Serialize.ExecuteResponse(config, model.QN, ExecuteResult.Success); } SendData(content); }
private void selectTag(Button selectBtn, Telerik.WinControls.UI.RadLabel rlblLeft, Telerik.WinControls.UI.RadLabel rlblRight, int iIndex) { SelectTagForm form = new SelectTagForm(); form.ThisTag = selectBtn.Tag == null ? "" : selectBtn.Tag.ToString(); form.ShowDialog(); if (form.RemoveFlag) { selectBtn.Text = removeText; selectBtn.Tag = null; var model = SelectedTag.Where(o => o.index == iIndex).FirstOrDefault(); if (model != null) { SelectedTag.Remove(model); } rlblLeft.Text = ""; rlblRight.Text = ""; } else { if (!string.IsNullOrEmpty(form.Tags)) { //设置曲线图量程 historyDataShow1.SetRange(Convert.ToDouble(form.From), Convert.ToDouble(form.To)); rlblLeft.Text = form.From.ToString("#0"); rlblRight.Text = form.To.ToString("#0"); selectBtn.Text = form.Captial; selectBtn.Tag = form.Tags; var model = SelectedTag.Where(o => o.index == iIndex).FirstOrDefault(); if (model == null) { HistoryDataModel hdm = new HistoryDataModel(); hdm.index = iIndex; hdm.Tag = form.Tags; hdm.from = double.Parse(rlblLeft.Text); hdm.to = double.Parse(rlblRight.Text); SelectedTag.Add(hdm); } else { model.Tag = form.Tags; model.from = double.Parse(rlblLeft.Text); model.to = double.Parse(rlblRight.Text); } } } }
private void SelectTag1_Click(object sender, EventArgs e) { SelectTagForm form = new SelectTagForm(); form.ThisTag = this.SelectTag1.Tag == null ? "" : this.SelectTag1.Tag.ToString(); form.ShowDialog(); if (form.RemoveFlag) { this.SelectTag1.Text = removeText; this.SelectTag1.Tag = null; var model = SelectedTag.Where(o => o.index == 1).FirstOrDefault(); if (model != null) { SelectedTag.Remove(model); } rlbl_left_tag1.Text = ""; rlbl_right_tag1.Text = ""; } else { if (!string.IsNullOrEmpty(form.Tags)) { //设置曲线图量程 historyDataShow1.SetRange(Convert.ToDouble(form.From), Convert.ToDouble(form.To)); rlbl_left_tag1.Text = form.From.ToString("#0"); rlbl_right_tag1.Text = form.To.ToString("#0"); this.SelectTag1.Text = form.Captial; this.SelectTag1.Tag = form.Tags; var model = SelectedTag.Where(o => o.index == 1).FirstOrDefault(); if (model == null) { HistoryDataModel hdm = new HistoryDataModel(); hdm.index = 1; hdm.Tag = form.Tags; //hdm.from = form.From; //hdm.to = form.To; SelectedTag.Add(hdm); } else { model.Tag = form.Tags; //model.from = form.From; //model.to = form.To; } } } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string userIdOrGroupId = value as string; if (userIdOrGroupId == null) { return(null); } HistoryDataModel history = ServiceLocator.historyContainerService.GetLastHistoryByUserIdOrGroupId(userIdOrGroupId); if (history == null) { return(null); } return(history.Text); }
/// <summary> /// 模型数据改变 /// </summary> /// <param name="obj"></param> private void dataChanged(HistoryDataModel HistoryDataModel) { getPageData(pageRepuestParams.PageIndex, pageRepuestParams.PageSize); var tmpModel = HistoryDataInfoList.FirstOrDefault(a => a.Id == HistoryDataModel.Id); this.HistoryDataInfo = HistoryDataInfoList.FirstOrDefault(); ////新增、不存在的数据插入到第一行便于查看 //if (Equals(tmpModel, null)) //{ // this.EnterpriseInfoList.Insert(0, enterpriseModel); // //this.EnterpriseInfoList.Insert(0, enterpriseModel); // EnterpriseInfoList.RemoveAt(this.EnterpriseInfoList.Count - 1); //} //else //{ // //修改的更新后置于第一行,便于查看 // tmpModel = enterpriseModel; // EnterpriseInfoList.Move(EnterpriseInfoList.IndexOf(tmpModel), 0); // tmpModel = enterpriseModel; //} }
public override DataTemplate SelectTemplate(object item, DependencyObject container) { HistoryContainerDataModel historyContainerDataModel = item as HistoryContainerDataModel; if (historyContainerDataModel == null) { return(ContactHistoryDataTemplate); } HistoryDataModel historyDataModel = ServiceLocator.historyContainerService.GetLastHistoryByUserIdOrGroupId( historyContainerDataModel.UserIdOrGroupId); if (historyDataModel == null) { return(ContactHistoryDataTemplate); } switch (historyDataModel.Category) { case HistoryCategory.Call: return(CallHistoryDataTemplate); case HistoryCategory.IM: { if (historyContainerDataModel.IsGroup) { return(GroupHistoryDataTemplate); } else { return(ContactHistoryDataTemplate); } } default: return(ContactHistoryDataTemplate); } }
/// <summary> /// 上传污染物周期数据 /// </summary> private void UploadCycleData(HJ212Model model) { string content = string.Empty; HistoryDataModel historyDataModel = Deserialize.GetCycleData(model.CP); if (null == historyDataModel.BeginTime || null == historyDataModel.EndTime) { content = Serialize.ExecuteResponse(config, model.QN, ExecuteResult.CommandError); } else { for (DateTime dt = (DateTime)historyDataModel.BeginTime; dt <= historyDataModel.EndTime; dt = dt.AddHours(config.CycleInterval)) { string qn = Util.GetTimeStamp(); IDictionary <string, DataModel> datas = new Dictionary <string, DataModel>(); foreach (ParamCodeConfig param in config.ParamCodes) { DataModel dataModel = new DataModel(); dataModel.Rtd = Util.GetRandom(param.DefaultValue, param.Max, param.Min); dataModel.Min = Util.GetMin((double)dataModel.Rtd, param.DefaultValue - param.Min); dataModel.Max = Util.GetMax((double)dataModel.Rtd, param.DefaultValue + param.Max); if (param.CouValue) { dataModel.Cou = dataModel.Rtd * 60 * config.CycleInterval; } model.Flag = param.DataFlag; datas.Add(param.ParamCode, dataModel); } IEnumerable <string> contents = Serialize.UploadCycleData(config, qn, dt, datas); foreach (string c in contents) { SendData(c); } } content = Serialize.ExecuteResponse(config, model.QN, ExecuteResult.Success); } SendData(content); }
private void GetData(int location, int tail) { //2018-10-10 //if (dataModelList.Count > 0) //{ dataModelList.Clear(); historyList.ItemsSource = null; historyList.Items.Clear(); //} for (int i = location; i < LINE_PER_TIME + location; i++) { HistoryDataModel temp = new HistoryDataModel(); #region detail id++; temp.ID = id; temp.LifeSig_1 = history.Containers_1[i].LifeSig; temp.LifeSig_2 = history.Containers_2[i].LifeSig; temp.LifeSig_3 = history.Containers_3[i].LifeSig; temp.LifeSig_4 = history.Containers_4[i].LifeSig; temp.LifeSig_5 = history.Containers_5[i].LifeSig; temp.LifeSig_6 = history.Containers_6[i].LifeSig; temp.dateTime = history.Containers_1[i].dateTime; temp.RefSpeed = history.Containers_1[i].RefSpeed; temp.Mode = history.Containers_1[i].Mode; temp.BrakeCmd = history.Containers_1[i].BrakeCmd; temp.DriveCmd = history.Containers_1[i].DriveCmd; temp.FastBrakeCmd = history.Containers_1[i].FastBrakeCmd; temp.LazyCmd = history.Containers_1[i].LazyCmd; temp.EmergencyBrakeCmd = history.Containers_1[i].EmergencyBrakeCmd; temp.HoldBrakeRealease = history.Containers_1[i].HoldBrakeRealease; temp.LazyState = history.Containers_1[i].LazyState; temp.DriveState = history.Containers_1[i].DriveState; temp.NormalBrakeState = history.Containers_1[i].NormalBrakeState; temp.EmergencyBrakeState = history.Containers_1[i].EmergencyBrakeState; temp.ZeroSpeed = history.Containers_1[i].ZeroSpeed; temp.BrakeLevel = history.Containers_1[i].BrakeLevel; temp.TrainBrakeForce = history.Containers_1[i].TrainBrakeForce; temp.SpeedAx1_1 = history.Containers_1[i].SpeedA1Shaft1; temp.SpeedAx2_1 = history.Containers_1[i].SpeedA1Shaft2; temp.SpeedAx1_2 = history.Containers_2[i].SpeedShaft1; temp.SpeedAx2_2 = history.Containers_2[i].SpeedShaft2; temp.SpeedAx1_3 = history.Containers_3[i].SpeedShaft1; temp.SpeedAx2_3 = history.Containers_3[i].SpeedShaft2; temp.SpeedAx1_4 = history.Containers_4[i].SpeedShaft1; temp.SpeedAx2_4 = history.Containers_4[i].SpeedShaft2; temp.SpeedAx1_5 = history.Containers_5[i].SpeedShaft1; temp.SpeedAx2_5 = history.Containers_5[i].SpeedShaft2; temp.SpeedAx1_6 = history.Containers_6[i].SpeedA1Shaft1; temp.SpeedAx2_6 = history.Containers_6[i].SpeedA1Shaft2; temp.VCM2MVBState_1 = history.Containers_1[i].VCM_MVBConnectionState; temp.VCM2MVBState_2 = history.Containers_6[i].VCM_MVBConnectionState; temp.Slip_1 = history.Containers_1[i].SlipA1; temp.Slip_2 = history.Containers_2[i].Slip; temp.Slip_3 = history.Containers_3[i].Slip; temp.Slip_4 = history.Containers_4[i].Slip; temp.Slip_5 = history.Containers_5[i].Slip; temp.Slip_6 = history.Containers_6[i].SlipA1; temp.EmergencyBrakeActive_1 = history.Containers_1[i].EmergencyBrakeActiveA1; temp.EmergencyBrakeActive_2 = history.Containers_2[i].EmergencyBrakeActive; temp.EmergencyBrakeActive_3 = history.Containers_3[i].EmergencyBrakeActive; temp.EmergencyBrakeActive_4 = history.Containers_4[i].EmergencyBrakeActive; temp.EmergencyBrakeActive_5 = history.Containers_5[i].EmergencyBrakeActive; temp.EmergencyBrakeActive_6 = history.Containers_6[i].EmergencyBrakeActiveA1; temp.NotZeroSpeed = history.Containers_1[i].NotZeroSpeed; temp.AbActive_1 = history.Containers_1[i].AbActive; temp.AbActive_2 = history.Containers_2[i].AbBrakeActive; temp.AbActive_3 = history.Containers_3[i].AbBrakeActive; temp.AbActive_4 = history.Containers_4[i].AbBrakeActive; temp.AbActive_5 = history.Containers_5[i].AbBrakeActive; temp.AbActive_6 = history.Containers_6[i].AbActive; temp.BSRLow_1 = history.Containers_1[i].BSRLowA11; temp.BSRLow_2 = history.Containers_2[i].BSRLow1; temp.BSRLow_3 = history.Containers_3[i].BSRLow1; temp.BSRLow_4 = history.Containers_4[i].BSRLow1; temp.BSRLow_5 = history.Containers_5[i].BSRLow1; temp.BSRLow_6 = history.Containers_6[i].BSRLowA11; temp.ParkBreakRealease = history.Containers_1[i].ParkBreakRealease; temp.AbStatues_1 = history.Containers_1[i].AbStatuesA1; temp.AbStatues_2 = history.Containers_2[i].AbBrakeSatet; temp.AbStatues_3 = history.Containers_3[i].AbBrakeSatet; temp.AbStatues_4 = history.Containers_4[i].AbBrakeSatet; temp.AbStatues_5 = history.Containers_5[i].AbBrakeSatet; temp.AbStatues_6 = history.Containers_6[i].AbStatuesA1; temp.MassValid_1 = history.Containers_1[i].MassSigValid; temp.MassValid_2 = history.Containers_2[i].MassSigValid; temp.MassValid_3 = history.Containers_3[i].MassSigValid; temp.MassValid_4 = history.Containers_4[i].MassSigValid; temp.MassValid_5 = history.Containers_5[i].MassSigValid; temp.MassValid_6 = history.Containers_6[i].MassSigValid; temp.AbTargetValue_1 = history.Containers_1[i].AbTargetValueAx1; temp.AbTargetValue_2 = history.Containers_1[i].AbTargetValueAx2; temp.AbTargetValue_3 = history.Containers_1[i].AbTargetValueAx3; temp.AbTargetValue_4 = history.Containers_1[i].AbTargetValueAx4; temp.AbTargetValue_5 = history.Containers_1[i].AbTargetValueAx5; temp.AbTargetValue_6 = history.Containers_1[i].AbTargetValueAx6; temp.SelfInt = history.Containers_1[i].SelfTestInt; temp.SelfActive = history.Containers_1[i].SelfTestActive; temp.SelfSuccess = history.Containers_1[i].SelfTestSuccess; temp.SelfFail = history.Containers_1[i].SelfTestFail; temp.UnTest24 = history.Containers_1[i].UnSelfTest24; temp.UnTest26 = history.Containers_1[i].UnSelfTest26; temp.GatewayValveState = history.Containers_1[i].GateValveState; temp.HardDrive = history.Containers_1[i].HardDriveCmd; temp.HardBrake = history.Containers_1[i].HardBrakeCmd; temp.HardFastBrake = history.Containers_1[i].HardFastBrakeCmd; temp.HardEmergencyBrake = history.Containers_1[i].HardEmergencyBrake; temp.HardEmergencyDrive = history.Containers_1[i].HardEmergencyDriveCmd; temp.CanUnitTestOn = history.Containers_1[i].CanUnitSelfTestOn; temp.CanUnitTestOff = history.Containers_1[i].CanUintSelfTestOver; temp.CanValveActive = history.Containers_1[i].ValveCanEmergencyActive; temp.NetDrive = history.Containers_1[i].NetDriveCmd; temp.NetBrake = history.Containers_1[i].NetBrakeCmd; temp.NetFastBrake = history.Containers_1[i].NetFastBrakeCmd; temp.TowingMode = history.Containers_1[i].TowingMode; temp.KeepBrakeRelease = history.Containers_1[i].KeepBrakeState; temp.CanTestA = history.Containers_1[i].CanUintSelfTestCmd_A; temp.CanTestB = history.Containers_1[i].CanUintSelfTestCmd_B; temp.BrakeLevelActive = history.Containers_1[i].BrakeLevelEnable; temp.SelfTestCmd = history.Containers_1[i].SelfTestCmd; temp.AbFadeOut = history.Containers_1[i].EdFadeOut; temp.TrainBrakeEnable = history.Containers_1[i].TrainBrakeEnable; temp.EDoutB = history.Containers_1[i].EdOffB1; temp.EDoutC = history.Containers_1[i].EdOffC1; temp.WheelInputState = history.Containers_1[i].WheelInputState; temp.BrakeCylinderSourcePressure_1 = history.Containers_1[i].BrakeCylinderSourcePressure; temp.BrakeCylinderSourcePressure_2 = history.Containers_2[i].BrakeCylinderSourcePressure; temp.BrakeCylinderSourcePressure_3 = history.Containers_3[i].BrakeCylinderSourcePressure; temp.BrakeCylinderSourcePressure_4 = history.Containers_4[i].BrakeCylinderSourcePressure; temp.BrakeCylinderSourcePressure_5 = history.Containers_5[i].BrakeCylinderSourcePressure; temp.BrakeCylinderSourcePressure_6 = history.Containers_6[i].BrakeCylinderSourcePressure; temp.AirSpringPressure1_1 = history.Containers_1[i].AirSpring1PressureA1Car1; temp.AirSpringPressure2_1 = history.Containers_1[i].AirSpring2PressureA1Car1; temp.AirSpringPressure1_2 = history.Containers_2[i].AirSpringPressure1; temp.AirSpringPressure2_2 = history.Containers_2[i].AirSpringPressure2; temp.AirSpringPressure1_3 = history.Containers_3[i].AirSpringPressure1; temp.AirSpringPressure2_3 = history.Containers_3[i].AirSpringPressure2; temp.AirSpringPressure1_4 = history.Containers_4[i].AirSpringPressure1; temp.AirSpringPressure2_4 = history.Containers_4[i].AirSpringPressure2; temp.AirSpringPressure1_5 = history.Containers_5[i].AirSpringPressure1; temp.AirSpringPressure2_5 = history.Containers_5[i].AirSpringPressure2; temp.AirSpringPressure1_6 = history.Containers_6[i].AirSpring1PressureA1Car1; temp.AirSpringPressure2_6 = history.Containers_6[i].AirSpring2PressureA1Car1; temp.ParkPressure_1 = history.Containers_1[i].ParkPressureA1; temp.ParkPressure_2 = history.Containers_3[i].ParkPressure; temp.ParkPressure_3 = history.Containers_5[i].ParkPressure; temp.ParkPressure_4 = history.Containers_4[i].ParkPressure; temp.VldRealPressure_1 = history.Containers_1[i].VldRealPressureAx1; temp.VldRealPressure_2 = history.Containers_2[i].VldRealPressure; temp.VldRealPressure_3 = history.Containers_3[i].VldRealPressure; temp.VldRealPressure_4 = history.Containers_4[i].VldRealPressure; temp.VldRealPressure_5 = history.Containers_5[i].VldRealPressure; temp.VldRealPressure_6 = history.Containers_6[i].VldRealPressureAx1; temp.Bcp1Pressure_1 = history.Containers_1[i].Bcp1PressureAx1; temp.Bcp2Pressure_1 = history.Containers_1[i].Bcp2PressureAx2; temp.Bcp1Pressure_2 = history.Containers_2[i].Bcp1Pressure; temp.Bcp2Pressure_2 = history.Containers_2[i].Bcp2Pressure; temp.Bcp1Pressure_3 = history.Containers_3[i].Bcp1Pressure; temp.Bcp2Pressure_3 = history.Containers_3[i].Bcp2Pressure; temp.Bcp1Pressure_4 = history.Containers_4[i].Bcp1Pressure; temp.Bcp2Pressure_4 = history.Containers_4[i].Bcp2Pressure; temp.Bcp1Pressure_5 = history.Containers_5[i].Bcp1Pressure; temp.Bcp2Pressure_5 = history.Containers_5[i].Bcp2Pressure; temp.Bcp1Pressure_6 = history.Containers_6[i].Bcp1PressureAx1; temp.Bcp2Pressure_6 = history.Containers_6[i].Bcp2PressureAx2; temp.BSSRSenorFault_1 = history.Containers_1[i].BSSRSenorFault; temp.BSSRSenorFault_2 = history.Containers_2[i].BSSRSenorFault; temp.BSSRSenorFault_3 = history.Containers_3[i].BSSRSenorFault; temp.BSSRSenorFault_4 = history.Containers_4[i].BSSRSenorFault; temp.BSSRSenorFault_5 = history.Containers_5[i].BSSRSenorFault; temp.BSSRSenorFault_6 = history.Containers_6[i].BSSRSenorFault; temp.AirSpringSenorFault1_1 = history.Containers_1[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_1 = history.Containers_1[i].AirSpringSenorFault_2; temp.AirSpringSenorFault1_2 = history.Containers_2[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_2 = history.Containers_2[i].AirSpringSenorFault_2; temp.AirSpringSenorFault1_3 = history.Containers_3[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_3 = history.Containers_3[i].AirSpringSenorFault_2; temp.AirSpringSenorFault1_4 = history.Containers_4[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_4 = history.Containers_4[i].AirSpringSenorFault_2; temp.AirSpringSenorFault1_5 = history.Containers_5[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_5 = history.Containers_5[i].AirSpringSenorFault_2; temp.AirSpringSenorFault1_6 = history.Containers_6[i].AirSpringSenorFault_1; temp.AirSpringSenorFault2_6 = history.Containers_6[i].AirSpringSenorFault_2; temp.ParkCylinderSenorFault_1 = history.Containers_1[i].ParkCylinderSenorFault; temp.ParkCylinderSenorFault_2 = history.Containers_2[i].ParkCylinderSenorFault; temp.ParkCylinderSenorFault_3 = history.Containers_3[i].ParkCylinderSenorFault; temp.ParkCylinderSenorFault_4 = history.Containers_4[i].ParkCylinderSenorFault; temp.ParkCylinderSenorFault_5 = history.Containers_5[i].ParkCylinderSenorFault; temp.ParkCylinderSenorFault_6 = history.Containers_6[i].ParkCylinderSenorFault; temp.VLDSensorFault_1 = history.Containers_1[i].VLDSensorFault; temp.VLDSensorFault_2 = history.Containers_2[i].VLDSensorFault; temp.VLDSensorFault_3 = history.Containers_3[i].VLDSensorFault; temp.VLDSensorFault_4 = history.Containers_4[i].VLDSensorFault; temp.VLDSensorFault_5 = history.Containers_5[i].VLDSensorFault; temp.VLDSensorFault_6 = history.Containers_6[i].VLDSensorFault; temp.BSRSenorFault1_1 = history.Containers_1[i].BSRSenorFault_1; temp.BSRSenorFault2_1 = history.Containers_1[i].BSRSenorFault_2; temp.BSRSenorFault1_2 = history.Containers_2[i].BSRSenorFault_1; temp.BSRSenorFault2_2 = history.Containers_2[i].BSRSenorFault_2; temp.BSRSenorFault1_3 = history.Containers_3[i].BSRSenorFault_1; temp.BSRSenorFault2_3 = history.Containers_3[i].BSRSenorFault_2; temp.BSRSenorFault1_4 = history.Containers_4[i].BSRSenorFault_1; temp.BSRSenorFault2_4 = history.Containers_4[i].BSRSenorFault_2; temp.BSRSenorFault1_5 = history.Containers_5[i].BSRSenorFault_1; temp.BSRSenorFault2_5 = history.Containers_5[i].BSRSenorFault_2; temp.BSRSenorFault1_6 = history.Containers_6[i].BSRSenorFault_1; temp.BSRSenorFault2_6 = history.Containers_6[i].BSRSenorFault_2; temp.AirSpringOverflow1_1 = history.Containers_1[i].AirSpringOverflow_1; temp.AirSpringOverflow2_1 = history.Containers_1[i].AirSpringOverflow_2; temp.AirSpringOverflow1_2 = history.Containers_2[i].AirSpringOverflow_1; temp.AirSpringOverflow2_2 = history.Containers_2[i].AirSpringOverflow_2; temp.AirSpringOverflow1_3 = history.Containers_3[i].AirSpringOverflow_1; temp.AirSpringOverflow2_3 = history.Containers_3[i].AirSpringOverflow_2; temp.AirSpringOverflow1_4 = history.Containers_4[i].AirSpringOverflow_1; temp.AirSpringOverflow2_4 = history.Containers_4[i].AirSpringOverflow_2; temp.AirSpringOverflow1_5 = history.Containers_5[i].AirSpringOverflow_1; temp.AirSpringOverflow2_5 = history.Containers_5[i].AirSpringOverflow_2; temp.AirSpringOverflow1_6 = history.Containers_6[i].AirSpringOverflow_1; temp.AirSpringOverflow2_6 = history.Containers_6[i].AirSpringOverflow_2; temp.VldPressureSetup_1 = history.Containers_1[i].VldPressureSetupAx1; temp.VldPressureSetup_2 = history.Containers_2[i].VldSetupPressure; temp.VldPressureSetup_3 = history.Containers_3[i].VldSetupPressure; temp.VldPressureSetup_4 = history.Containers_4[i].VldSetupPressure; temp.VldPressureSetup_5 = history.Containers_5[i].VldSetupPressure; temp.VldPressureSetup_6 = history.Containers_6[i].VldPressureSetupAx1; temp.Mass_1 = history.Containers_1[i].MassA1; temp.Mass_2 = history.Containers_2[i].MassValue; temp.Mass_3 = history.Containers_3[i].MassValue; temp.Mass_4 = history.Containers_4[i].MassValue; temp.Mass_5 = history.Containers_5[i].MassValue; temp.Mass_6 = history.Containers_6[i].MassA1; temp.BCUFail_Serious_1 = history.Containers_1[i].BCUFail_Serious; temp.BCUFail_Middle_1 = history.Containers_1[i].BCUFail_Middle; temp.BCUFail_Slight_1 = history.Containers_1[i].BCUFail_Slight; temp.BCUFail_Serious_2 = history.Containers_2[i].BCUFail_Serious; temp.BCUFail_Middle_2 = history.Containers_2[i].BCUFail_Middle; temp.BCUFail_Slight_2 = history.Containers_2[i].BCUFail_Slight; temp.BCUFail_Serious_3 = history.Containers_3[i].BCUFail_Serious; temp.BCUFail_Middle_3 = history.Containers_3[i].BCUFail_Middle; temp.BCUFail_Slight_3 = history.Containers_3[i].BCUFail_Slight; temp.BCUFail_Serious_4 = history.Containers_4[i].BCUFail_Serious; temp.BCUFail_Middle_4 = history.Containers_4[i].BCUFail_Middle; temp.BCUFail_Slight_4 = history.Containers_4[i].BCUFail_Slight; temp.BCUFail_Serious_5 = history.Containers_5[i].BCUFail_Serious; temp.BCUFail_Middle_5 = history.Containers_5[i].BCUFail_Middle; temp.BCUFail_Slight_5 = history.Containers_5[i].BCUFail_Slight; temp.BCUFail_Serious_6 = history.Containers_6[i].BCUFail_Serious; temp.BCUFail_Middle_6 = history.Containers_6[i].BCUFail_Middle; temp.BCUFail_Slight_6 = history.Containers_6[i].BCUFail_Slight; temp.EmergencyBrakeFault_1 = history.Containers_1[i].EmergencyBrakeFault; temp.EmergencyBrakeFault_2 = history.Containers_2[i].EmergencyBrakeFault; temp.EmergencyBrakeFault_3 = history.Containers_3[i].EmergencyBrakeFault; temp.EmergencyBrakeFault_4 = history.Containers_4[i].EmergencyBrakeFault; temp.EmergencyBrakeFault_5 = history.Containers_5[i].EmergencyBrakeFault; temp.EmergencyBrakeFault_6 = history.Containers_6[i].EmergencyBrakeFault; temp.SpeedSenorFault1_1 = history.Containers_1[i].SpeedSenorFault_1; temp.SpeedSenorFault2_1 = history.Containers_1[i].SpeedSenorFault_2; temp.SpeedSenorFault1_2 = history.Containers_2[i].SpeedSenorFault_1; temp.SpeedSenorFault2_2 = history.Containers_2[i].SpeedSenorFault_2; temp.SpeedSenorFault1_3 = history.Containers_3[i].SpeedSenorFault_1; temp.SpeedSenorFault2_3 = history.Containers_3[i].SpeedSenorFault_2; temp.SpeedSenorFault1_4 = history.Containers_4[i].SpeedSenorFault_1; temp.SpeedSenorFault2_4 = history.Containers_4[i].SpeedSenorFault_2; temp.SpeedSenorFault1_5 = history.Containers_5[i].SpeedSenorFault_1; temp.SpeedSenorFault2_5 = history.Containers_5[i].SpeedSenorFault_2; temp.SpeedSenorFault1_6 = history.Containers_6[i].SpeedSenorFault_1; temp.SpeedSenorFault2_6 = history.Containers_6[i].SpeedSenorFault_2; temp.WSPFault1_1 = history.Containers_1[i].WSPFault_1; temp.WSPFault2_1 = history.Containers_1[i].WSPFault_2; temp.WSPFault1_2 = history.Containers_2[i].WSPFault_1; temp.WSPFault2_2 = history.Containers_2[i].WSPFault_2; temp.WSPFault1_3 = history.Containers_3[i].WSPFault_1; temp.WSPFault2_3 = history.Containers_3[i].WSPFault_2; temp.WSPFault1_4 = history.Containers_4[i].WSPFault_1; temp.WSPFault2_4 = history.Containers_4[i].WSPFault_2; temp.WSPFault1_5 = history.Containers_5[i].WSPFault_1; temp.WSPFault2_5 = history.Containers_5[i].WSPFault_2; temp.WSPFault1_6 = history.Containers_6[i].WSPFault_1; temp.WSPFault2_6 = history.Containers_6[i].WSPFault_2; temp.CodeConnectorFault_1 = history.Containers_1[i].CodeConnectorFault; temp.CodeConnectorFault_2 = history.Containers_2[i].CodeConnectorFault; temp.CodeConnectorFault_3 = history.Containers_3[i].CodeConnectorFault; temp.CodeConnectorFault_4 = history.Containers_4[i].CodeConnectorFault; temp.CodeConnectorFault_5 = history.Containers_5[i].CodeConnectorFault; temp.CodeConnectorFault_6 = history.Containers_6[i].CodeConnectorFault; temp.AirSpringLimit_1 = history.Containers_1[i].AirSpringLimit; temp.AirSpringLimit_2 = history.Containers_2[i].AirSpringLimit; temp.AirSpringLimit_3 = history.Containers_3[i].AirSpringLimit; temp.AirSpringLimit_4 = history.Containers_4[i].AirSpringLimit; temp.AirSpringLimit_5 = history.Containers_5[i].AirSpringLimit; temp.AirSpringLimit_6 = history.Containers_6[i].AirSpringLimit; temp.BrakeNotRealease_1 = history.Containers_1[i].BrakeNotRealease; temp.BrakeNotRealease_2 = history.Containers_2[i].BrakeNotRealease; temp.BrakeNotRealease_3 = history.Containers_3[i].BrakeNotRealease; temp.BrakeNotRealease_4 = history.Containers_4[i].BrakeNotRealease; temp.BrakeNotRealease_5 = history.Containers_5[i].BrakeNotRealease; temp.BrakeNotRealease_6 = history.Containers_6[i].BrakeNotRealease; temp.BCPLow_1 = history.Containers_1[i].BCPLowA11; temp.BCPLow_2 = history.Containers_2[i].BCPLow1; temp.BCPLow_3 = history.Containers_3[i].BCPLow1; temp.BCPLow_4 = history.Containers_4[i].BCPLow1; temp.BCPLow_5 = history.Containers_5[i].BCPLow1; temp.BCPLow_6 = history.Containers_6[i].BCPLowA11; temp.VCMLifeSig = history.Containers_1[i].VCMLifeSig; temp.DCULifeSig_1 = history.Containers_1[i].DcuLifeSig[0]; temp.DCULifeSig_2 = history.Containers_1[i].DcuLifeSig[1]; temp.DCULifeSig_3 = history.Containers_1[i].DcuLifeSig[2]; temp.DCULifeSig_4 = history.Containers_1[i].DcuLifeSig[3]; temp.DCU_Ed_Ok_1 = history.Containers_1[i].DcuEbOK[0]; temp.DCU_Ed_Fadeout_1 = history.Containers_1[i].DcuEbFadeout[0]; temp.DCU_Ed_Slip_1 = history.Containers_1[i].DcuEbSlip[0]; temp.DCU_Ed_Ok_2 = history.Containers_1[i].DcuEbOK[1]; temp.DCU_Ed_Fadeout_2 = history.Containers_1[i].DcuEbFadeout[1]; temp.DCU_Ed_Slip_2 = history.Containers_1[i].DcuEbSlip[1]; temp.DCU_Ed_Ok_3 = history.Containers_1[i].DcuEbOK[2]; temp.DCU_Ed_Fadeout_3 = history.Containers_1[i].DcuEbFadeout[2]; temp.DCU_Ed_Slip_3 = history.Containers_1[i].DcuEbSlip[2]; temp.DCU_Ed_Ok_4 = history.Containers_1[i].DcuEbOK[3]; temp.DCU_Ed_Fadeout_4 = history.Containers_1[i].DcuEbFadeout[3]; temp.DCU_Ed_Slip_4 = history.Containers_1[i].DcuEbSlip[3]; temp.DcuEbRealValue_1 = history.Containers_1[i].DcuEbRealValue[0]; temp.DcuEbRealValue_2 = history.Containers_1[i].DcuEbRealValue[1]; temp.DcuEbRealValue_3 = history.Containers_1[i].DcuEbRealValue[2]; temp.DcuEbRealValue_4 = history.Containers_1[i].DcuEbRealValue[3]; temp.DcuMax_1 = history.Containers_1[i].DcuMax[0]; temp.DcuMax_2 = history.Containers_1[i].DcuMax[1]; temp.DcuMax_3 = history.Containers_1[i].DcuMax[2]; temp.DcuMax_4 = history.Containers_1[i].DcuMax[3]; temp.AbCapacity_1 = history.Containers_1[i].AbCapacity[0]; temp.AbCapacity_2 = history.Containers_1[i].AbCapacity[1]; temp.AbCapacity_3 = history.Containers_1[i].AbCapacity[2]; temp.AbCapacity_4 = history.Containers_1[i].AbCapacity[3]; temp.AbCapacity_5 = history.Containers_1[i].AbCapacity[4]; temp.AbCapacity_6 = history.Containers_1[i].AbCapacity[5]; temp.AbRealValue_1 = history.Containers_1[i].AbRealValue[0]; temp.AbRealValue_2 = history.Containers_1[i].AbRealValue[1]; temp.AbRealValue_3 = history.Containers_1[i].AbRealValue[2]; temp.AbRealValue_4 = history.Containers_1[i].AbRealValue[3]; temp.AbRealValue_5 = history.Containers_1[i].AbRealValue[4]; temp.AbRealValue_6 = history.Containers_1[i].AbRealValue[5]; temp.SpeedDetection = history.Containers_1[i].SpeedDetection; temp.CanBusFail1 = history.Containers_1[i].CanBusFail1; temp.CanBusFail2 = history.Containers_1[i].CanBusFail2; temp.HardDifferent = history.Containers_1[i].HardDifferent; temp.Event_High = history.Containers_1[i].EventHigh; temp.Event_Middle = history.Containers_1[i].EventMid; temp.Event_Low = history.Containers_1[i].EventLow; temp.CanASPActive = history.Containers_1[i].CanASPEnable; temp.BCPLowA = history.Containers_1[i].BCPLowA; temp.BCPLowB = history.Containers_1[i].BCPLowB; temp.BCPLowC = history.Containers_1[i].BCPLowC; temp.SoftVersion = history.Containers_1[i].SoftVersion; #endregion dataModelList.Add(temp); } historyList.ItemsSource = dataModelList; historyList.ScrollIntoView(historyList.Items[0]); }