From 83c58c8b98a51d4d36811ca4237baa16cc3ff6e0 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期四, 24 十月 2024 14:02:16 +0800 Subject: [PATCH] 提交单泵重新匹配曲线未聚焦定位显示问题 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs | 38 +++++++++++++++++++++++++++++++++++--- 1 files changed, 35 insertions(+), 3 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs index e9246bd..9cf3874 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/05-completed/XhsProjectSimulationAnalysisCtrl.cs @@ -5,6 +5,8 @@ public XhsProjectSimulationAnalysisCtrl() { InitializeComponent(); + this.gridView1.SetNormalView(30); + this.gridView1.RegistCustomDrawRowIndicator(40); } private List<XhsProjectSimulationAnalysisViewModel> _allBindingList; @@ -28,19 +30,19 @@ { case Revit.ePropStatus.Error: { - _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParter.Name, Description = revitParterPropStatus.StatusInfo }); + _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParter.Name, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Error", PropStatus = "閿欒" }); } break; case Revit.ePropStatus.Lack: { - _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo }); + _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Lack", PropStatus = "缂虹渷" }); } break; case Revit.ePropStatus.Abnormal: { - _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo }); + _allBindingList.Add(new XhsProjectSimulationAnalysisViewModel { Type = revitParter.Catalog, Code = revitParter.Code, Name = revitParterPropStatus.PropName, Description = revitParterPropStatus.StatusInfo, ErrorLevel = "Abnormal", PropStatus = "寮傚父" }); } break; @@ -51,5 +53,35 @@ } this.xhsProjectSimulationAnalysisViewModelBindingSource.ResetBindings(false); } + + //鑷畾涔夊崟鍏冩牸棰滆壊 + private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) + { + var row = this.gridView1.GetRow(e.RowHandle) as XhsProjectSimulationAnalysisViewModel; + if (row == null) + { + return; + } + if (e.RowHandle != this.gridView1.FocusedRowHandle) + { + switch (row.ErrorLevel) + { + case "Error": + e.Appearance.BackColor = Color.Red; + e.Appearance.ForeColor = Color.White; + break; + + case "Lack": + e.Appearance.BackColor = Color.Gray; + e.Appearance.ForeColor = Color.White; + break; + + case "Abnormal": + e.Appearance.BackColor = Color.Orange; + e.Appearance.ForeColor = Color.White; + break; + } + }; + } } } \ No newline at end of file -- Gitblit v1.9.3