lixiaojun
2024-11-28 e39e22e12380551c79f99a9c96bb77d5dc3839b1
WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/02-value/HydroMonitorValueListCtrl.cs
@@ -10,8 +10,9 @@
            InitializeComponent();
            this.gridView1.SetNormalEditView(30);
            this.gridView1.RegistCustomDrawRowIndicator(40);
            this.colRelation.OptionsColumn.AllowEdit = false;
            this.colVisualName.OptionsColumn.AllowEdit = false;
            this.colPropName.OptionsColumn.AllowEdit = false;
            this.colUnitName.OptionsColumn.AllowEdit = false;
            this.colDescription.OptionsColumn.AllowEdit = false;
        }
@@ -25,12 +26,21 @@
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(List<HydroMonitorValueViewModel> allValueList)
        public void SetBindingData(List<HydroMonitorValueViewModel> allMonitorValueList)
        {
            _allBindingList = new BindingList<HydroMonitorValueViewModel>();
            allValueList?.OrderBy(x => x.SortCode).ForEach(x => _allBindingList.Add(x));
            allMonitorValueList?.OrderBy(x => x.SortCode).ForEach(x => _allBindingList.Add(x));
            this.hydroMonitorValueViewModelBindingSource.DataSource = _allBindingList;
            this.hydroMonitorValueViewModelBindingSource.ResetBindings(false);
        }
        /// <summary>
        /// 设置视图面板
        /// </summary>
        public void SetViewBoard()
        {
            this.colMonitorValue.OptionsColumn.AllowEdit = false;
            this.colMonitorValue.ImageOptions.SvgImage = null;
        }
        //行点击
@@ -43,5 +53,8 @@
            }
            this.HydroViewEvent?.Invoke(row.Vmo.Relation);
        }
    }
}