From 1e4b358de58e36bfbf692ab2538ff9e7d60fd025 Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期五, 24 二月 2023 14:11:17 +0800 Subject: [PATCH] 曲线筛查 --- DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/Signal.cs | 14 WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Settings.Designer.cs | 2 DAL/Local/IStation.DAL.LocalFile.Product/product/Product.cs | 14 BLL/IStation.BLL.Logic/logic_catalog/LogicCatalog.cs | 24 WinFormUI/IStation.WinFormUI.Project/project/ProjectTileViewCtrl.cs | 2 WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Resources.Designer.cs | 4 WinFormUI/IStation.WinFormUI.MonitorDataSet/IStation.WinFormUI.MonitorDataSet.csproj | 24 DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummary.cs | 68 WinFormUI/IStation.WinFormUI.Project/project/EditProjectDlg.cs | 4 BLL/IStation.BLL.Scene/analyze_structure_mapping/AnalyzeStructureMapping.cs | 26 DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPoint.cs | 14 DAL/IDAL/IStation.IDAL.Monitor/monitor_point/IMonitorPointMapping.cs | 6 BLL/IStation.BLL.Project/project/Project.cs | 20 BLL/IStation.BLL.Product/pump_curve/pump_curve/PumpCurve.cs | 38 DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructure.cs | 14 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/MonitorPointExSignalListTreeCtrl.resx | 204 +++ BLL/IStation.BLL.Scene/scene/Scene.cs | 20 WinFormUI/IStation.WinFormUI.Project/helpers/ProjectHelper.cs | 4 DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructureMapping.cs | 14 BLL/IStation.BLL.Logic/elec_price/ElecPrice.cs | 20 DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs | 14 WinFormUI/IStation.WinFormUI.Core/custom_control/PagerCtrl.cs | 24 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/FilterDataMgrPage.resx | 267 ++++ BLL/IStation.BLL.Scene/analyze_structure/AnalyzeStructure.cs | 20 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/FilterDataMgrPage.designer.cs | 404 ++++++ DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalTypeGroup.cs | 14 WinFormUI/IStation.WinFormUI.MonitorDataSet/曲线比较/CurveCompareChartMgr.cs | 8 WinFormUI/IStation.WinFormUI.MonitorDataSet/曲线比较/CurveCompareChartMgr.Designer.cs | 60 DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurve.cs | 14 DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummaryHelper.cs | 14 DataProvider/IStation.DataProvider/temp/导入导出/设备/ProductImportExportHelper.cs | 4 BLL/IStation.BLL.Logic/logic_area/LogicArea.cs | 24 BLL/IStation.BLL.MonitorDataSet/monitor_data_set/MonitorDataSet.cs | 53 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/MonitorPointExSignalListTreeCtrl.cs | 312 +++++ BLL/IStation.BLL.Monitor/monitor_point/monitor_point/MonitorPoint.cs | 178 +- DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileIdHelper.cs | 18 DAL/Local/IStation.DAL.LocalFile.Logic/logic_catalog/LogicCatalog.cs | 14 BLL/IStation.BLL.Logic/station/Station.cs | 24 WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Settings.Designer.cs | 2 DAL/Local/IStation.DAL.LocalFile.Scene/scene/Scene.cs | 14 DAL/Local/IStation.DAL.LocalFile.Logic/station/Station.cs | 14 BLL/IStation.BLL.Monitor/monitor_point/monitor_point_group/MonitorPointGroup.cs | 24 BLL/IStation.BLL.Product/product/product_group/ProductGroup.cs | 20 WinFormUI/IStation.WinFormUI.Scene/import/general/GeneralMonitorDataImportHelper.cs | 6 WinFormUI/IStation.WinFormUI.Project/project/LatelyProjectOverviewPage.cs | 2 DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set/MonitorMonthlyDataSet.cs | 31 WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/IStation.WinFormDesktop.Scatl.Professional.csproj | 44 DAL/Local/IStation.DAL.LocalFile.Scene/analyze_scheme/AnalyzeScheme.cs | 14 BLL/IStation.BLL.Product/product/product/Product.cs | 68 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/MonitorPointExSignalListTreeCtrl.designer.cs | 310 +++++ DAL/IDAL/IStation.IDAL.MonitorDataSet/monitor_data_set/IMonitorDataSet.cs | 12 BLL/IStation.BLL.Logic/logic_tree/LogicTree.cs | 30 BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping/PumpCurveMapping.cs | 48 DAL/Local/IStation.DAL.LocalFile.Logic/elec_price/ElecPrice.cs | 14 DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurveMapping.cs | 14 WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.cs | 31 BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping_ex/PumpCurveExMapping.cs | 68 DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointGroup.cs | 14 BLL/IStation.BLL.Monitor/monitor_point/signal/Signal.cs | 40 DataProvider/IStation.DataProvider/temp/导入导出/性能曲线/FeatCurveImportExportHelper.cs | 4 WinFormUI/IStation.WinFormUI.MonitorDataSet/XtraForm1.Designer.cs | 24 WinFormUI/IStation.WinFormUI.MonitorDataSet/曲线比较/CurveCompareMultiSelectMonitorPointTreeListCtrl.cs | 12 BLL/IStation.BLL.Monitor/signal_type/signal_type_group/SignalTypeGroup.cs | 20 DataProvider/IStation.DataProvider/temp/导入导出/业务树/LogicTreeImportExportHelper.cs | 8 WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.designer.cs | 33 DAL/IDAL/IStation.IDAL.Core/base/IBaseDAL.cs | 8 DAL/IDAL/IStation.IDAL.Core/scene/ISceneBaseDAL.cs | 8 DAL/Local/IStation.DAL.LocalFile.Logic/logic_area/LogicArea.cs | 14 DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalType.cs | 14 BLL/IStation.BLL.Scene/analyze_scheme/AnalyzeScheme.cs | 20 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/ChartBoxSelHelper.cs | 207 +++ DataProvider/IStation.DataProvider/temp/SceneTempCreate.cs | 2 DAL/IDAL/IStation.IDAL.Core/project/IProjectDAL.cs | 8 DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointMapping.cs | 30 DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileSrcHelper.cs | 2 DAL/Local/IStation.DAL.LocalFile.Project/Project/Project.cs | 18 WinFormUI/IStation.WinFormUI.MonitorDataSet/曲线比较/UnitValueHelper.cs | 2 WinFormUI/IStation.WinFormUI.MonitorDataSet/数据筛查/FilterDataMgrPage.cs | 244 ++++ WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Resources.Designer.cs | 4 BLL/IStation.BLL.Monitor/monitor_point/monitor_point_mapping/MonitorPointMapping.cs | 34 WinFormUI/IStation.WinFormUI.Project/project/LoadProjectListDlg.cs | 4 WinFormUI/IStation.WinFormUI.Project/project/OpenProjectOverviewDlg.cs | 2 DataProvider/IStation.DataProvider/temp/导入导出/测点/MonitorPointImportExportHelper.cs | 4 BLL/IStation.BLL.Monitor/signal_type/signal_type/SignalType.cs | 32 DAL/Local/IStation.DAL.LocalFile.Product/product/ProductGroup.cs | 14 85 files changed, 2,854 insertions(+), 740 deletions(-) diff --git a/BLL/IStation.BLL.Logic/elec_price/ElecPrice.cs b/BLL/IStation.BLL.Logic/elec_price/ElecPrice.cs index 1530a4f..8b781d6 100644 --- a/BLL/IStation.BLL.Logic/elec_price/ElecPrice.cs +++ b/BLL/IStation.BLL.Logic/elec_price/ElecPrice.cs @@ -21,7 +21,7 @@ { return ElecPriceCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.ElecPrice> QueryAll(long projectId) + public List<Model.ElecPrice> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.ElecPrice QueryById(long projectId, long Id) + public Model.ElecPrice GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.ElecPrice> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.ElecPrice> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } diff --git a/BLL/IStation.BLL.Logic/logic_area/LogicArea.cs b/BLL/IStation.BLL.Logic/logic_area/LogicArea.cs index e04531b..e9d8dca 100644 --- a/BLL/IStation.BLL.Logic/logic_area/LogicArea.cs +++ b/BLL/IStation.BLL.Logic/logic_area/LogicArea.cs @@ -21,7 +21,7 @@ { return LogicAreaCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.LogicArea> QueryAll(long projectId) + public List<Model.LogicArea> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.LogicArea QueryById(long projectId, long Id) + public Model.LogicArea GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.LogicArea> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.LogicArea> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } @@ -207,7 +207,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper()); @@ -220,7 +220,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper() && x.Id != ExceptID); diff --git a/BLL/IStation.BLL.Logic/logic_catalog/LogicCatalog.cs b/BLL/IStation.BLL.Logic/logic_catalog/LogicCatalog.cs index e0bcbf0..2569162 100644 --- a/BLL/IStation.BLL.Logic/logic_catalog/LogicCatalog.cs +++ b/BLL/IStation.BLL.Logic/logic_catalog/LogicCatalog.cs @@ -21,7 +21,7 @@ { return LogicCatalogCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.LogicCatalog> QueryAll(long projectId) + public List<Model.LogicCatalog> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.LogicCatalog QueryById(long projectId, long Id) + public Model.LogicCatalog GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.LogicCatalog> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.LogicCatalog> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } @@ -207,7 +207,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper()); @@ -220,7 +220,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper() && x.Id != ExceptID); diff --git a/BLL/IStation.BLL.Logic/logic_tree/LogicTree.cs b/BLL/IStation.BLL.Logic/logic_tree/LogicTree.cs index b922f0f..3e6a51d 100644 --- a/BLL/IStation.BLL.Logic/logic_tree/LogicTree.cs +++ b/BLL/IStation.BLL.Logic/logic_tree/LogicTree.cs @@ -21,7 +21,7 @@ { return LogicTreeCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.LogicTree> QueryAll(long projectId) + public List<Model.LogicTree> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,21 +86,31 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.LogicTree QueryById(long projectId, long Id) + public Model.LogicTree GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.LogicTree> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.LogicTree> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); + } + + + /// <summary> + /// 鏍规嵁 LogicType LogicId 鏌ヨ + /// </summary> + public Model.LogicTree GetByLogicTypeAndLogicId(long projectId, string logicType, long logicId) + { + var all = GetAll(projectId); + return all.Find(x => x.LogicType == logicType&&x.LogicId== logicId); } #endregion @@ -196,7 +206,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Logic/station/Station.cs b/BLL/IStation.BLL.Logic/station/Station.cs index 04b3caf..115e3d9 100644 --- a/BLL/IStation.BLL.Logic/station/Station.cs +++ b/BLL/IStation.BLL.Logic/station/Station.cs @@ -21,7 +21,7 @@ { return StationCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.Station> QueryAll(long projectId) + public List<Model.Station> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.Station QueryById(long projectId, long Id) + public Model.Station GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.Station> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.Station> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } @@ -207,7 +207,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper()); @@ -220,7 +220,7 @@ { if (string.IsNullOrEmpty(TagName)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null || all.Count < 1) return default; return all.Exists(x => !string.IsNullOrEmpty(x.TagName) && x.TagName.ToUpper() == TagName.ToUpper() && x.Id != ExceptID); diff --git a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point/MonitorPoint.cs b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point/MonitorPoint.cs index 58028c2..e70a9a7 100644 --- a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point/MonitorPoint.cs +++ b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point/MonitorPoint.cs @@ -22,7 +22,7 @@ { return MonitorPointCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -35,7 +35,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -54,7 +54,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -73,7 +73,7 @@ #endregion - #region Query + #region Get #region 娴嬬偣 @@ -81,7 +81,7 @@ /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.MonitorPoint> QueryAll(long projectId) + public List<Model.MonitorPoint> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -90,27 +90,27 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.MonitorPoint QueryById(long projectId, long Id) + public Model.MonitorPoint GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.MonitorPoint> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByIds + public List<Model.MonitorPoint> GetByIds (long projectId, IEnumerable<long> ids, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { if (ids == null || ids.Count() < 1) @@ -123,7 +123,7 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.MonitorPoint> GetByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { var all = GetProjectCache(projectId); all = all.Where(x => x.BelongType == belongType && x.BelongId == belongId).ToList(); @@ -133,7 +133,7 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId + public List<Model.MonitorPoint> GetByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) { var all = GetProjectCache(projectId); @@ -144,7 +144,7 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId + public List<Model.MonitorPoint> GetByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { var all = GetProjectCache(projectId); @@ -155,7 +155,7 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId + public List<Model.MonitorPoint> GetByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.Monitor.eCronType cronType) { var all = GetProjectCache(projectId); @@ -166,7 +166,7 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongIds 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) + public List<Model.MonitorPoint> GetByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) { if (belongIds == null || belongIds.Count() < 1) return default; @@ -178,7 +178,7 @@ /// <summary> /// 鏍规嵁 groupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupId(long projectId, long groupId) + public List<Model.MonitorPoint> GetByGroupId(long projectId, long groupId) { var all = GetProjectCache(projectId); all = all.Where(x => x.GroupId == groupId).ToList(); @@ -188,7 +188,7 @@ /// <summary> /// 鏍规嵁 groupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupId + public List<Model.MonitorPoint> GetByGroupId (long projectId, long groupId, Model.eMonitorType monitorType) { var all = GetProjectCache(projectId); @@ -199,7 +199,7 @@ /// <summary> /// 鏍规嵁 groupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupId + public List<Model.MonitorPoint> GetByGroupId (long projectId, long groupId, Model.Monitor.eCronType cronType) { var all = GetProjectCache(projectId); @@ -210,7 +210,7 @@ /// <summary> /// 鏍规嵁 groupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupId + public List<Model.MonitorPoint> GetByGroupId (long projectId, long groupId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { var all = GetProjectCache(projectId); @@ -221,7 +221,7 @@ /// <summary> /// 鏍规嵁 groupIds 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupIds(long projectId, IEnumerable<long> groupIds) + public List<Model.MonitorPoint> GetByGroupIds(long projectId, IEnumerable<long> groupIds) { if (groupIds == null || groupIds.Count() < 1) return default; @@ -233,7 +233,7 @@ /// <summary> /// 鏍规嵁 groupIds 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByGroupIds + public List<Model.MonitorPoint> GetByGroupIds (long projectId, IEnumerable<long> groupIds, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { if (groupIds == null || groupIds.Count() < 1) @@ -246,7 +246,7 @@ /// <summary> /// 鏍规嵁 MonitorType 鍜� CronType 鏌ヨ /// </summary> - public List<Model.MonitorPoint> QueryByMonitorTypeAndCronType + public List<Model.MonitorPoint> GetByMonitorTypeAndCronType (long projectId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { var all = GetProjectCache(projectId); @@ -261,12 +261,12 @@ /// <summary> /// 鏌ヨ鎵�鏈� /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalList(long projectId) + public List<Model.MonitorPointExSignalList> GetExSignalList(long projectId) { - var allMonitorList = QueryAll(projectId); + var allMonitorList = GetAll(projectId); if (allMonitorList == null || allMonitorList.Count() < 1) return default; - var allSignalList = new Signal().QueryAll(projectId); + var allSignalList = new Signal().GetAll(projectId); if (allSignalList == null || allSignalList.Count() < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -284,12 +284,12 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -307,13 +307,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId + public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -331,13 +331,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId + public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -355,14 +355,14 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongIds 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) + public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) { if (belongIds == null || belongIds.Count() < 1) return default; - var allMonitorList = QueryByBelongTypeAndBelongIds(projectId, belongType, belongIds); + var allMonitorList = GetByBelongTypeAndBelongIds(projectId, belongType, belongIds); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -380,12 +380,12 @@ /// <summary> /// 鏍规嵁 groupId 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByGroupId(long projectId, long groupId) + public List<Model.MonitorPointExSignalList> GetExSignalListByGroupId(long projectId, long groupId) { - var allMonitorList = QueryByGroupId(projectId, groupId); + var allMonitorList = GetByGroupId(projectId, groupId); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -403,14 +403,14 @@ /// <summary> /// 鏍规嵁 GroupIds 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByGroupIds(long projectId, IEnumerable<long> groupIds) + public List<Model.MonitorPointExSignalList> GetExSignalListByGroupIds(long projectId, IEnumerable<long> groupIds) { if (groupIds == null || groupIds.Count() < 1) return default; - var allMonitorList = QueryByGroupIds(projectId, groupIds); + var allMonitorList = GetByGroupIds(projectId, groupIds); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -428,12 +428,12 @@ /// <summary> /// 鏍规嵁 id 鏌ヨ /// </summary> - public Model.MonitorPointExSignalList QueryExSignalListById(long projectId, long id) + public Model.MonitorPointExSignalList GetExSignalListById(long projectId, long id) { - var monitor = QueryById(projectId, id); + var monitor = GetById(projectId, id); if (monitor == null) return default; - var signalList = new Signal().QueryByMonitorPointId(projectId, id); + var signalList = new Signal().GetByMonitorPointId(projectId, id); if (signalList == null || signalList.Count < 1) return default; return new Model.MonitorPointExSignalList(monitor, signalList); @@ -442,14 +442,14 @@ /// <summary> /// 鏍规嵁 ids 鏌ヨ /// </summary> - public List<Model.MonitorPointExSignalList> QueryExSignalListByIds(long projectId, IEnumerable<long> ids) + public List<Model.MonitorPointExSignalList> GetExSignalListByIds(long projectId, IEnumerable<long> ids) { if (ids == null || ids.Count() < 1) return default; - var allMonitorList = QueryByIds(projectId, ids); + var allMonitorList = GetByIds(projectId, ids); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); + var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPointExSignalList>(); @@ -471,13 +471,13 @@ /// <summary> /// 鏍规嵁 Id 鏌ヨ /// </summary> - public Model.MonitorPoint_Signal_SignalType QueryExSignalWithSignalTypeById + public Model.MonitorPoint_Signal_SignalType GetExSignalWithSignalTypeById (long projectId, long id) { - var monitor = QueryById(projectId, id); + var monitor = GetById(projectId, id); if (monitor == null) return default; - var signalList = new Signal().QueryExSignalTypeByMonitorPointId(projectId, monitor.Id); + var signalList = new Signal().GetExSignalTypeByMonitorPointId(projectId, monitor.Id); if (signalList == null || signalList.Count() < 1) return default; var vm = new Model.MonitorPoint_Signal_SignalType(monitor, signalList); @@ -487,15 +487,15 @@ /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByIds + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByIds (long projectId, IEnumerable<long> ids) { if (ids == null || ids.Count() < 1) return default; - var allMonitorList = QueryByIds(projectId, ids); + var allMonitorList = GetByIds(projectId, ids); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -513,15 +513,15 @@ /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByIds + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByIds (long projectId, IEnumerable<long> ids, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { if (ids == null || ids.Count() < 1) return default; - var allMonitorList = QueryByIds(projectId, ids, monitorType, cronType); + var allMonitorList = GetByIds(projectId, ids, monitorType, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -539,13 +539,13 @@ /// <summary> /// 鏍规嵁 GroupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId (long projectId, long groupId) { - var allMonitorList = QueryByGroupId(projectId, groupId); + var allMonitorList = GetByGroupId(projectId, groupId); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -563,13 +563,13 @@ /// <summary> /// 鏍规嵁 GroupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId (long projectId, long groupId, Model.eMonitorType monitorType) { - var allMonitorList = QueryByGroupId(projectId, groupId, monitorType); + var allMonitorList = GetByGroupId(projectId, groupId, monitorType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -587,13 +587,13 @@ /// <summary> /// 鏍规嵁 GroupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId (long projectId, long groupId, Model.Monitor.eCronType cronType) { - var allMonitorList = QueryByGroupId(projectId, groupId, cronType); + var allMonitorList = GetByGroupId(projectId, groupId, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -611,13 +611,13 @@ /// <summary> /// 鏍规嵁 GroupId 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId (long projectId, long groupId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { - var allMonitorList = QueryByGroupId(projectId, groupId, monitorType, cronType); + var allMonitorList = GetByGroupId(projectId, groupId, monitorType, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -635,15 +635,15 @@ /// <summary> /// 鏍规嵁 GroupIds 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupIds + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupIds (long projectId, IEnumerable<long> groupIds) { if (groupIds == null || groupIds.Count() < 1) return default; - var allMonitorList = QueryByGroupIds(projectId, groupIds); + var allMonitorList = GetByGroupIds(projectId, groupIds); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -661,15 +661,15 @@ /// <summary> /// 鏍规嵁 GroupIds 鏌ヨ /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupIds + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupIds (long projectId, IEnumerable<long> groupIds, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { if (groupIds == null || groupIds.Count() < 1) return default; - var allMonitorList = QueryByGroupIds(projectId, groupIds, monitorType, cronType); + var allMonitorList = GetByGroupIds(projectId, groupIds, monitorType, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -687,13 +687,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ 娴嬬偣+淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId (long projectId, string belongType, long belongId) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -711,13 +711,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ 娴嬬偣+淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -735,13 +735,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ 娴嬬偣+淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.Monitor.eCronType cronType) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, cronType); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -759,13 +759,13 @@ /// <summary> /// 鏍规嵁 BelongType 鍜� BelongId 鏌ヨ 娴嬬偣+淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId + public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) { - var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); + var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); if (allMonitorList == null || allMonitorList.Count < 1) return default; - var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); + var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); if (allSignalList == null || allSignalList.Count < 1) return default; var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); @@ -877,7 +877,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_group/MonitorPointGroup.cs b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_group/MonitorPointGroup.cs index 74bec46..9ced6fd 100644 --- a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_group/MonitorPointGroup.cs +++ b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_group/MonitorPointGroup.cs @@ -21,7 +21,7 @@ { return MonitorPointGroupCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.MonitorPointGroup> QueryAll(long projectId) + public List<Model.MonitorPointGroup> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.MonitorPointGroup QueryById(long projectId, long Id) + public Model.MonitorPointGroup GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPointGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.MonitorPointGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } @@ -107,9 +107,9 @@ /// <summary> /// 鏍规嵁 BelongType BelongId 鏌ヨ /// </summary> - public List<Model.MonitorPointGroup> QueryByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.MonitorPointGroup> GetByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.BelongType == belongType && x.BelongId == belongId).ToList(); } #endregion @@ -206,7 +206,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_mapping/MonitorPointMapping.cs b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_mapping/MonitorPointMapping.cs index 04e813d..20c1d34 100644 --- a/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_mapping/MonitorPointMapping.cs +++ b/BLL/IStation.BLL.Monitor/monitor_point/monitor_point_mapping/MonitorPointMapping.cs @@ -21,7 +21,7 @@ { return MonitorPointMappingCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -66,7 +66,7 @@ //鏍规嵁 MonitorPointId 鏇存柊缂撳瓨 private void UpdateProjectCacheByMonitorPointId(long projectId, long monitorPointId) { - var entity_list = _dal.QueryByMonitorPointId(projectId, monitorPointId); + var entity_list = _dal.GetByMonitorPointId(projectId, monitorPointId); var model_list = Entity2Models(entity_list); var all = GetProjectCache(projectId); all.RemoveAll(x => x.MonitorPointId == monitorPointId); @@ -79,7 +79,7 @@ //鏍规嵁 ObjectType 鍜� ObjectId 鏇存柊缂撳瓨 private void UpdateProjectCacheByObjectTypeAndObjectId(long projectId, string objectType, long objectId) { - var entity_list = _dal.QueryByObjectTypeAndObjectId(projectId, objectType, objectId); + var entity_list = _dal.GetByObjectTypeAndObjectId(projectId, objectType, objectId); var model_list = Entity2Models(entity_list); var all = GetProjectCache(projectId); all.RemoveAll(x => x.ObjectType == objectType && x.ObjectId == objectId); @@ -123,12 +123,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.MonitorPointMapping> QueryAll(long projectId) + public List<Model.MonitorPointMapping> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -137,20 +137,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.MonitorPointMapping QueryById(long projectId, long Id) + public Model.MonitorPointMapping GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.MonitorPointMapping> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.MonitorPointMapping> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } @@ -159,7 +159,7 @@ /// </summary> public List<Model.MonitorPointMapping> GetByMonitorPointId(long projectId, long monitorPointId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.MonitorPointId == monitorPointId).OrderBy(x => x.SortCode).ToList(); } @@ -168,7 +168,7 @@ /// </summary> public List<Model.MonitorPointMapping> GetByObjectTypeAndObjectId(long projectId, string objectType, long objectId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.ObjectType == objectType && x.ObjectId == objectId).OrderBy(x => x.SortCode).ToList(); } @@ -179,7 +179,7 @@ { if (objectIds == null || objectIds.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.ObjectType == objectType && objectIds.Contains(x.ObjectId)).OrderBy(x => x.SortCode).ToList(); } @@ -295,7 +295,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } @@ -304,7 +304,7 @@ /// </summary> public bool IsExistByMonitorPointId(long projectId, long monitorPointId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.MonitorPointId == monitorPointId); } @@ -313,7 +313,7 @@ /// </summary> public bool IsExistByObjectTypeAndObjectId(long projectId, string objectType, long objectId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.ObjectType == objectType && x.ObjectId == objectId); } #endregion diff --git a/BLL/IStation.BLL.Monitor/monitor_point/signal/Signal.cs b/BLL/IStation.BLL.Monitor/monitor_point/signal/Signal.cs index bf4cd39..737f0ea 100644 --- a/BLL/IStation.BLL.Monitor/monitor_point/signal/Signal.cs +++ b/BLL/IStation.BLL.Monitor/monitor_point/signal/Signal.cs @@ -21,7 +21,7 @@ { return SignalCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.Signal> QueryAll(long projectId) + public List<Model.Signal> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,27 +86,27 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.Signal QueryById(long projectId, long Id) + public Model.Signal GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.Signal> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.Signal> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } /// <summary> /// 鏍规嵁 monitorPointId 鏌ヨ /// </summary> - public List<Model.Signal> QueryByMonitorPointId(long projectId, long monitorPointId) + public List<Model.Signal> GetByMonitorPointId(long projectId, long monitorPointId) { var all = GetProjectCache(projectId); all = all.Where(x => monitorPointId == x.MonitorPointId).ToList(); @@ -126,7 +126,7 @@ /// <summary> /// 鏍规嵁 monitorPointIds 鏌ヨ /// </summary> - public List<Model.Signal> QueryByMonitorPointIds(long projectId, IEnumerable<long> monitorPointIds) + public List<Model.Signal> GetByMonitorPointIds(long projectId, IEnumerable<long> monitorPointIds) { if (monitorPointIds == null || monitorPointIds.Count() < 1) return default; @@ -138,13 +138,13 @@ /// <summary> /// 鏍规嵁 monitorPointId 鏌ヨ 淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.Signal_SignalType> QueryExSignalTypeByMonitorPointId(long projectId, long monitorPointId) + public List<Model.Signal_SignalType> GetExSignalTypeByMonitorPointId(long projectId, long monitorPointId) { - var list = QueryByMonitorPointId(projectId, monitorPointId); + var list = GetByMonitorPointId(projectId, monitorPointId); if (list == null || list.Count < 1) return default; var identifiers = list.Select(x => x.SignalType).Distinct().ToList(); - var typeList = new SignalType().QueryByIdentifiers(projectId,identifiers); + var typeList = new SignalType().GetByIdentifiers(projectId,identifiers); if (typeList == null || typeList.Count < 1) return default; var vmList = (from x in list @@ -158,12 +158,12 @@ /// <summary> /// 鏍规嵁 monitorPointId 鏌ヨ绗竴鏉� 淇″彿+淇″彿绫诲瀷 /// </summary> - public Model.Signal_SignalType QueryFirstExSignalTypeByMonitorPointId(long projectId, long monitorPointId) + public Model.Signal_SignalType GetFirstExSignalTypeByMonitorPointId(long projectId, long monitorPointId) { var first = GetFirstByMonitorPointId(projectId, monitorPointId); if (first == null) return default; - var signalType = new SignalType().QueryByIdentifier(projectId,first.SignalType); + var signalType = new SignalType().GetByIdentifier(projectId,first.SignalType); if (signalType == null) return default; return new Model.Signal_SignalType(first, signalType); @@ -172,15 +172,15 @@ /// <summary> /// 鏍规嵁 MonitorPointIds 鏌ヨ 淇″彿+淇″彿绫诲瀷 /// </summary> - public List<Model.Signal_SignalType> QueryExSignalTypeByMonitorPointIds(long projectId, IEnumerable<long> monitorPointIds) + public List<Model.Signal_SignalType> GetExSignalTypeByMonitorPointIds(long projectId, IEnumerable<long> monitorPointIds) { if (monitorPointIds == null || monitorPointIds.Count() < 1) return default; - var list = QueryByMonitorPointIds(projectId, monitorPointIds); + var list = GetByMonitorPointIds(projectId, monitorPointIds); if (list == null || list.Count < 1) return default; var identifiers = list.Select(x => x.SignalType).Distinct().ToList(); - var typeList = new SignalType().QueryByIdentifiers(projectId, identifiers); + var typeList = new SignalType().GetByIdentifiers(projectId, identifiers); if (typeList == null || typeList.Count < 1) return default; var vmList = (from x in list @@ -284,7 +284,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Monitor/signal_type/signal_type/SignalType.cs b/BLL/IStation.BLL.Monitor/signal_type/signal_type/SignalType.cs index c9ccfbe..33ecf0d 100644 --- a/BLL/IStation.BLL.Monitor/signal_type/signal_type/SignalType.cs +++ b/BLL/IStation.BLL.Monitor/signal_type/signal_type/SignalType.cs @@ -22,7 +22,7 @@ { return SignalTypeCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -35,7 +35,7 @@ //根据 Id 更新缓存 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -54,7 +54,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -73,12 +73,12 @@ #endregion - #region Query + #region Get /// <summary> /// 查询全部 /// </summary> - public List<Model.SignalType> QueryAll(long projectId) + public List<Model.SignalType> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -87,29 +87,29 @@ /// <summary> /// 根据 Id查询 /// </summary> - public Model.SignalType QueryById(long projectId, long Id) + public Model.SignalType GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 根据 Ids 查询 /// </summary> - public List<Model.SignalType> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.SignalType> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } /// <summary> /// 根据 groupId 查询 /// </summary> - public List<Model.SignalType> QueryByGroupId(long projectId, long groupId) + public List<Model.SignalType> GetByGroupId(long projectId, long groupId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); all = all.Where(x => x.GroupId == groupId).ToList(); return all?.OrderBy(x => x.SortCode).ToList(); } @@ -117,9 +117,9 @@ /// <summary> /// 根据 identifier 查询 /// </summary> - public Model.SignalType QueryByIdentifier(long projectId, string identifier) + public Model.SignalType GetByIdentifier(long projectId, string identifier) { - var all = QueryAll(projectId); + var all = GetAll(projectId); var model = all.Find(x => x.Identifier == identifier); return model; } @@ -127,11 +127,11 @@ /// <summary> /// 根据 identifiers 查询 /// </summary> - public List<Model.SignalType> QueryByIdentifiers(long projectId, IEnumerable<string> identifiers) + public List<Model.SignalType> GetByIdentifiers(long projectId, IEnumerable<string> identifiers) { if (identifiers == null || identifiers.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); all = all.Where(x => identifiers.Contains(x.Identifier)).ToList(); return all?.OrderBy(x => x.SortCode).ToList(); } @@ -229,7 +229,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Monitor/signal_type/signal_type_group/SignalTypeGroup.cs b/BLL/IStation.BLL.Monitor/signal_type/signal_type_group/SignalTypeGroup.cs index 9d9c6f4..574c0c7 100644 --- a/BLL/IStation.BLL.Monitor/signal_type/signal_type_group/SignalTypeGroup.cs +++ b/BLL/IStation.BLL.Monitor/signal_type/signal_type_group/SignalTypeGroup.cs @@ -21,7 +21,7 @@ { return SignalTypeGroupCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.SignalTypeGroup> QueryAll(long projectId) + public List<Model.SignalTypeGroup> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.SignalTypeGroup QueryById(long projectId, long Id) + public Model.SignalTypeGroup GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.SignalTypeGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.SignalTypeGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.MonitorDataSet/monitor_data_set/MonitorDataSet.cs b/BLL/IStation.BLL.MonitorDataSet/monitor_data_set/MonitorDataSet.cs index 785f83f..c7ab8af 100644 --- a/BLL/IStation.BLL.MonitorDataSet/monitor_data_set/MonitorDataSet.cs +++ b/BLL/IStation.BLL.MonitorDataSet/monitor_data_set/MonitorDataSet.cs @@ -22,20 +22,20 @@ /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId) + public List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId) { if (projectId < 1) return default; if (sceneId < 1) return default; - return _dal.QueryMonitorDataSet(projectId,sceneId); + return _dal.GetMonitorDataSet(projectId,sceneId); } /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId) + public List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId, long monitorPointId) { if (projectId < 1) return default; @@ -44,13 +44,13 @@ if (monitorPointId < 1) return default; - return _dal.QueryMonitorDataSet(projectId, sceneId, monitorPointId); + return _dal.GetMonitorDataSet(projectId, sceneId, monitorPointId); } /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public Model.MonitorDataSet QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month) + public Model.MonitorDataSet GetMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month) { if (projectId < 1) return default; @@ -59,7 +59,7 @@ if (monitorPointId < 1) return default; - return _dal.QueryMonitorDataSet(projectId, sceneId, monitorPointId,year,month); + return _dal.GetMonitorDataSet(projectId, sceneId, monitorPointId,year,month); } #endregion @@ -69,7 +69,7 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - public Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId) + public Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId) { if (projectId < 1) return default; @@ -80,13 +80,13 @@ if (signalId < 1) return default; - return _dal.QuerySignalRecordPacket(projectId, sceneId, monitorPointId, signalId); + return _dal.GetSignalRecordPacket(projectId, sceneId, monitorPointId, signalId); } /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - public Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { if (projectId < 1) return default; @@ -97,7 +97,7 @@ if (signalId < 1) return default; - return _dal.QuerySignalRecordPacket(projectId, sceneId, monitorPointId, signalId,year,month); + return _dal.GetSignalRecordPacket(projectId, sceneId, monitorPointId, signalId,year,month); } #endregion @@ -107,7 +107,7 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍 /// </summary> - public List<Model.SignalRecord> QuerySignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public List<Model.SignalRecord> GetSignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { if (projectId < 1) return default; @@ -118,13 +118,13 @@ if (signalId < 1) return default; - return _dal.QuerySignalRecord(projectId, sceneId, monitorPointId, signalId, year, month); + return _dal.GetSignalRecord(projectId, sceneId, monitorPointId, signalId, year, month); } #endregion #endregion - + #region Save /// <summary> @@ -179,5 +179,32 @@ } #endregion + /// <summary> + /// 鍒犻櫎(涓存椂) + /// </summary> + public bool SetAbnormal(long projectId, long sceneId, long monitorPointId, long signalId, IEnumerable<DateTime> dataTimeList,double err) + { + if (dataTimeList == null || dataTimeList.Count() < 1) + return false; + var dataSet = _dal.GetMonitorDataSet(projectId, sceneId, monitorPointId); + if (dataSet == null || dataSet.Count<1) + return false; + foreach (var data in dataSet) + { + var packet = data.PacketList?.Find(x => x.SignalId == signalId); + if (packet != null && packet.RecordList != null) + for (int i = 0; i < packet.RecordList.Count; i++) + { + var record = packet.RecordList[i]; + if (dataTimeList.Contains(record.Time)) + { + packet.RecordList[i] = new Model.SignalRecord(record.Time, err); + } + } + } + + return _dal.Save(projectId, sceneId, dataSet); + } + } } diff --git a/BLL/IStation.BLL.Product/product/product/Product.cs b/BLL/IStation.BLL.Product/product/product/Product.cs index b4cba99..0486596 100644 --- a/BLL/IStation.BLL.Product/product/product/Product.cs +++ b/BLL/IStation.BLL.Product/product/product/Product.cs @@ -23,7 +23,7 @@ { return ProductCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -36,7 +36,7 @@ //根据 Id 更新缓存 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -55,7 +55,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -74,12 +74,12 @@ #endregion - #region Query + #region Get /// <summary> /// 查询全部 /// </summary> - public List<Model.Product> QueryAll(long projectId) + public List<Model.Product> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -88,78 +88,78 @@ /// <summary> /// 根据 Id查询 /// </summary> - public Model.Product QueryById(long projectId, long Id) + public Model.Product GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 根据 Ids 查询 /// </summary> - public List<Model.Product> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.Product> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } /// <summary> /// 根据 Catalog 查询 /// </summary> - public List<Model.Product> QueryByCatalog(long projectId, string catalog) + public List<Model.Product> GetByCatalog(long projectId, string catalog) { if (string.IsNullOrEmpty(catalog)) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.Catalog == catalog).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> /// 根据 BelongType 和 BelongId 查询 /// </summary> - public List<Model.Product> QueryByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.Product> GetByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.BelongType == belongType && x.BelongId == belongId).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> /// 根据 BelongType 和 BelongIds 查询 /// </summary> - public List<Model.Product> QueryByBelongTypeAndBelongIds(long projectId, string belongType, List<long> belongIds) + public List<Model.Product> GetByBelongTypeAndBelongIds(long projectId, string belongType, List<long> belongIds) { if (belongIds == null || belongIds.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.BelongType == belongType && belongIds.Contains(x.BelongId)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> /// 根据 Id 查询所有子项 /// </summary> - public List<Model.Product> QueryChildrenById(long projectId, long Id) + public List<Model.Product> GetChildrenById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.ParentIds.Contains(Id)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> /// 根据 Id获取子项和自身 /// </summary> - public List<Model.Product> QueryChildAndSelfById(long projectId, long Id) + public List<Model.Product> GetChildAndSelfById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => (x.Id == Id) || x.ParentIds.Contains(Id)).OrderBy(x => x.ParentIds.Count).ThenBy(x => x.SortCode).ToList(); } /// <summary> /// 根据 机泵获取子泵 /// </summary> - public Model.Product<Model.Pump> QueryChildPumpByEnginePumpId(long projectId, long enginePumpId) + public Model.Product<Model.Pump> GetChildPumpByEnginePumpId(long projectId, long enginePumpId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); var self = all.Find(x => x.Id == enginePumpId); if (self == null) return default; @@ -175,9 +175,9 @@ /// <summary> /// 根据 机泵获取子电机 /// </summary> - public Model.Product<Model.Motor> QueryChildMotorByEnginePumpId(long projectId, long enginePumpId) + public Model.Product<Model.Motor> GetChildMotorByEnginePumpId(long projectId, long enginePumpId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); var self = all.Find(x => x.Id == enginePumpId); if (self == null) return default; @@ -193,9 +193,9 @@ /// <summary> /// 根据 BelongType 和 BelongId 查询机泵列表 /// </summary> - public List<Model.Product<Model.EnginePump>> QueryEnginePumpListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.Product<Model.EnginePump>> GetEnginePumpListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var all = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); + var all = GetByBelongTypeAndBelongId(projectId, belongType, belongId); var engine_pump_list = all?.Where(x => x.Catalog == IStation.Product.Catalog_JiBeng).OrderBy(x => x.SortCode).ToList(); if (engine_pump_list == null || engine_pump_list.Count < 1) return default; @@ -205,9 +205,9 @@ /// <summary> /// 查询机泵 /// </summary> - public Model.Product<Model.EnginePump> QueryEnginePumpByProductId(long projectId, long ProductId) + public Model.Product<Model.EnginePump> GetEnginePumpByProductId(long projectId, long ProductId) { - var all = this.QueryAll(projectId); + var all = this.GetAll(projectId); var engine_pump = all?.Find(x => x.Catalog == IStation.Product.Catalog_JiBeng && x.Id == ProductId); if (engine_pump == null) return default; @@ -217,9 +217,9 @@ /// <summary> /// 根据 BelongType 和 BelongId 查询泵列表 /// </summary> - public List<Model.Product<Model.Pump>> QueryPumpListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.Product<Model.Pump>> GetPumpListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var all = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); + var all = GetByBelongTypeAndBelongId(projectId, belongType, belongId); var engine_pump_list = all?.Where(x => x.Catalog == IStation.Product.Catalog_Beng).OrderBy(x => x.SortCode).ToList(); if (engine_pump_list == null || engine_pump_list.Count < 1) return default; @@ -229,9 +229,9 @@ /// <summary> /// 根据 ProductId 查询摄像头 /// </summary> - public Model.Product<Model.Camera> QueryCameraByProductId(long projectId, long ProductId) + public Model.Product<Model.Camera> GetCameraByProductId(long projectId, long ProductId) { - var all = this.QueryAll(projectId); + var all = this.GetAll(projectId); var camera = all?.Find(x => x.Catalog == IStation.Product.Catalog_SheXiangTou && x.Id == ProductId); if (camera == null) return default; @@ -241,9 +241,9 @@ /// <summary> /// 根据 BelongType 和 BelongId 查询摄像头列表 /// </summary> - public List<Model.Product<Model.Camera>> QueryCameraListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) + public List<Model.Product<Model.Camera>> GetCameraListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) { - var all = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); + var all = GetByBelongTypeAndBelongId(projectId, belongType, belongId); var cameraList = all?.Where(x => x.Catalog == IStation.Product.Catalog_SheXiangTou).OrderBy(x => x.SortCode).ToList(); if (cameraList == null || cameraList.Count < 1) return default; @@ -343,7 +343,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Product/product/product_group/ProductGroup.cs b/BLL/IStation.BLL.Product/product/product_group/ProductGroup.cs index ed3b2b8..a2453f5 100644 --- a/BLL/IStation.BLL.Product/product/product_group/ProductGroup.cs +++ b/BLL/IStation.BLL.Product/product/product_group/ProductGroup.cs @@ -22,7 +22,7 @@ { return ProductGroupCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -35,7 +35,7 @@ //根据 Id 更新缓存 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -54,7 +54,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -73,12 +73,12 @@ #endregion - #region Query + #region Get /// <summary> /// 查询全部 /// </summary> - public List<Model.ProductGroup> QueryAll(long projectId) + public List<Model.ProductGroup> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -87,20 +87,20 @@ /// <summary> /// 根据 Id查询 /// </summary> - public Model.ProductGroup QueryById(long projectId, long Id) + public Model.ProductGroup GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 根据 Ids 查询 /// </summary> - public List<Model.ProductGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.ProductGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -197,7 +197,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Product/pump_curve/pump_curve/PumpCurve.cs b/BLL/IStation.BLL.Product/pump_curve/pump_curve/PumpCurve.cs index f7bf28a..ce24100 100644 --- a/BLL/IStation.BLL.Product/pump_curve/pump_curve/PumpCurve.cs +++ b/BLL/IStation.BLL.Product/pump_curve/pump_curve/PumpCurve.cs @@ -21,7 +21,7 @@ { return PumpCurveCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 internal void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.PumpCurve> QueryAll(long projectId) + public List<Model.PumpCurve> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.PumpCurve QueryById(long projectId, long Id) + public Model.PumpCurve GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.PumpCurve> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.PumpCurve> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } @@ -107,34 +107,34 @@ /// <summary> /// 鏍规嵁 Pump Id鑾峰彇 /// </summary> - public List<Model.PumpCurve> QueryByPumpId(long projectId, long pumpId) + public List<Model.PumpCurve> GetByPumpId(long projectId, long pumpId) { - var maps = new PumpCurveMapping().QueryByPumpId(projectId, pumpId); + var maps = new PumpCurveMapping().GetByPumpId(projectId, pumpId); if (maps == null || maps.Count() == 0) return null; - return QueryByIds(projectId, maps.Select(x => x.CurveId).ToList()); + return GetByIds(projectId, maps.Select(x => x.CurveId).ToList()); } /// <summary> /// 鏍规嵁 Pump Id鑾峰彇宸ヤ綔鏇茬嚎 /// </summary> - public Model.PumpCurve QueryWorkingByPumpId(long projectId, long pumpId) + public Model.PumpCurve GetWorkingByPumpId(long projectId, long pumpId) { - var maps = new PumpCurveMapping().QueryByPumpId(projectId, pumpId); + var maps = new PumpCurveMapping().GetByPumpId(projectId, pumpId); if (maps == null || maps.Count() == 0) return null; var map = maps.Find(x => x.IsWorking); if (map == null) return null; - return QueryById(projectId, map.CurveId); + return GetById(projectId, map.CurveId); } /// <summary> /// 鏍规嵁 Pump Id鑾峰彇榛樿宸ヤ綔鏇茬嚎(娌℃壘鍒板伐浣滄洸绾匡紝灏遍�夊彇鏈�鍚庝竴鏉�) /// </summary> - public Model.PumpCurve QueryDefaultWorkingByPumpId(long projectId, long pumpId) + public Model.PumpCurve GetDefaultWorkingByPumpId(long projectId, long pumpId) { - var maps = new PumpCurveMapping().QueryByPumpId(projectId, pumpId); + var maps = new PumpCurveMapping().GetByPumpId(projectId, pumpId); if (maps == null || maps.Count() == 0) return null; var map = maps.Find(x => x.IsWorking); @@ -142,7 +142,7 @@ { map = maps.Last(); } - return QueryById(projectId, map.CurveId); + return GetById(projectId, map.CurveId); } #endregion @@ -238,7 +238,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping/PumpCurveMapping.cs b/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping/PumpCurveMapping.cs index 3b12b80..1f09fc1 100644 --- a/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping/PumpCurveMapping.cs +++ b/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping/PumpCurveMapping.cs @@ -21,7 +21,7 @@ { return PumpCurveMappingCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -51,7 +51,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨骞惰繑鍥� public Model.PumpCurveMapping UpdateProjectCacheR(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetProjectCache(projectId); var model = all.Find(x => x.Id == Id); @@ -71,7 +71,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetProjectCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -86,9 +86,9 @@ { if (Ids == null && Ids.Count() < 1) return default; - var entity_list = _dal.QueryByIds(projectId, Ids); + var entity_list = _dal.GetByIds(projectId, Ids); var model_list = Entity2Models(entity_list); - var all = QueryAll(projectId); + var all = GetAll(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); if (model_list != null && model_list.Count > 0) { @@ -122,12 +122,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.PumpCurveMapping> QueryAll(long projectId) + public List<Model.PumpCurveMapping> GetAll(long projectId) { var all = GetProjectCache(projectId); return all.OrderBy(x => x.SortCode).ToList(); @@ -136,49 +136,49 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.PumpCurveMapping QueryById(long projectId, long Id) + public Model.PumpCurveMapping GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.PumpCurveMapping> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.PumpCurveMapping> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } /// <summary> /// 鏍规嵁 PumpId 鏌ヨ /// </summary> - public List<Model.PumpCurveMapping> QueryByPumpId(long projectId, long pumpId) + public List<Model.PumpCurveMapping> GetByPumpId(long projectId, long pumpId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => x.PumpId == pumpId).OrderBy(x => x.SortCode).ToList(); } /// <summary> /// 鏍规嵁 PumpIds 鏌ヨ /// </summary> - public List<Model.PumpCurveMapping> QueryByPumpIds(long projectId, List<long> pumpIds) + public List<Model.PumpCurveMapping> GetByPumpIds(long projectId, List<long> pumpIds) { if (pumpIds == null || pumpIds.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all?.Where(x => pumpIds.Contains(x.PumpId)).OrderBy(x => x.SortCode).ToList(); } /// <summary> /// 鏍规嵁 CurveId 鏌ヨ /// </summary> - public List<Model.PumpCurveMapping> QueryByCurveId(long projectId, long curveId) + public List<Model.PumpCurveMapping> GetByCurveId(long projectId, long curveId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all?.Where(x => x.CurveId == curveId).OrderBy(x => x.SortCode).ToList(); } @@ -186,11 +186,11 @@ /// <summary> /// 鏍规嵁 CurveIds 鏌ヨ /// </summary> - public List<Model.PumpCurveMapping> QueryByCurveIds(long projectId, List<long> CurveIds) + public List<Model.PumpCurveMapping> GetByCurveIds(long projectId, List<long> CurveIds) { if (CurveIds == null || CurveIds.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => CurveIds.Contains(x.CurveId)).OrderBy(x => x.SortCode).ToList(); } @@ -288,7 +288,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } @@ -297,7 +297,7 @@ /// </summary> public bool IsExistByPumpId(long projectId, long pumpId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.PumpId == pumpId); } @@ -306,7 +306,7 @@ /// </summary> public bool IsExistByCurveId(long projectId, long curveId) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.CurveId == curveId); } #endregion @@ -347,7 +347,7 @@ public bool DeleteByCurveId(long projectId, long curveId, out string msg) { msg = string.Empty; - var all = QueryByCurveId(projectId, curveId); + var all = GetByCurveId(projectId, curveId); if (all != null && all.Count > 0) { var ids = all.Select(x => x.Id); diff --git a/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping_ex/PumpCurveExMapping.cs b/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping_ex/PumpCurveExMapping.cs index d6a8e17..22db7bb 100644 --- a/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping_ex/PumpCurveExMapping.cs +++ b/BLL/IStation.BLL.Product/pump_curve/pump_curve_mapping_ex/PumpCurveExMapping.cs @@ -15,17 +15,17 @@ private readonly IDAL.IPumpCurveMapping<Entity.PumpCurveMapping> _dal = DAL.Factory.DataAccess.CreateDAL<IDAL.IPumpCurveMapping<Entity.PumpCurveMapping>>(Settings.DataAccess.ProductDLLName, Settings.DataAccess.DALNameSpace); - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.PumpCurveExMapping> QueryAll(long projectId) + public List<Model.PumpCurveExMapping> GetAll(long projectId) { - var mapping_list = new PumpCurveMapping().QueryAll(projectId); + var mapping_list = new PumpCurveMapping().GetAll(projectId); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).OrderBy(x => x.SortCode).ToList(); @@ -34,12 +34,12 @@ /// <summary> /// 鏍规嵁 MappingID鏌ヨ /// </summary> - public Model.PumpCurveExMapping QueryByMappingId(long projectId, long MappingId) + public Model.PumpCurveExMapping GetByMappingId(long projectId, long MappingId) { - var mapping = new PumpCurveMapping().QueryById(projectId,MappingId); + var mapping = new PumpCurveMapping().GetById(projectId,MappingId); if (mapping == null) return default; - var curve = new PumpCurve().QueryById(projectId,mapping.CurveId); + var curve = new PumpCurve().GetById(projectId,mapping.CurveId); if (curve == null) return default; return new Model.PumpCurveExMapping(curve,mapping); @@ -48,14 +48,14 @@ /// <summary> /// 鏍规嵁 MappingIds鏌ヨ /// </summary> - public List<Model.PumpCurveExMapping> QueryByMappingIds(long projectId, List<long> mappingIds) + public List<Model.PumpCurveExMapping> GetByMappingIds(long projectId, List<long> mappingIds) { if (mappingIds == null || mappingIds.Count() < 1) return default; - var mapping_list = new PumpCurveMapping().QueryByIds(projectId,mappingIds); + var mapping_list = new PumpCurveMapping().GetByIds(projectId,mappingIds); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).OrderBy(x => x.SortCode).ToList(); @@ -64,12 +64,12 @@ /// <summary> /// 鏍规嵁 PumpId鏌ヨ /// </summary> - public List<Model.PumpCurveExMapping> QueryByPumpId(long projectId, long pumpId) + public List<Model.PumpCurveExMapping> GetByPumpId(long projectId, long pumpId) { - var mapping_list = new PumpCurveMapping().QueryByPumpId(projectId,pumpId); + var mapping_list = new PumpCurveMapping().GetByPumpId(projectId,pumpId); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId,mapping_list.Select(x=>x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId,mapping_list.Select(x=>x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).OrderBy(x => x.SortCode).ToList(); @@ -78,14 +78,14 @@ /// <summary> /// 鏍规嵁 pumpIds 鏌ヨ /// </summary> - public List<Model.PumpCurveExMapping> QueryByPumpIds(long projectId, List<long> pumpIds) + public List<Model.PumpCurveExMapping> GetByPumpIds(long projectId, List<long> pumpIds) { if (pumpIds == null || pumpIds.Count() < 1) return default; - var mapping_list = new PumpCurveMapping().QueryByPumpIds(projectId, pumpIds); + var mapping_list = new PumpCurveMapping().GetByPumpIds(projectId, pumpIds); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).OrderBy(x => x.SortCode).ToList(); @@ -94,12 +94,12 @@ /// <summary> /// 鏍规嵁 CurveID 鏌ヨ /// </summary> - public List<Model.PumpCurveExMapping> QueryByCurveId(long projectId, long curveId) + public List<Model.PumpCurveExMapping> GetByCurveId(long projectId, long curveId) { - var mapping_list = new PumpCurveMapping().QueryByCurveId(projectId, curveId); + var mapping_list = new PumpCurveMapping().GetByCurveId(projectId, curveId); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).ToList(); @@ -108,14 +108,14 @@ /// <summary> /// 鏍规嵁 CurveIds 鏌ヨ /// </summary> - public List<Model.PumpCurveExMapping> QueryByCurveIds(long projectId, List<long> CurveIds) + public List<Model.PumpCurveExMapping> GetByCurveIds(long projectId, List<long> CurveIds) { if (CurveIds == null || CurveIds.Count() < 1) return default; - var mapping_list = new PumpCurveMapping().QueryByCurveIds(projectId, CurveIds); + var mapping_list = new PumpCurveMapping().GetByCurveIds(projectId, CurveIds); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; return (from x in mapping_list join y in curve_list on x.CurveId equals y.Id select new Model.PumpCurveExMapping(y, x)).OrderBy(x => x.SortCode).ToList(); @@ -124,13 +124,13 @@ /// <summary> /// 鏍规嵁 PumpID 鏌ヨ宸ヤ綔鏇茬嚎 /// </summary> - public Model.PumpCurveExMapping QueryWorkingByPumpId(long projectId, long PumpID) + public Model.PumpCurveExMapping GetWorkingByPumpId(long projectId, long PumpID) { - var mapping_list = new PumpCurveMapping().QueryByPumpId(projectId,PumpID); + var mapping_list = new PumpCurveMapping().GetByPumpId(projectId,PumpID); var mapping = mapping_list?.Find(x => x.IsWorking); if (mapping == null) return default; - var curve = new PumpCurve().QueryById(projectId,mapping.CurveId); + var curve = new PumpCurve().GetById(projectId,mapping.CurveId); if (curve == null) return default; return new Model.PumpCurveExMapping(curve,mapping); @@ -139,9 +139,9 @@ /// <summary> /// 鏍规嵁 PumpID 鏌ヨ榛樿宸ヤ綔鏇茬嚎 /// </summary> - public Model.PumpCurveExMapping QueryDefaultWorkingByPumpId(long projectId, long pumpId) + public Model.PumpCurveExMapping GetDefaultWorkingByPumpId(long projectId, long pumpId) { - var mapping_list = new PumpCurveMapping().QueryByPumpId(projectId, pumpId); + var mapping_list = new PumpCurveMapping().GetByPumpId(projectId, pumpId); var mapping = mapping_list?.Find(x => x.IsWorking); if (mapping == null) { @@ -149,7 +149,7 @@ } if (mapping == null) return default; - var curve = new PumpCurve().QueryById(projectId, mapping.CurveId); + var curve = new PumpCurve().GetById(projectId, mapping.CurveId); if (curve == null) return default; return new Model.PumpCurveExMapping(curve, mapping); @@ -158,14 +158,14 @@ /// <summary> /// 鏍规嵁 pumpIds 鏌ヨ宸ヤ綔鏇茬嚎 /// </summary> - public List<Model.PumpCurveExMapping> QueryWorkingByPumpIds(long projectId, List<long> pumpIds) + public List<Model.PumpCurveExMapping> GetWorkingByPumpIds(long projectId, List<long> pumpIds) { if (pumpIds == null || pumpIds.Count() < 1) return default; - var mapping_list = new PumpCurveMapping().QueryByPumpIds(projectId,pumpIds); + var mapping_list = new PumpCurveMapping().GetByPumpIds(projectId,pumpIds); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId,mapping_list.Select(x=>x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId,mapping_list.Select(x=>x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; var vm_list = new List<Model.PumpCurveExMapping>(); @@ -187,14 +187,14 @@ /// <summary> /// 鏍规嵁 pumpIds 鏌ヨ榛樿宸ヤ綔鏇茬嚎 /// </summary> - public List<Model.PumpCurveExMapping> QueryDefaultWorkingByPumpIds(long projectId, List<long> pumpIds) + public List<Model.PumpCurveExMapping> GetDefaultWorkingByPumpIds(long projectId, List<long> pumpIds) { if (pumpIds == null || pumpIds.Count() < 1) return default; - var mapping_list = new PumpCurveMapping().QueryByPumpIds(projectId, pumpIds); + var mapping_list = new PumpCurveMapping().GetByPumpIds(projectId, pumpIds); if (mapping_list == null || mapping_list.Count < 1) return default; - var curve_list = new PumpCurve().QueryByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); + var curve_list = new PumpCurve().GetByIds(projectId, mapping_list.Select(x => x.CurveId).ToList()); if (curve_list == null || curve_list.Count < 1) return default; var vm_list = new List<Model.PumpCurveExMapping>(); diff --git a/BLL/IStation.BLL.Project/project/Project.cs b/BLL/IStation.BLL.Project/project/Project.cs index d6dc364..74763a9 100644 --- a/BLL/IStation.BLL.Project/project/Project.cs +++ b/BLL/IStation.BLL.Project/project/Project.cs @@ -22,7 +22,7 @@ { return ProjectCacheHelper.GetSet(() => { - var entities = _dal.QueryAll(); + var entities = _dal.GetAll(); var models = Entity2Models(entities); if (models == null) { @@ -35,7 +35,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateProjectCache( long Id) { - var entity_ds = _dal.QueryById(Id); + var entity_ds = _dal.GetById(Id); var model_ds = Entity2Model(entity_ds); var all = GetCache(); var model = all.Find(x => x.Id == Id); @@ -54,7 +54,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(Ids); + var entities = _dal.GetByIds(Ids); var models = Entity2Models(entities); var all = GetCache(); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -73,12 +73,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.Project> QueryAll() + public List<Model.Project> GetAll() { var all = GetCache(); return all.ToList(); @@ -87,20 +87,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.Project QueryById( long Id) + public Model.Project GetById( long Id) { - var all = QueryAll(); + var all = GetAll(); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.Project> QueryByIds( IEnumerable<long> Ids) + public List<Model.Project> GetByIds( IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(); + var all = GetAll(); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -190,7 +190,7 @@ /// </summary> public bool IsExistById( long Id) { - var all = QueryAll(); + var all = GetAll(); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Scene/analyze_scheme/AnalyzeScheme.cs b/BLL/IStation.BLL.Scene/analyze_scheme/AnalyzeScheme.cs index 60633f4..f4e57a3 100644 --- a/BLL/IStation.BLL.Scene/analyze_scheme/AnalyzeScheme.cs +++ b/BLL/IStation.BLL.Scene/analyze_scheme/AnalyzeScheme.cs @@ -21,7 +21,7 @@ { return AnalyzeSchemeCacheHelper.GetSet(projectId,sceneId, () => { - var entities = _dal.QueryAll(projectId,sceneId); + var entities = _dal.GetAll(projectId,sceneId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateSceneCache(long projectId,long sceneId, long Id) { - var entity_ds = _dal.QueryById(projectId,sceneId, Id); + var entity_ds = _dal.GetById(projectId,sceneId, Id); var model_ds = Entity2Model(entity_ds); var all = GetSceneCache(projectId, sceneId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId,sceneId, Ids); + var entities = _dal.GetByIds(projectId,sceneId, Ids); var models = Entity2Models(entities); var all = GetSceneCache(projectId, sceneId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.AnalyzeScheme> QueryAll(long projectId, long sceneId) + public List<Model.AnalyzeScheme> GetAll(long projectId, long sceneId) { var all = GetSceneCache(projectId, sceneId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.AnalyzeScheme QueryById(long projectId,long sceneId, long Id) + public Model.AnalyzeScheme GetById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.AnalyzeScheme> QueryByIds(long projectId,long sceneId, IEnumerable<long> Ids) + public List<Model.AnalyzeScheme> GetByIds(long projectId,long sceneId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Scene/analyze_structure/AnalyzeStructure.cs b/BLL/IStation.BLL.Scene/analyze_structure/AnalyzeStructure.cs index 9a60614..b65574f 100644 --- a/BLL/IStation.BLL.Scene/analyze_structure/AnalyzeStructure.cs +++ b/BLL/IStation.BLL.Scene/analyze_structure/AnalyzeStructure.cs @@ -21,7 +21,7 @@ { return AnalyzeStructureCacheHelper.GetSet(projectId,sceneId, () => { - var entities = _dal.QueryAll(projectId,sceneId); + var entities = _dal.GetAll(projectId,sceneId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateSceneCache(long projectId,long sceneId, long Id) { - var entity_ds = _dal.QueryById(projectId,sceneId, Id); + var entity_ds = _dal.GetById(projectId,sceneId, Id); var model_ds = Entity2Model(entity_ds); var all = GetSceneCache(projectId, sceneId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId,sceneId, Ids); + var entities = _dal.GetByIds(projectId,sceneId, Ids); var models = Entity2Models(entities); var all = GetSceneCache(projectId, sceneId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.AnalyzeStructure> QueryAll(long projectId, long sceneId) + public List<Model.AnalyzeStructure> GetAll(long projectId, long sceneId) { var all = GetSceneCache(projectId, sceneId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.AnalyzeStructure QueryById(long projectId,long sceneId, long Id) + public Model.AnalyzeStructure GetById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.AnalyzeStructure> QueryByIds(long projectId,long sceneId, IEnumerable<long> Ids) + public List<Model.AnalyzeStructure> GetByIds(long projectId,long sceneId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/BLL/IStation.BLL.Scene/analyze_structure_mapping/AnalyzeStructureMapping.cs b/BLL/IStation.BLL.Scene/analyze_structure_mapping/AnalyzeStructureMapping.cs index dc21c8c..cdc75e5 100644 --- a/BLL/IStation.BLL.Scene/analyze_structure_mapping/AnalyzeStructureMapping.cs +++ b/BLL/IStation.BLL.Scene/analyze_structure_mapping/AnalyzeStructureMapping.cs @@ -21,7 +21,7 @@ { return AnalyzeStructureMappingCacheHelper.GetSet(projectId,sceneId, () => { - var entities = _dal.QueryAll(projectId,sceneId); + var entities = _dal.GetAll(projectId,sceneId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateSceneCache(long projectId,long sceneId, long Id) { - var entity_ds = _dal.QueryById(projectId,sceneId, Id); + var entity_ds = _dal.GetById(projectId,sceneId, Id); var model_ds = Entity2Model(entity_ds); var all = GetSceneCache(projectId, sceneId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId,sceneId, Ids); + var entities = _dal.GetByIds(projectId,sceneId, Ids); var models = Entity2Models(entities); var all = GetSceneCache(projectId, sceneId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -81,12 +81,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.AnalyzeStructureMapping> QueryAll(long projectId, long sceneId) + public List<Model.AnalyzeStructureMapping> GetAll(long projectId, long sceneId) { var all = GetSceneCache(projectId, sceneId); return all.ToList(); @@ -95,20 +95,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.AnalyzeStructureMapping QueryById(long projectId,long sceneId, long Id) + public Model.AnalyzeStructureMapping GetById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.AnalyzeStructureMapping> QueryByIds(long projectId,long sceneId, IEnumerable<long> Ids) + public List<Model.AnalyzeStructureMapping> GetByIds(long projectId,long sceneId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } @@ -116,9 +116,9 @@ /// <summary> /// 鏍规嵁 AnalyzeStructureId 鏌ヨ /// </summary> - public List<Model.AnalyzeStructureMapping> QueryByAnalyzeStructureId(long projectId, long sceneId, long analyzeStructureId) + public List<Model.AnalyzeStructureMapping> GetByAnalyzeStructureId(long projectId, long sceneId, long analyzeStructureId) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); return all.Where(x => x.AnalyzeStructureId== analyzeStructureId).ToList(); } @@ -216,7 +216,7 @@ /// </summary> public bool IsExistById(long projectId,long sceneId, long Id) { - var all = QueryAll(projectId,sceneId); + var all = GetAll(projectId,sceneId); return all.Exists(x => x.Id == Id); } #endregion @@ -257,7 +257,7 @@ public bool DeleteByAnalyzeStructureId(long projectId, long sceneId, long analyzeStructureId, out string msg) { msg = string.Empty; - var all = QueryByAnalyzeStructureId(projectId, sceneId, analyzeStructureId); + var all = GetByAnalyzeStructureId(projectId, sceneId, analyzeStructureId); if (all != null && all.Count > 0) { var ids = all.Select(x => x.Id); diff --git a/BLL/IStation.BLL.Scene/scene/Scene.cs b/BLL/IStation.BLL.Scene/scene/Scene.cs index 7ba1322..3c52655 100644 --- a/BLL/IStation.BLL.Scene/scene/Scene.cs +++ b/BLL/IStation.BLL.Scene/scene/Scene.cs @@ -21,7 +21,7 @@ { return SceneCacheHelper.GetSet(projectId, () => { - var entities = _dal.QueryAll(projectId); + var entities = _dal.GetAll(projectId); var models = Entity2Models(entities); if (models == null) { @@ -34,7 +34,7 @@ //鏍规嵁 Id 鏇存柊缂撳瓨 private void UpdateSceneCache(long projectId, long Id) { - var entity_ds = _dal.QueryById(projectId, Id); + var entity_ds = _dal.GetById(projectId, Id); var model_ds = Entity2Model(entity_ds); var all = GetSceneCache(projectId); var model = all.Find(x => x.Id == Id); @@ -53,7 +53,7 @@ { if (Ids == null || Ids.Count() < 1) return; - var entities = _dal.QueryByIds(projectId, Ids); + var entities = _dal.GetByIds(projectId, Ids); var models = Entity2Models(entities); var all = GetSceneCache(projectId); all.RemoveAll(x => Ids.Contains(x.Id)); @@ -72,12 +72,12 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.Scene> QueryAll(long projectId) + public List<Model.Scene> GetAll(long projectId) { var all = GetSceneCache(projectId); return all.ToList(); @@ -86,20 +86,20 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.Scene QueryById(long projectId, long Id) + public Model.Scene GetById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Find(x => x.Id == Id); } /// <summary> /// 鏍规嵁 Ids 鏌ヨ /// </summary> - public List<Model.Scene> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Model.Scene> GetByIds(long projectId, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Where(x => Ids.Contains(x.Id)).ToList(); } #endregion @@ -196,7 +196,7 @@ /// </summary> public bool IsExistById(long projectId, long Id) { - var all = QueryAll(projectId); + var all = GetAll(projectId); return all.Exists(x => x.Id == Id); } #endregion diff --git a/DAL/IDAL/IStation.IDAL.Core/base/IBaseDAL.cs b/DAL/IDAL/IStation.IDAL.Core/base/IBaseDAL.cs index 697c32c..d308eec 100644 --- a/DAL/IDAL/IStation.IDAL.Core/base/IBaseDAL.cs +++ b/DAL/IDAL/IStation.IDAL.Core/base/IBaseDAL.cs @@ -8,22 +8,22 @@ { public interface IBaseDAL<T> where T : Entity.BaseEntity, new() { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - List<T> QueryAll(); + List<T> GetAll(); /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - T QueryById(long Id); + T GetById(long Id); /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - List<T> QueryByIds(IEnumerable<long> Ids); + List<T> GetByIds(IEnumerable<long> Ids); #endregion diff --git a/DAL/IDAL/IStation.IDAL.Core/project/IProjectDAL.cs b/DAL/IDAL/IStation.IDAL.Core/project/IProjectDAL.cs index b242d97..650536f 100644 --- a/DAL/IDAL/IStation.IDAL.Core/project/IProjectDAL.cs +++ b/DAL/IDAL/IStation.IDAL.Core/project/IProjectDAL.cs @@ -8,22 +8,22 @@ { public interface IProjectDAL<T> where T : Entity.BaseEntity, new() { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - List<T> QueryAll(long projectId); + List<T> GetAll(long projectId); /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - T QueryById(long projectId, long Id); + T GetById(long projectId, long Id); /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - List<T> QueryByIds(long projectId, IEnumerable<long> Ids); + List<T> GetByIds(long projectId, IEnumerable<long> Ids); #endregion diff --git a/DAL/IDAL/IStation.IDAL.Core/scene/ISceneBaseDAL.cs b/DAL/IDAL/IStation.IDAL.Core/scene/ISceneBaseDAL.cs index 60f028a..12a3330 100644 --- a/DAL/IDAL/IStation.IDAL.Core/scene/ISceneBaseDAL.cs +++ b/DAL/IDAL/IStation.IDAL.Core/scene/ISceneBaseDAL.cs @@ -8,22 +8,22 @@ { public interface ISceneBaseDAL<T> where T : Entity.BaseEntity, new() { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - List<T> QueryAll(long projectId,long sceneId); + List<T> GetAll(long projectId,long sceneId); /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - T QueryById(long projectId, long sceneId, long Id); + T GetById(long projectId, long sceneId, long Id); /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - List<T> QueryByIds(long projectId, long sceneId, IEnumerable<long> Ids); + List<T> GetByIds(long projectId, long sceneId, IEnumerable<long> Ids); #endregion diff --git a/DAL/IDAL/IStation.IDAL.Monitor/monitor_point/IMonitorPointMapping.cs b/DAL/IDAL/IStation.IDAL.Monitor/monitor_point/IMonitorPointMapping.cs index 2ec6da5..312fee2 100644 --- a/DAL/IDAL/IStation.IDAL.Monitor/monitor_point/IMonitorPointMapping.cs +++ b/DAL/IDAL/IStation.IDAL.Monitor/monitor_point/IMonitorPointMapping.cs @@ -14,17 +14,17 @@ public interface IMonitorPointMapping<T> : IProjectDAL_Cover<T> where T : Entity.MonitorPointMapping, new() { - #region Query + #region Get /// <summary> /// 鏍规嵁 MonitorPointId 鏌ヨ /// </summary> - List<T> QueryByMonitorPointId(long projectId, long monitorPointId); + List<T> GetByMonitorPointId(long projectId, long monitorPointId); /// <summary> /// 鏍规嵁 ObjectType 鍜� ObjectId 鏌ヨ /// </summary> - List<T> QueryByObjectTypeAndObjectId(long projectId, string objectType, long objectId); + List<T> GetByObjectTypeAndObjectId(long projectId, string objectType, long objectId); /// <summary> /// 鏍规嵁 ObjectType 鍜� ObjectIds 鏌ヨ diff --git a/DAL/IDAL/IStation.IDAL.MonitorDataSet/monitor_data_set/IMonitorDataSet.cs b/DAL/IDAL/IStation.IDAL.MonitorDataSet/monitor_data_set/IMonitorDataSet.cs index 857468e..aa72785 100644 --- a/DAL/IDAL/IStation.IDAL.MonitorDataSet/monitor_data_set/IMonitorDataSet.cs +++ b/DAL/IDAL/IStation.IDAL.MonitorDataSet/monitor_data_set/IMonitorDataSet.cs @@ -19,37 +19,37 @@ /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId); + List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId); /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId); + List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId, long monitorPointId); /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - Model.MonitorDataSet QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month); + Model.MonitorDataSet GetMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month); /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId); + Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId); /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month); + Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month); /// <summary> /// 鏌ヨ淇″彿璁板綍 /// </summary> - List<Model.SignalRecord> QuerySignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month); + List<Model.SignalRecord> GetSignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month); /// <summary> diff --git a/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileIdHelper.cs b/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileIdHelper.cs index 136c05e..af37115 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileIdHelper.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileIdHelper.cs @@ -12,12 +12,12 @@ /// </summary> public class FileIdHelper<T> where T : Entity.BaseEntity { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public static List<T> QueryAll(string path) + public static List<T> GetAll(string path) { if (string.IsNullOrEmpty(path)) return default; @@ -29,9 +29,9 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public static T QueryById(string path, long Id) + public static T GetById(string path, long Id) { - var list = QueryAll(path); + var list = GetAll(path); if (list == null || list.Count < 1) return default; return list.Find(t => t.Id == Id); @@ -40,20 +40,20 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public static IEnumerable<T> QueryByIds(string path, IEnumerable<long> Ids) + public static IEnumerable<T> GetByIds(string path, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var list = QueryAll(path); + var list = GetAll(path); return list?.Where(x => Ids.Contains(x.Id)); } /// <summary> /// 鏌ヨ鏈�杩戜竴鏉� /// </summary> - public static T QueryLatest(string path) + public static T GetLatest(string path) { - var list = QueryAll(path); + var list = GetAll(path); if (list == null || list.Count < 1) return default; return list.Last(); @@ -419,7 +419,7 @@ var fileName = FileHelper.GetFilePath<T>(path); if (!File.Exists(fileName)) return false; - var all = QueryAll(path); + var all = GetAll(path); if (all == null || all.Count < 1) return false; return true; diff --git a/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileSrcHelper.cs b/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileSrcHelper.cs index bf18bab..1ab7346 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileSrcHelper.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Core/helpers/FileSrcHelper.cs @@ -10,7 +10,7 @@ public class FileSrcHelper<T> where T : class, new() { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/elec_price/ElecPrice.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/elec_price/ElecPrice.cs index 845fba4..09d13bf 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Logic/elec_price/ElecPrice.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Logic/elec_price/ElecPrice.cs @@ -24,17 +24,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.ElecPrice> QueryAll(long projectId) + public List<Entity.ElecPrice> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.ElecPrice>.QueryAll(path); + var all = FileIdHelper<Entity.ElecPrice>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -42,13 +42,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.ElecPrice QueryById(long projectId, long Id) + public Entity.ElecPrice GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -56,13 +56,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.ElecPrice> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.ElecPrice> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_area/LogicArea.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_area/LogicArea.cs index 9f95c42..ec74cdc 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_area/LogicArea.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_area/LogicArea.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.LogicArea> QueryAll(long projectId) + public List<Entity.LogicArea> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.LogicArea>.QueryAll(path); + var all = FileIdHelper<Entity.LogicArea>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.LogicArea QueryById(long projectId, long Id) + public Entity.LogicArea GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.LogicArea> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.LogicArea> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_catalog/LogicCatalog.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_catalog/LogicCatalog.cs index 1c4993b..fc1a1da 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_catalog/LogicCatalog.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_catalog/LogicCatalog.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.LogicCatalog> QueryAll(long projectId) + public List<Entity.LogicCatalog> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.LogicCatalog>.QueryAll(path); + var all = FileIdHelper<Entity.LogicCatalog>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.LogicCatalog QueryById(long projectId, long Id) + public Entity.LogicCatalog GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.LogicCatalog> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.LogicCatalog> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs index 1fc1650..88cc052 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Logic/logic_tree/LogicTree.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.LogicTree> QueryAll(long projectId) + public List<Entity.LogicTree> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.LogicTree>.QueryAll(path); + var all = FileIdHelper<Entity.LogicTree>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.LogicTree QueryById(long projectId, long Id) + public Entity.LogicTree GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.LogicTree> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.LogicTree> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Logic/station/Station.cs b/DAL/Local/IStation.DAL.LocalFile.Logic/station/Station.cs index 2805c0f..c61b2b0 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Logic/station/Station.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Logic/station/Station.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.Station> QueryAll(long projectId) + public List<Entity.Station> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.Station>.QueryAll(path); + var all = FileIdHelper<Entity.Station>.GetAll(path); var entities= all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.Station QueryById(long projectId, long Id) + public Entity.Station GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.Station> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.Station> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPoint.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPoint.cs index 3b54687..8e3af18 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPoint.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPoint.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.MonitorPoint> QueryAll(long projectId) + public List<Entity.MonitorPoint> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.MonitorPoint>.QueryAll(path); + var all = FileIdHelper<Entity.MonitorPoint>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.MonitorPoint QueryById(long projectId, long Id) + public Entity.MonitorPoint GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.MonitorPoint> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.MonitorPoint> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointGroup.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointGroup.cs index acf578f..195748e 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointGroup.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointGroup.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.MonitorPointGroup> QueryAll(long projectId) + public List<Entity.MonitorPointGroup> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.MonitorPointGroup>.QueryAll(path); + var all = FileIdHelper<Entity.MonitorPointGroup>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.MonitorPointGroup QueryById(long projectId, long Id) + public Entity.MonitorPointGroup GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.MonitorPointGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.MonitorPointGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointMapping.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointMapping.cs index f03dcf2..b49dd8a 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointMapping.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/MonitorPointMapping.cs @@ -27,17 +27,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.MonitorPointMapping> QueryAll(long projectId) + public List<Entity.MonitorPointMapping> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.MonitorPointMapping>.QueryAll(path); + var all = FileIdHelper<Entity.MonitorPointMapping>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -45,13 +45,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.MonitorPointMapping QueryById(long projectId, long Id) + public Entity.MonitorPointMapping GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -59,13 +59,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.MonitorPointMapping> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.MonitorPointMapping> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } @@ -73,13 +73,13 @@ /// <summary> /// 鏍规嵁 MonitorPointId 鏌ヨ /// </summary> - public List<Entity.MonitorPointMapping> QueryByMonitorPointId(long projectId, long monitorPointId) + public List<Entity.MonitorPointMapping> GetByMonitorPointId(long projectId, long monitorPointId) { if (projectId < 1) return default; if (monitorPointId < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => x.MonitorPointId == monitorPointId).ToList(); return entities; } @@ -87,13 +87,13 @@ /// <summary> ///鏍规嵁 ObjectType 鍜� ObjectId 鏌ヨ /// </summary> - public List<Entity.MonitorPointMapping> QueryByObjectTypeAndObjectId(long projectId, string objectType, long objectId) + public List<Entity.MonitorPointMapping> GetByObjectTypeAndObjectId(long projectId, string objectType, long objectId) { if (projectId < 1) return default; if (objectId < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => x.ObjectType == objectType && x.ObjectId == objectId).ToList(); return entities; } @@ -107,7 +107,7 @@ return default; if (objectIds == null || objectIds.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => x.ObjectType == objectType && objectIds.Contains(x.ObjectId)).ToList(); return entities; } @@ -125,7 +125,7 @@ { return DeleteByObjectTypeAndObjectId(projectId, objectType, objectId); } - var all = QueryAll(projectId); + var all = GetAll(projectId); if (all == null) all = new List<Entity.MonitorPointMapping>(); all.RemoveAll(x => x.ObjectType == objectType && x.ObjectId == objectId); @@ -312,7 +312,7 @@ if (monitorPointId < 0) return default; var path = GetFolderPath(projectId); - var list = QueryByMonitorPointId(projectId, monitorPointId); + var list = GetByMonitorPointId(projectId, monitorPointId); if (list != null && list.Count > 0) { var Ids = list.Select(x => x.Id); @@ -331,7 +331,7 @@ if (objectId < 0) return default; var path = GetFolderPath(projectId); - var list = QueryByObjectTypeAndObjectId(projectId, objectType, objectId); + var list = GetByObjectTypeAndObjectId(projectId, objectType, objectId); if (list != null && list.Count > 0) { var Ids = list.Select(x => x.Id); diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/Signal.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/Signal.cs index 5c65f77..57212c8 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/Signal.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/monitor_point/Signal.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.Signal> QueryAll(long projectId) + public List<Entity.Signal> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.Signal>.QueryAll(path); + var all = FileIdHelper<Entity.Signal>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.Signal QueryById(long projectId, long Id) + public Entity.Signal GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.Signal> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.Signal> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalType.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalType.cs index d72e4e1..fb30756 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalType.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalType.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.SignalType> QueryAll(long projectId) + public List<Entity.SignalType> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.SignalType>.QueryAll(path); + var all = FileIdHelper<Entity.SignalType>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.SignalType QueryById(long projectId, long Id) + public Entity.SignalType GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.SignalType> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.SignalType> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalTypeGroup.cs b/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalTypeGroup.cs index b6b590f..2fd0fc3 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalTypeGroup.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Monitor/signal_type/SignalTypeGroup.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.SignalTypeGroup> QueryAll(long projectId) + public List<Entity.SignalTypeGroup> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.SignalTypeGroup>.QueryAll(path); + var all = FileIdHelper<Entity.SignalTypeGroup>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.SignalTypeGroup QueryById(long projectId, long Id) + public Entity.SignalTypeGroup GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.SignalTypeGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.SignalTypeGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set/MonitorMonthlyDataSet.cs b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set/MonitorMonthlyDataSet.cs index e9c1419..e367318 100644 --- a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set/MonitorMonthlyDataSet.cs +++ b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set/MonitorMonthlyDataSet.cs @@ -50,14 +50,14 @@ #endregion - #region Query + #region Get #region MonitorDataSet /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId) + public List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId) { if (projectId < 1) return default; @@ -69,7 +69,7 @@ if (dateFolderInfos == null || dateFolderInfos.Count() < 1) return default; - var MonitorDataSetCount = _monitorDataSetSummary.QueryMonitorDataSetCount(projectId, sceneId); + var MonitorDataSetCount = _monitorDataSetSummary.GetMonitorDataSetCount(projectId, sceneId); var MonitorDataSetList = new List<Model.MonitorDataSet>(MonitorDataSetCount); foreach (var dateFolderInfo in dateFolderInfos) { @@ -82,7 +82,7 @@ var monitorPointId = montiorDataSetFolderInfo.MonitorPointId; var year = montiorDataSetFolderInfo.Year; var month = montiorDataSetFolderInfo.Month; - var MonitorDataSet = QueryMonitorDataSet(projectId, sceneId, monitorPointId, year, month); + var MonitorDataSet = GetMonitorDataSet(projectId, sceneId, monitorPointId, year, month); if (MonitorDataSet != null) MonitorDataSetList.Add(MonitorDataSet); } @@ -93,7 +93,7 @@ /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public List<Model.MonitorDataSet> QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId) + public List<Model.MonitorDataSet> GetMonitorDataSet(long projectId, long sceneId, long monitorPointId) { if (projectId < 1) return default; @@ -118,7 +118,7 @@ continue; var year = montiorDataSetFolderInfo.Year; var month = montiorDataSetFolderInfo.Month; - var MonitorDataSet = QueryMonitorDataSet(projectId, sceneId, monitorPointId, year, month); + var MonitorDataSet = GetMonitorDataSet(projectId, sceneId, monitorPointId, year, month); if (MonitorDataSet != null) MonitorDataSetList.Add(MonitorDataSet); } @@ -129,7 +129,7 @@ /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆� /// </summary> - public Model.MonitorDataSet QueryMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month) + public Model.MonitorDataSet GetMonitorDataSet(long projectId, long sceneId, long monitorPointId, int year, int month) { if (projectId < 1) return default; @@ -143,7 +143,7 @@ if (signalRecordPacketFileInfos == null || signalRecordPacketFileInfos.Count < 1) return default; - var signalRecordPacketCount = _monitorDataSetSummary.QuerySignalRecordPacketCount(projectId, sceneId, monitorPointId, year, month); + var signalRecordPacketCount = _monitorDataSetSummary.GetSignalRecordPacketCount(projectId, sceneId, monitorPointId, year, month); if (signalRecordPacketCount < 1) return default; @@ -156,7 +156,7 @@ foreach (var signalRecordFile in signalRecordPacketFileInfos) { var signalId = signalRecordFile.SignalId; - var signalRecordPacket = QuerySignalRecordPacket(projectId, sceneId, monitorPointId, signalId, year, month); + var signalRecordPacket = GetSignalRecordPacket(projectId, sceneId, monitorPointId, signalId, year, month); if (signalRecordPacket != null) { MonitorDataSet.PacketList.Add(signalRecordPacket); @@ -173,7 +173,7 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - public Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId) + public Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId) { if (projectId < 1) return default; @@ -189,7 +189,7 @@ if (dateFolderInfos == null || dateFolderInfos.Count() < 1) return default; - var signalRecordCount = _monitorDataSetSummary.QuerySignalRecordCount(projectId, sceneId, monitorPointId, signalId); + var signalRecordCount = _monitorDataSetSummary.GetSignalRecordCount(projectId, sceneId, monitorPointId, signalId); if (signalRecordCount < 1) return default; @@ -221,7 +221,7 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍鍖� /// </summary> - public Model.SignalRecordPacket QuerySignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public Model.SignalRecordPacket GetSignalRecordPacket(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { if (projectId < 1) return default; @@ -235,7 +235,7 @@ var valid = this.GetSignalRecordPacketFile(projectId, sceneId, monitorPointId, signalId, year, month, out string filePath); if (!valid) return default; - var signalRecordCount = _monitorDataSetSummary.QuerySignalRecordCount(projectId, sceneId, monitorPointId, signalId, year, month); + var signalRecordCount = _monitorDataSetSummary.GetSignalRecordCount(projectId, sceneId, monitorPointId, signalId, year, month); if (signalRecordCount < 1) return default; @@ -263,7 +263,7 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍 /// </summary> - public List<Model.SignalRecord> QuerySignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public List<Model.SignalRecord> GetSignalRecord(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { if (projectId < 1) return default; @@ -277,7 +277,7 @@ var valid = this.GetSignalRecordPacketFile(projectId, sceneId, monitorPointId, signalId, year, month, out string filePath); if (!valid) return default; - var signalRecordCount = _monitorDataSetSummary.QuerySignalRecordCount(projectId, sceneId, monitorPointId, signalId, year, month); + var signalRecordCount = _monitorDataSetSummary.GetSignalRecordCount(projectId, sceneId, monitorPointId, signalId, year, month); if (signalRecordCount < 1) return default; @@ -380,6 +380,7 @@ var model = new Model.MonitorDataSetSummary(); model.MonitorPointId = monitorPointId; + model.SignalId = signalId; model.Year = year; model.Month = month; model.MinTime = signalRecords.Min(x => x.Time); diff --git a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummary.cs b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummary.cs index 773f31f..5d30573 100644 --- a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummary.cs +++ b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummary.cs @@ -24,19 +24,19 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.MonitorDataSetSummary> QueryAll(long projectId, long sceneId) + public List<Model.MonitorDataSetSummary> GetAll(long projectId, long sceneId) { if (projectId < 1) return default; if (sceneId < 0) return default; var path = GetFolderPath(projectId, sceneId); - var all = MonitorDataSetSummaryHelper.QueryAll(path); + var all = MonitorDataSetSummaryHelper.GetAll(path); var models = all?.ToList(); return models; } @@ -44,13 +44,13 @@ /// <summary> /// 鏍规嵁 鏃ユ湡鏌ヨ鍏ㄩ儴 /// </summary> - public List<Model.MonitorDataSetSummary> QueryAllByDate(long projectId, long sceneId, int year, int month) + public List<Model.MonitorDataSetSummary> GetAllByDate(long projectId, long sceneId, int year, int month) { if (projectId < 1) return default; if (sceneId < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var models = all?.Where(x => x.Year == year && x.Month == month).ToList(); return models; } @@ -58,13 +58,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Model.MonitorDataSetSummary QueryById(long projectId, long sceneId, long Id) + public Model.MonitorDataSetSummary GetById(long projectId, long sceneId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var models = all?.ToList(); return models?.Find(t => t.Id == Id); } @@ -72,13 +72,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Model.MonitorDataSetSummary> QueryByIds(long projectId, long sceneId, IEnumerable<long> Ids) + public List<Model.MonitorDataSetSummary> GetByIds(long projectId, long sceneId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var models = all?.Where(x => Ids.Contains(x.Id)).ToList(); return models; } @@ -86,7 +86,7 @@ /// <summary> /// 鏍规嵁 鐩戞祴鐐逛俊鎭煡璇� /// </summary> - public List<Model.MonitorDataSetSummary> QueryByMonitor(long projectId, long sceneId, long monitorPointId) + public List<Model.MonitorDataSetSummary> GetByMonitor(long projectId, long sceneId, long monitorPointId) { if (projectId < 1) return default; @@ -94,7 +94,7 @@ return default; if (monitorPointId < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); if (all == null || all.Count < 1) return default; var models = all.FindAll(t => t.MonitorPointId == monitorPointId); @@ -104,7 +104,7 @@ /// <summary> /// 鏍规嵁 鐩戞祴鐐逛俊鎭煡璇� /// </summary> - public List<Model.MonitorDataSetSummary> QueryByMonitor(long projectId, long sceneId, long monitorPointId, long signalId) + public List<Model.MonitorDataSetSummary> GetByMonitor(long projectId, long sceneId, long monitorPointId, long signalId) { if (projectId < 1) return default; @@ -112,7 +112,7 @@ return default; if (monitorPointId < 0) return default; - var all = QueryByMonitor(projectId, sceneId, monitorPointId); + var all = GetByMonitor(projectId, sceneId, monitorPointId); if (all == null || all.Count < 1) return default; var models = all.FindAll(t => t.SignalId == signalId); @@ -122,7 +122,7 @@ /// <summary> /// 鏍规嵁 鐩戞祴鐐逛俊鎭煡璇� /// </summary> - public List<Model.MonitorDataSetSummary> QueryByMonitor(long projectId, long sceneId, long monitorPointId, int year, int month) + public List<Model.MonitorDataSetSummary> GetByMonitor(long projectId, long sceneId, long monitorPointId, int year, int month) { if (projectId < 1) return default; @@ -130,7 +130,7 @@ return default; if (monitorPointId < 0) return default; - var all = QueryAllByDate(projectId, sceneId, year, month); + var all = GetAllByDate(projectId, sceneId, year, month); if (all == null || all.Count < 1) return default; var models = all.FindAll(t => t.MonitorPointId == monitorPointId); @@ -140,7 +140,7 @@ /// <summary> /// 鏍规嵁 鐩戞祴鐐逛俊鎭煡璇� /// </summary> - public Model.MonitorDataSetSummary QueryByMonitor(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public Model.MonitorDataSetSummary GetByMonitor(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { if (projectId < 1) return default; @@ -148,7 +148,7 @@ return default; if (monitorPointId < 0) return default; - var all = QueryByMonitor(projectId, sceneId, monitorPointId, year, month); + var all = GetByMonitor(projectId, sceneId, monitorPointId, year, month); if (all == null || all.Count < 1) return default; if (all == null || all.Count < 1) @@ -160,7 +160,7 @@ /// <summary> /// 鏍规嵁 鐩戞祴鐐逛俊鎭煡璇� /// </summary> - public List<Model.MonitorDataSetSummary> QueryByMonitor(long projectId, long sceneId, List<long> monitorPointIds, int year, int month) + public List<Model.MonitorDataSetSummary> GetByMonitor(long projectId, long sceneId, List<long> monitorPointIds, int year, int month) { if (projectId < 1) return default; @@ -168,7 +168,7 @@ return default; if (monitorPointIds == null || monitorPointIds.Count < 1) return default; - var all = QueryAllByDate(projectId, sceneId, year, month); + var all = GetAllByDate(projectId, sceneId, year, month); if (all == null || all.Count < 1) return default; var models = all.FindAll(t => monitorPointIds.Contains(t.MonitorPointId)); @@ -176,14 +176,14 @@ } #endregion - #region Query - Count + #region Get - Count /// <summary> /// 鏌ヨ鐩戞祴鏁版嵁闆嗘暟閲� /// </summary> - public int QueryMonitorDataSetCount(long projectId, long sceneId) + public int GetMonitorDataSetCount(long projectId, long sceneId) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); if (all == null || all.Count < 1) return default; var count = all.GroupBy(x => new { x.MonitorPointId, x.Year, x.Month }).Count(); @@ -193,9 +193,9 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍鍖呮暟閲� /// </summary> - public int QuerySignalRecordPacketCount(long projectId, long sceneId, long monitorPointId) + public int GetSignalRecordPacketCount(long projectId, long sceneId, long monitorPointId) { - var all = QueryByMonitor(projectId, sceneId, monitorPointId); + var all = GetByMonitor(projectId, sceneId, monitorPointId); if (all == null || all.Count < 1) return default; var count = all.GroupBy(x=>x.SignalId).Count(); @@ -205,9 +205,9 @@ /// <summary> /// 鏌ヨ淇″彿璁板綍鍖呮暟閲� /// </summary> - public int QuerySignalRecordPacketCount(long projectId, long sceneId, long monitorPointId, int year, int month) + public int GetSignalRecordPacketCount(long projectId, long sceneId, long monitorPointId, int year, int month) { - var all = QueryByMonitor(projectId, sceneId, monitorPointId, year, month); + var all = GetByMonitor(projectId, sceneId, monitorPointId, year, month); if (all == null || all.Count < 1) return default; var count = all.GroupBy(x => x.SignalId).Count(); @@ -217,9 +217,9 @@ /// <summary> /// 鏌ヨ鏌愪釜淇″彿璁板綍鏁伴噺 /// </summary> - public int QuerySignalRecordCount(long projectId, long sceneId, long monitorPointId, long signalId) + public int GetSignalRecordCount(long projectId, long sceneId, long monitorPointId, long signalId) { - var all = QueryByMonitor(projectId, sceneId, monitorPointId, signalId); + var all = GetByMonitor(projectId, sceneId, monitorPointId, signalId); if (all == null || all.Count < 1) return default; var count = all.Sum(x => x.Count); @@ -229,9 +229,9 @@ /// <summary> /// 鏌ヨ鏌愪釜淇″彿璁板綍鏁伴噺 /// </summary> - public int QuerySignalRecordCount(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) + public int GetSignalRecordCount(long projectId, long sceneId, long monitorPointId, long signalId, int year, int month) { - var model = QueryByMonitor(projectId, sceneId, monitorPointId, signalId, year, month); + var model = GetByMonitor(projectId, sceneId, monitorPointId, signalId, year, month); if (model == null) return default; var count = model.Count; @@ -240,14 +240,14 @@ #endregion - #region Query - YearMonth + #region Get - YearMonth /// <summary> /// 鏌ヨ骞存湀璁板綍 /// </summary> - public List<Model.YearMonth> QueryYearMonth(long projectId, long sceneId) + public List<Model.YearMonth> GetYearMonth(long projectId, long sceneId) { - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); if (all == null || all.Count < 1) return default; var group = all.GroupBy(x => new { x.Year, x.Month, x.MonitorPointId }); @@ -353,7 +353,7 @@ public bool Set(long projectId, long sceneId, Model.MonitorDataSetSummary monthSummary, int year, int month) { var path = GetFolderPath(projectId, sceneId); - var monitorRecordMonthSummary = QueryByMonitor(projectId, sceneId, monthSummary.MonitorPointId, monthSummary.SignalId, year, month); + var monitorRecordMonthSummary = GetByMonitor(projectId, sceneId, monthSummary.MonitorPointId, monthSummary.SignalId, year, month); if (monitorRecordMonthSummary == null) { return MonitorDataSetSummaryHelper.Insert(path, monthSummary) > 0; diff --git a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummaryHelper.cs b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummaryHelper.cs index 97854e2..a5013d7 100644 --- a/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummaryHelper.cs +++ b/DAL/Local/IStation.DAL.LocalFile.MonitorDataSet/monitor_data_set_summary/MonitorDataSetSummaryHelper.cs @@ -13,12 +13,12 @@ public class MonitorDataSetSummaryHelper { - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public static List<Model.MonitorDataSetSummary> QueryAll(string path) + public static List<Model.MonitorDataSetSummary> GetAll(string path) { if (string.IsNullOrEmpty(path)) return default; @@ -30,9 +30,9 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public static Model.MonitorDataSetSummary QueryById(string path, long Id) + public static Model.MonitorDataSetSummary GetById(string path, long Id) { - var list = QueryAll(path); + var list = GetAll(path); if (list == null || list.Count < 1) return default; return list.Find(t => t.Id == Id); @@ -41,11 +41,11 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public static IEnumerable<Model.MonitorDataSetSummary> QueryByIds(string path, IEnumerable<long> Ids) + public static IEnumerable<Model.MonitorDataSetSummary> GetByIds(string path, IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var list = QueryAll(path); + var list = GetAll(path); return list?.Where(x => Ids.Contains(x.Id)); } @@ -409,7 +409,7 @@ var fileName = FileHelper.GetFilePath<Model.MonitorDataSetSummary>(path); if (!File.Exists(fileName)) return false; - var all = QueryAll(path); + var all = GetAll(path); if (all == null || all.Count < 1) return false; return true; diff --git a/DAL/Local/IStation.DAL.LocalFile.Product/product/Product.cs b/DAL/Local/IStation.DAL.LocalFile.Product/product/Product.cs index 94b4f31..883ab76 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Product/product/Product.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Product/product/Product.cs @@ -26,17 +26,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.Product> QueryAll(long projectId) + public List<Entity.Product> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.Product>.QueryAll(path); + var all = FileIdHelper<Entity.Product>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -44,13 +44,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.Product QueryById(long projectId, long Id) + public Entity.Product GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -58,13 +58,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.Product> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.Product> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Product/product/ProductGroup.cs b/DAL/Local/IStation.DAL.LocalFile.Product/product/ProductGroup.cs index c040332..06a483c 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Product/product/ProductGroup.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Product/product/ProductGroup.cs @@ -26,17 +26,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.ProductGroup> QueryAll(long projectId) + public List<Entity.ProductGroup> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.ProductGroup>.QueryAll(path); + var all = FileIdHelper<Entity.ProductGroup>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -44,13 +44,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.ProductGroup QueryById(long projectId, long Id) + public Entity.ProductGroup GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -58,13 +58,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.ProductGroup> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.ProductGroup> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurve.cs b/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurve.cs index c0188ae..403efdd 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurve.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurve.cs @@ -22,17 +22,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.PumpCurve> QueryAll(long projectId) + public List<Entity.PumpCurve> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.PumpCurve>.QueryAll(path); + var all = FileIdHelper<Entity.PumpCurve>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -40,13 +40,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.PumpCurve QueryById(long projectId, long Id) + public Entity.PumpCurve GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -54,13 +54,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.PumpCurve> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.PumpCurve> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurveMapping.cs b/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurveMapping.cs index 9d67e2d..28ee505 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurveMapping.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Product/pump_curve/PumpCurveMapping.cs @@ -22,17 +22,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.PumpCurveMapping> QueryAll(long projectId) + public List<Entity.PumpCurveMapping> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.PumpCurveMapping>.QueryAll(path); + var all = FileIdHelper<Entity.PumpCurveMapping>.GetAll(path); var entities = all?.OrderBy(x => x.SortCode).ToList(); return entities; } @@ -40,13 +40,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.PumpCurveMapping QueryById(long projectId, long Id) + public Entity.PumpCurveMapping GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -54,13 +54,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.PumpCurveMapping> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.PumpCurveMapping> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Project/Project/Project.cs b/DAL/Local/IStation.DAL.LocalFile.Project/Project/Project.cs index 98f51c0..b3f42a1 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Project/Project/Project.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Project/Project/Project.cs @@ -33,15 +33,15 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.Project> QueryAll() + public List<Entity.Project> GetAll() { var path = GetFolderPath(); - var all = FileIdHelper<Entity.Project>.QueryAll(path); + var all = FileIdHelper<Entity.Project>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -49,9 +49,9 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.Project QueryById(long Id) + public Entity.Project GetById(long Id) { - var all = QueryAll(); + var all = GetAll(); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -59,11 +59,11 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.Project> QueryByIds(IEnumerable<long> Ids) + public List<Entity.Project> GetByIds(IEnumerable<long> Ids) { if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(); + var all = GetAll(); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } @@ -220,7 +220,7 @@ var newProjectFolderPath = GetProjectPath(newProjectId); ZipHelper.UnZipFolder(fileName, newProjectFolderPath); - var defaultProject = FileIdHelper<Entity.Project>.QueryLatest(newProjectFolderPath); + var defaultProject = FileIdHelper<Entity.Project>.GetLatest(newProjectFolderPath); if (defaultProject == null) { msg = "椤圭洰鏂囦欢缂哄け"; @@ -256,7 +256,7 @@ public bool Export(long id, string fileName, out string msg) { msg = string.Empty; - var project = QueryById(id); + var project = GetById(id); var projectPath = GetProjectPath(id); var result = FileSrcHelper<Entity.Project>.Append(projectPath, project); if (!result) diff --git a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_scheme/AnalyzeScheme.cs b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_scheme/AnalyzeScheme.cs index 3ee688a..215de7c 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_scheme/AnalyzeScheme.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_scheme/AnalyzeScheme.cs @@ -24,17 +24,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.AnalyzeScheme> QueryAll(long projectId , long sceneId) + public List<Entity.AnalyzeScheme> GetAll(long projectId , long sceneId) { if (projectId < 1) return default; var path = GetFolderPath(projectId,sceneId); - var all = FileIdHelper<Entity.AnalyzeScheme>.QueryAll(path); + var all = FileIdHelper<Entity.AnalyzeScheme>.GetAll(path); var entities = all?.OrderBy(x=>x.SortCode).ToList(); return entities; } @@ -42,13 +42,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.AnalyzeScheme QueryById(long projectId , long sceneId, long Id) + public Entity.AnalyzeScheme GetById(long projectId , long sceneId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -56,13 +56,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.AnalyzeScheme> QueryByIds(long projectId , long sceneId, IEnumerable<long> Ids) + public List<Entity.AnalyzeScheme> GetByIds(long projectId , long sceneId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructure.cs b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructure.cs index cbeb9ec..09f9cfe 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructure.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructure.cs @@ -24,17 +24,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.AnalyzeStructure> QueryAll(long projectId, long sceneId) + public List<Entity.AnalyzeStructure> GetAll(long projectId, long sceneId) { if (projectId < 1) return default; var path = GetFolderPath(projectId, sceneId); - var all = FileIdHelper<Entity.AnalyzeStructure>.QueryAll(path); + var all = FileIdHelper<Entity.AnalyzeStructure>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -42,13 +42,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.AnalyzeStructure QueryById(long projectId, long sceneId, long Id) + public Entity.AnalyzeStructure GetById(long projectId, long sceneId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -56,13 +56,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.AnalyzeStructure> QueryByIds(long projectId, long sceneId, IEnumerable<long> Ids) + public List<Entity.AnalyzeStructure> GetByIds(long projectId, long sceneId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructureMapping.cs b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructureMapping.cs index 78f1b35..0e93d5a 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructureMapping.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Scene/analyze_structure/AnalyzeStructureMapping.cs @@ -24,17 +24,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.AnalyzeStructureMapping> QueryAll(long projectId, long sceneId) + public List<Entity.AnalyzeStructureMapping> GetAll(long projectId, long sceneId) { if (projectId < 1) return default; var path = GetFolderPath(projectId, sceneId); - var all = FileIdHelper<Entity.AnalyzeStructureMapping>.QueryAll(path); + var all = FileIdHelper<Entity.AnalyzeStructureMapping>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -42,13 +42,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.AnalyzeStructureMapping QueryById(long projectId, long sceneId, long Id) + public Entity.AnalyzeStructureMapping GetById(long projectId, long sceneId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -56,13 +56,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.AnalyzeStructureMapping> QueryByIds(long projectId, long sceneId, IEnumerable<long> Ids) + public List<Entity.AnalyzeStructureMapping> GetByIds(long projectId, long sceneId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId, sceneId); + var all = GetAll(projectId, sceneId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DAL/Local/IStation.DAL.LocalFile.Scene/scene/Scene.cs b/DAL/Local/IStation.DAL.LocalFile.Scene/scene/Scene.cs index fabbd01..954cac6 100644 --- a/DAL/Local/IStation.DAL.LocalFile.Scene/scene/Scene.cs +++ b/DAL/Local/IStation.DAL.LocalFile.Scene/scene/Scene.cs @@ -25,17 +25,17 @@ #endregion - #region Query + #region Get /// <summary> /// 鏌ヨ鍏ㄩ儴 /// </summary> - public List<Entity.Scene> QueryAll(long projectId) + public List<Entity.Scene> GetAll(long projectId) { if (projectId < 1) return default; var path = GetFolderPath(projectId); - var all = FileIdHelper<Entity.Scene>.QueryAll(path); + var all = FileIdHelper<Entity.Scene>.GetAll(path); var entities = all?.ToList(); return entities; } @@ -43,13 +43,13 @@ /// <summary> /// 鏍规嵁 Id鏌ヨ /// </summary> - public Entity.Scene QueryById(long projectId, long Id) + public Entity.Scene GetById(long projectId, long Id) { if (projectId < 1) return default; if (Id < 0) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.ToList(); return entities?.Find(t => t.Id == Id); } @@ -57,13 +57,13 @@ /// <summary> /// 鏍规嵁 Id闆嗗悎鏌ヨ /// </summary> - public List<Entity.Scene> QueryByIds(long projectId, IEnumerable<long> Ids) + public List<Entity.Scene> GetByIds(long projectId, IEnumerable<long> Ids) { if (projectId < 1) return default; if (Ids == null || Ids.Count() < 1) return default; - var all = QueryAll(projectId); + var all = GetAll(projectId); var entities = all?.Where(x => Ids.Contains(x.Id)).ToList(); return entities; } diff --git a/DataProvider/IStation.DataProvider/temp/SceneTempCreate.cs b/DataProvider/IStation.DataProvider/temp/SceneTempCreate.cs index 29872d7..27ce635 100644 --- a/DataProvider/IStation.DataProvider/temp/SceneTempCreate.cs +++ b/DataProvider/IStation.DataProvider/temp/SceneTempCreate.cs @@ -12,7 +12,7 @@ public static Model.Scene GetScene(long projectId) { var bllScene = new BLL.Scene(); - var defaultScene = bllScene.QueryAll(projectId).FirstOrDefault(); + var defaultScene = bllScene.GetAll(projectId).FirstOrDefault(); if (defaultScene == null) { defaultScene = new Model.Scene(); diff --git "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\344\270\232\345\212\241\346\240\221/LogicTreeImportExportHelper.cs" "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\344\270\232\345\212\241\346\240\221/LogicTreeImportExportHelper.cs" index 0b437de..853bead 100644 --- "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\344\270\232\345\212\241\346\240\221/LogicTreeImportExportHelper.cs" +++ "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\344\270\232\345\212\241\346\240\221/LogicTreeImportExportHelper.cs" @@ -98,10 +98,10 @@ { return false; } - var stations = new BLL.Station().QueryAll(projectId); - var logicCatalogs = new BLL.LogicCatalog().QueryAll(projectId); - var logicAreas = new BLL.LogicArea().QueryAll(projectId); - var logicTrees = new BLL.LogicTree().QueryAll(projectId); + var stations = new BLL.Station().GetAll(projectId); + var logicCatalogs = new BLL.LogicCatalog().GetAll(projectId); + var logicAreas = new BLL.LogicArea().GetAll(projectId); + var logicTrees = new BLL.LogicTree().GetAll(projectId); var model = new JsonDataModel(); model.StationList = stations; diff --git "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\200\247\350\203\275\346\233\262\347\272\277/FeatCurveImportExportHelper.cs" "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\200\247\350\203\275\346\233\262\347\272\277/FeatCurveImportExportHelper.cs" index c3274e6..ac81586 100644 --- "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\200\247\350\203\275\346\233\262\347\272\277/FeatCurveImportExportHelper.cs" +++ "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\200\247\350\203\275\346\233\262\347\272\277/FeatCurveImportExportHelper.cs" @@ -79,8 +79,8 @@ { return false; } - var featCurve = new BLL.PumpCurve().QueryAll(projectId); - var featCurveMappings = new BLL.PumpCurveMapping().QueryAll(projectId); + var featCurve = new BLL.PumpCurve().GetAll(projectId); + var featCurveMappings = new BLL.PumpCurveMapping().GetAll(projectId); var model = new JsonDataModel(); model.FeatCurveList = featCurve; diff --git "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\265\213\347\202\271/MonitorPointImportExportHelper.cs" "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\265\213\347\202\271/MonitorPointImportExportHelper.cs" index fc9321d..0f7fa86 100644 --- "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\265\213\347\202\271/MonitorPointImportExportHelper.cs" +++ "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\346\265\213\347\202\271/MonitorPointImportExportHelper.cs" @@ -98,10 +98,10 @@ { return false; } - var group_list = new BLL.MonitorPointGroup().QueryAll(projectId); + var group_list = new BLL.MonitorPointGroup().GetAll(projectId); if (group_list == null) group_list = new List<Model.MonitorPointGroup>(); - var monitor_list = new BLL.MonitorPoint().QueryExSignalList(projectId); + var monitor_list = new BLL.MonitorPoint().GetExSignalList(projectId); var list = group_list.Select(x => new JsonDataModel(x, monitor_list?.Where(t => t.GroupId == x.Id).ToList())).ToList(); if (list == null) list = new List<JsonDataModel>(); diff --git "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\350\256\276\345\244\207/ProductImportExportHelper.cs" "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\350\256\276\345\244\207/ProductImportExportHelper.cs" index da9e288..fe26e55 100644 --- "a/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\350\256\276\345\244\207/ProductImportExportHelper.cs" +++ "b/DataProvider/IStation.DataProvider/temp/\345\257\274\345\205\245\345\257\274\345\207\272/\350\256\276\345\244\207/ProductImportExportHelper.cs" @@ -96,10 +96,10 @@ { return false; } - var group_list = new BLL.ProductGroup().QueryAll(projectId); + var group_list = new BLL.ProductGroup().GetAll(projectId); if (group_list == null) group_list = new List<Model.ProductGroup>(); - var product_list = new BLL.Product().QueryAll(projectId); + var product_list = new BLL.Product().GetAll(projectId); var list = group_list.Select(x => new JsonDataModel(x, product_list?.Where(t => t.GroupId == x.Id).ToList())).ToList(); if (list == null) list = new List<JsonDataModel>(); diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Resources.Designer.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Resources.Designer.cs index 501407c..542de83 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Resources.Designer.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace IStation.WinClient.Scatl.Easy.Properties { +namespace IStation.WinClient.Easy.Properties { using System; @@ -39,7 +39,7 @@ internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IStation.WinClient.Scatl.Easy.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IStation.WinClient.Easy.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Settings.Designer.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Settings.Designer.cs index 3eb1422..9400232 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Settings.Designer.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Curve/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace IStation.WinClient.Scatl.Easy.Properties { +namespace IStation.WinClient.Easy.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Resources.Designer.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Resources.Designer.cs index 6ab0c8b..3430f41 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Resources.Designer.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace IStation.WinFormDesktop.Scatl.Easy.Properties { +namespace IStation.WinFormDesktop.Easy.Properties { using System; @@ -39,7 +39,7 @@ internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IStation.WinFormDesktop.Scatl.Easy.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IStation.WinFormDesktop.Easy.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Settings.Designer.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Settings.Designer.cs index 4d9ddfb..f36c299 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Settings.Designer.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Easy/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace IStation.WinFormDesktop.Scatl.Easy.Properties { +namespace IStation.WinFormDesktop.Easy.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/IStation.WinFormDesktop.Scatl.Professional.csproj b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/IStation.WinFormDesktop.Scatl.Professional.csproj index aaede86..085f750 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/IStation.WinFormDesktop.Scatl.Professional.csproj +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/IStation.WinFormDesktop.Scatl.Professional.csproj @@ -88,13 +88,49 @@ <None Include="App.config" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\BLL\IStation.BLL.Core\IStation.BLL.Core.csproj"> + <Project>{de837025-5cb6-4128-bef5-cc366ec35ace}</Project> + <Name>IStation.BLL.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.CurveAnalyse\IStation.BLL.CurveAnalyse.csproj"> + <Project>{acd1d01b-8f36-4a92-83e5-f134581f0fb7}</Project> + <Name>IStation.BLL.CurveAnalyse</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.EtaWaterAnalyse\IStation.BLL.EtaWaterAnalyse.csproj"> + <Project>{ecbc8aa8-1d08-4096-b42c-70ee56a97b88}</Project> + <Name>IStation.BLL.EtaWaterAnalyse</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.Logic\IStation.BLL.Logic.csproj"> + <Project>{2ffb7243-78f6-460b-ade5-6e076e7e621b}</Project> + <Name>IStation.BLL.Logic</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.MonitorDataSet\IStation.BLL.MonitorDataSet.csproj"> + <Project>{786b0835-f603-4b64-baf0-e32b20aecca9}</Project> + <Name>IStation.BLL.MonitorDataSet</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.Monitor\IStation.BLL.Monitor.csproj"> + <Project>{5ea8926d-66c8-443a-a469-53db415b8172}</Project> + <Name>IStation.BLL.Monitor</Name> + </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.Product\IStation.BLL.Product.csproj"> + <Project>{5e5b2353-a9a2-4b07-a928-fd358a7c6d78}</Project> + <Name>IStation.BLL.Product</Name> + </ProjectReference> <ProjectReference Include="..\..\BLL\IStation.BLL.Project\IStation.BLL.Project.csproj"> <Project>{3b7b39da-835b-4975-bd88-977e1870fe32}</Project> <Name>IStation.BLL.Project</Name> </ProjectReference> + <ProjectReference Include="..\..\BLL\IStation.BLL.Scene\IStation.BLL.Scene.csproj"> + <Project>{7323f936-2c3c-4a71-9245-e977a6a88681}</Project> + <Name>IStation.BLL.Scene</Name> + </ProjectReference> <ProjectReference Include="..\..\Component\IStation.SnowflakeId\IStation.SnowflakeId.csproj"> <Project>{0ec3ba78-b486-4515-a783-267140ddbff1}</Project> <Name>IStation.SnowflakeId</Name> + </ProjectReference> + <ProjectReference Include="..\..\DAL\Factory\IStation.DAL.Factory\IStation.DAL.Factory.csproj"> + <Project>{4c8d9cd6-cb29-4d21-ba36-f291b0523c94}</Project> + <Name>IStation.DAL.Factory</Name> </ProjectReference> <ProjectReference Include="..\..\DAL\Local\IStation.DAL.LocalFile.Core\IStation.DAL.LocalFile.Core.csproj"> <Project>{37539d3d-acd7-4683-8a0b-bc5c678d5169}</Project> @@ -136,6 +172,10 @@ <Project>{28c0335b-68d5-4f31-bfd5-aeda36aadfe1}</Project> <Name>IStation.DataProvider</Name> </ProjectReference> + <ProjectReference Include="..\..\Model\IStation.Model.Logic\IStation.Model.Logic.csproj"> + <Project>{6DE55E0B-68EE-4A67-B1CB-9AEB3497A65E}</Project> + <Name>IStation.Model.Logic</Name> + </ProjectReference> <ProjectReference Include="..\..\Model\IStation.Model.Project\IStation.Model.Project.csproj"> <Project>{cfb50fc5-0916-4e54-a22a-3b07080d4ac6}</Project> <Name>IStation.Model.Project</Name> @@ -152,6 +192,10 @@ <Project>{F7ADB270-1803-44B1-87D0-3D6517C77F95}</Project> <Name>IStation.WinFormUI.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\WinFormUI\IStation.WinFormUI.MonitorDataSet\IStation.WinFormUI.MonitorDataSet.csproj"> + <Project>{e0321a29-f151-47b6-b0ff-0989a89590a9}</Project> + <Name>IStation.WinFormUI.MonitorDataSet</Name> + </ProjectReference> <ProjectReference Include="..\..\WinFormUI\IStation.WinFormUI.Project\IStation.WinFormUI.Project.csproj"> <Project>{5DCF4F51-F4EF-4234-8068-097BC123A8E6}</Project> <Name>IStation.WinFormUI.Project</Name> diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.cs index 1d21ecd..718060d 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.cs @@ -1,9 +1,10 @@ 锘縰sing DevExpress.XtraBars; using DevExpress.XtraBars.Docking; using DevExpress.XtraBars.Docking2010.Views; -using DevExpress.XtraEditors; +using DevExpress.XtraEditors; using IStation.DataProvider.temp; using IStation.WinFormUI; +using IStation.WinFormUI.MonitorDataSet; using IStation.WinFormUI.Project; using IStation.WinFormUI.Scene; using IStation.WinFrmUI.Scatl; @@ -63,7 +64,7 @@ _app.Visible = false; }; - var project = new BLL.Project().QueryById(GlobalParas.ProjectId); + var project = new BLL.Project().GetById(GlobalParas.ProjectId); if (project != null) { this.barStaticProjectCaption.Caption = project.Name; @@ -82,7 +83,7 @@ return; } var bll = new BLL.Project(); - var project = bll.QueryById(GlobalParas.ProjectId); + var project = bll.GetById(GlobalParas.ProjectId); project.UpdateTime = DateTime.Now; bll.Update(project); } @@ -397,9 +398,12 @@ #endregion private void accProjectItem_Click(object sender, EventArgs e) - { + { + //DataImportExportHelper.Import(GlobalParas.ProjectId); + + var scene = SceneTempCreate.GetScene(GlobalParas.ProjectId); - var bol= GeneralMonitorDataImportHelper.Import(GlobalParas.ProjectId,scene.Id,scene.DataSourcesMappers); + var bol = GeneralMonitorDataImportHelper.Import(GlobalParas.ProjectId, scene.Id, scene.DataSourcesMappers); if (!bol) { MessageBox.Show("瀵煎叆澶辫触!"); @@ -415,9 +419,24 @@ ProjectHelper.OtherSaveProject(GlobalParas.ProjectId); } + + + private void accordionControlElement3_Click(object sender, EventArgs e) + { + var scene = SceneTempCreate.GetScene(GlobalParas.ProjectId); + var curvePage = new CurveCompareChartMgr(); + var logic = new BLL.LogicTree().GetByLogicTypeAndLogicId(GlobalParas.ProjectId,scene.BelongType,scene.BelongId); + curvePage.InitialDataSource(GlobalParas.ProjectId, scene.Id,logic); + CreatePage(curvePage,new SurfaceGuid() { DockType= eDockType.Tab,Function="鏇茬嚎姣旇緝",Modular= eModular.Project}); + } + private void accordionControlElement2_Click(object sender, EventArgs e) { - + var scene = SceneTempCreate.GetScene(GlobalParas.ProjectId); + var curvePage = new FilterDataMgrPage(); + var logic = new BLL.LogicTree().GetByLogicTypeAndLogicId(GlobalParas.ProjectId, scene.BelongType, scene.BelongId); + curvePage.InitialDataSource(GlobalParas.ProjectId, scene.Id, logic); + CreatePage(curvePage, new SurfaceGuid() { DockType = eDockType.Tab, Function = "鏁版嵁绛涙煡", Modular = eModular.Project }); } } } diff --git a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.designer.cs b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.designer.cs index 9d44a38..b325867 100644 --- a/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.designer.cs +++ b/WinFormDesktop/IStation.WinFormDesktop.Scatl.Professional/MainForm.designer.cs @@ -33,6 +33,7 @@ this.accordionControlModular = new DevExpress.XtraBars.Navigation.AccordionControl(); this.accModularGroup = new DevExpress.XtraBars.Navigation.AccordionControlElement(); this.accProjectItem = new DevExpress.XtraBars.Navigation.AccordionControlElement(); + this.accordionControlElement3 = new DevExpress.XtraBars.Navigation.AccordionControlElement(); this.fluentDesignFormControl1 = new DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl(); this.barBtnExportProject = new DevExpress.XtraBars.BarButtonItem(); this.barBtnEditProject = new DevExpress.XtraBars.BarButtonItem(); @@ -65,14 +66,14 @@ this.accordionControlModular.Dock = System.Windows.Forms.DockStyle.Left; this.accordionControlModular.Elements.AddRange(new DevExpress.XtraBars.Navigation.AccordionControlElement[] { this.accModularGroup}); - this.accordionControlModular.Location = new System.Drawing.Point(0, 30); + this.accordionControlModular.Location = new System.Drawing.Point(0, 31); this.accordionControlModular.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.accordionControlModular.Name = "accordionControlModular"; this.accordionControlModular.OptionsMinimizing.AllowMinimizeMode = DevExpress.Utils.DefaultBoolean.False; this.accordionControlModular.OptionsMinimizing.FooterHeight = 60; this.accordionControlModular.OptionsMinimizing.State = DevExpress.XtraBars.Navigation.AccordionControlState.Minimized; this.accordionControlModular.RootDisplayMode = DevExpress.XtraBars.Navigation.AccordionControlRootDisplayMode.Footer; - this.accordionControlModular.Size = new System.Drawing.Size(70, 749); + this.accordionControlModular.Size = new System.Drawing.Size(70, 748); this.accordionControlModular.TabIndex = 1; this.accordionControlModular.ViewType = DevExpress.XtraBars.Navigation.AccordionControlViewType.HamburgerMenu; // @@ -80,6 +81,7 @@ // this.accModularGroup.Elements.AddRange(new DevExpress.XtraBars.Navigation.AccordionControlElement[] { this.accProjectItem, + this.accordionControlElement3, this.accordionControlElement2}); this.accModularGroup.Expanded = true; this.accModularGroup.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("accModularGroup.ImageOptions.SvgImage"))); @@ -97,6 +99,13 @@ this.accProjectItem.Text = "椤圭洰"; this.accProjectItem.Click += new System.EventHandler(this.accProjectItem_Click); // + // accordionControlElement3 + // + this.accordionControlElement3.Name = "accordionControlElement3"; + this.accordionControlElement3.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item; + this.accordionControlElement3.Text = "鏇茬嚎姣旇緝"; + this.accordionControlElement3.Click += new System.EventHandler(this.accordionControlElement3_Click); + // // fluentDesignFormControl1 // this.fluentDesignFormControl1.FluentDesignForm = this; @@ -107,7 +116,7 @@ this.fluentDesignFormControl1.Location = new System.Drawing.Point(0, 0); this.fluentDesignFormControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.fluentDesignFormControl1.Name = "fluentDesignFormControl1"; - this.fluentDesignFormControl1.Size = new System.Drawing.Size(1204, 30); + this.fluentDesignFormControl1.Size = new System.Drawing.Size(1204, 31); this.fluentDesignFormControl1.TabIndex = 2; this.fluentDesignFormControl1.TabStop = false; this.fluentDesignFormControl1.Text = "鏅烘収姘翠綅"; @@ -186,7 +195,7 @@ // this.barDockControlTop.CausesValidation = false; this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top; - this.barDockControlTop.Location = new System.Drawing.Point(0, 30); + this.barDockControlTop.Location = new System.Drawing.Point(0, 31); this.barDockControlTop.Manager = this.barManager1; this.barDockControlTop.Size = new System.Drawing.Size(1204, 0); // @@ -202,17 +211,17 @@ // this.barDockControlLeft.CausesValidation = false; this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left; - this.barDockControlLeft.Location = new System.Drawing.Point(0, 30); + this.barDockControlLeft.Location = new System.Drawing.Point(0, 31); this.barDockControlLeft.Manager = this.barManager1; - this.barDockControlLeft.Size = new System.Drawing.Size(0, 749); + this.barDockControlLeft.Size = new System.Drawing.Size(0, 748); // // barDockControlRight // this.barDockControlRight.CausesValidation = false; this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right; - this.barDockControlRight.Location = new System.Drawing.Point(1204, 30); + this.barDockControlRight.Location = new System.Drawing.Point(1204, 31); this.barDockControlRight.Manager = this.barManager1; - this.barDockControlRight.Size = new System.Drawing.Size(0, 749); + this.barDockControlRight.Size = new System.Drawing.Size(0, 748); // // dockManager1 // @@ -244,6 +253,13 @@ this.accordionControlElement1.Name = "accordionControlElement1"; this.accordionControlElement1.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item; this.accordionControlElement1.Text = "Element1"; + // + // accordionControlElement2 + // + this.accordionControlElement2.Name = "accordionControlElement2"; + this.accordionControlElement2.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item; + this.accordionControlElement2.Text = "鏇茬嚎绛涙煡"; + this.accordionControlElement2.Click += new System.EventHandler(this.accordionControlElement2_Click); // // MainForm // @@ -299,6 +315,7 @@ private DevExpress.XtraBars.BarButtonItem barBtnExportProject; private DevExpress.XtraBars.BarButtonItem barBtnEditProject; private DevExpress.XtraBars.BarStaticItem barStaticProjectCaption; + private DevExpress.XtraBars.Navigation.AccordionControlElement accordionControlElement3; private DevExpress.XtraBars.Navigation.AccordionControlElement accordionControlElement2; } } \ No newline at end of file diff --git a/WinFormUI/IStation.WinFormUI.Core/custom_control/PagerCtrl.cs b/WinFormUI/IStation.WinFormUI.Core/custom_control/PagerCtrl.cs index b09452c..97c063b 100644 --- a/WinFormUI/IStation.WinFormUI.Core/custom_control/PagerCtrl.cs +++ b/WinFormUI/IStation.WinFormUI.Core/custom_control/PagerCtrl.cs @@ -28,7 +28,7 @@ /// 绗竴涓弬鏁颁负CurrentPage /// 绗簩涓弬鏁颁负PageSize /// 绗笁涓弬鏁颁负杩斿洖鐨勬�绘潯鏁� - public event Func<int,int,Task<int>> QueryPageEvent;//杩斿洖鎬绘潯鏁� + public event Func<int,int,Task<int>> GetPageEvent;//杩斿洖鎬绘潯鏁� private int _pageSize = 40;//鍗曢〉鏉℃暟 private int _pageIndex = 1;//褰撳墠椤� @@ -38,22 +38,22 @@ /// <summary> /// 琚姩鏌ヨ /// </summary> - public void PassiveQuery(bool reset=true) + public void PassiveGet(bool reset=true) { if (reset) { _pageIndex = 1; } - Query(); + Get(); } //鍐呴儴鏌ヨ - private async void Query() + private async void Get() { this.txtPageIndex.Text = _pageIndex.ToString(); - if (this.QueryPageEvent != null) + if (this.GetPageEvent != null) { - _total =await this.QueryPageEvent(_pageIndex,_pageSize); + _total =await this.GetPageEvent(_pageIndex,_pageSize); _pageNumber = CalcuPageCount(_total, _pageSize); this.labTotal.Text = $"鍏� {_total} 鏉�"; this.labPageCount.Text= $"鍏� {_pageNumber} 椤�"; @@ -94,28 +94,28 @@ private void btnFirst_Click(object sender, EventArgs e) { _pageIndex = 1; - Query(); + Get(); } //涓婁竴椤� private void btnPre_Click(object sender, EventArgs e) { _pageIndex--; - Query(); + Get(); } //涓嬩竴椤� private void btnNext_Click(object sender, EventArgs e) { _pageIndex++; - Query(); + Get(); } //鏈〉 private void btnLast_Click(object sender, EventArgs e) { _pageIndex = _pageNumber; - Query(); + Get(); } //鍗曢〉鏉℃暟鏀瑰彉 @@ -125,14 +125,14 @@ _pageNumber = CalcuPageCount(_total,_pageSize); if (_pageIndex > _pageNumber) _pageIndex = _pageNumber; - Query(); + Get(); } //璺宠浆 private void btnGo_Click(object sender, EventArgs e) { _pageIndex = int.Parse(this.txtToPageIndex.Text); - Query(); + Get(); } } diff --git a/WinFormUI/IStation.WinFormUI.MonitorDataSet/IStation.WinFormUI.MonitorDataSet.csproj b/WinFormUI/IStation.WinFormUI.MonitorDataSet/IStation.WinFormUI.MonitorDataSet.csproj index 82e18a0..734caad 100644 --- a/WinFormUI/IStation.WinFormUI.MonitorDataSet/IStation.WinFormUI.MonitorDataSet.csproj +++ b/WinFormUI/IStation.WinFormUI.MonitorDataSet/IStation.WinFormUI.MonitorDataSet.csproj @@ -31,14 +31,19 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="DevExpress.Charts.v21.2.Core, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.Desktop.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.Data.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.Printing.v21.2.Core, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.Utils.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> + <Reference Include="DevExpress.Utils.v21.2.UI, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraBars.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraCharts.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> + <Reference Include="DevExpress.XtraCharts.v21.2.UI, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> + <Reference Include="DevExpress.XtraCharts.v21.2.Wizard, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraEditors.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraLayout.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> + <Reference Include="DevExpress.XtraPrinting.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core" /> @@ -58,6 +63,19 @@ </Compile> <Compile Include="XtraForm1.Designer.cs"> <DependentUpon>XtraForm1.cs</DependentUpon> + </Compile> + <Compile Include="鏁版嵁绛涙煡\ChartBoxSelHelper.cs" /> + <Compile Include="鏁版嵁绛涙煡\FilterDataMgrPage.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="鏁版嵁绛涙煡\FilterDataMgrPage.designer.cs"> + <DependentUpon>FilterDataMgrPage.cs</DependentUpon> + </Compile> + <Compile Include="鏁版嵁绛涙煡\MonitorPointExSignalListTreeCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="鏁版嵁绛涙煡\MonitorPointExSignalListTreeCtrl.designer.cs"> + <DependentUpon>MonitorPointExSignalListTreeCtrl.cs</DependentUpon> </Compile> <Compile Include="鏇茬嚎姣旇緝\CurveCompareChartMgr.cs"> <SubType>UserControl</SubType> @@ -124,6 +142,12 @@ <EmbeddedResource Include="XtraForm1.resx"> <DependentUpon>XtraForm1.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="鏁版嵁绛涙煡\FilterDataMgrPage.resx"> + <DependentUpon>FilterDataMgrPage.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="鏁版嵁绛涙煡\MonitorPointExSignalListTreeCtrl.resx"> + <DependentUpon>MonitorPointExSignalListTreeCtrl.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="鏇茬嚎姣旇緝\CurveCompareChartMgr.resx"> <DependentUpon>CurveCompareChartMgr.cs</DependentUpon> </EmbeddedResource> diff --git a/WinFormUI/IStation.WinFormUI.MonitorDataSet/XtraForm1.Designer.cs b/WinFormUI/IStation.WinFormUI.MonitorDataSet/XtraForm1.Designer.cs index c464d84..14a423b 100644 --- a/WinFormUI/IStation.WinFormUI.MonitorDataSet/XtraForm1.Designer.cs +++ b/WinFormUI/IStation.WinFormUI.MonitorDataSet/XtraForm1.Designer.cs @@ -28,18 +28,24 @@ /// </summary> private void InitializeComponent() { + DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram(); + DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); this.treeList1 = new DevExpress.XtraTreeList.TreeList(); this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); ((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); this.layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit(); this.SuspendLayout(); // // treeList1 @@ -98,11 +104,25 @@ this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem2.TextVisible = false; // + // chartControl1 + // + xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + this.chartControl1.Diagram = xyDiagram1; + this.chartControl1.Location = new System.Drawing.Point(270, 288); + this.chartControl1.Name = "chartControl1"; + series1.Name = "Series 1"; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series1}; + this.chartControl1.Size = new System.Drawing.Size(300, 200); + this.chartControl1.TabIndex = 2; + // // XtraForm1 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(668, 634); + this.Controls.Add(this.chartControl1); this.Controls.Add(this.layoutControl1); this.Name = "XtraForm1"; this.Text = "XtraForm1"; @@ -112,6 +132,9 @@ ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); this.ResumeLayout(false); } @@ -124,5 +147,6 @@ private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraCharts.ChartControl chartControl1; } } \ No newline at end of file diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/ChartBoxSelHelper.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/ChartBoxSelHelper.cs" new file mode 100644 index 0000000..e535fd1 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/ChartBoxSelHelper.cs" @@ -0,0 +1,207 @@ +锘縰sing DevExpress.Charts.Native; +using DevExpress.XtraCharts; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IStation.WinFormUI +{ + /// <summary> + /// 鍥捐〃妗嗛�夎緟鍔╃被 + /// </summary> + public class ChartBoxSelHelper + { + public ChartBoxSelHelper(ChartControl chart) + { + _chart = chart; + _chart.CustomPaint += chartControl_CustomPaint; + _chart.MouseDown += chartControl_MouseDown; + _chart.MouseMove += chartControl_MouseMove; + _chart.MouseUp += chartControl_MouseUp; + } + + private ChartControl _chart;//鍥捐〃 + private bool _isStartBoxSelect = false;//鏄惁寮�濮嬫閫� + private Point? _startPoint;//寮�濮嬬偣 + private Rectangle? _rect;//鐭╁舰 + private Color _rectBdrColor = Color.FromArgb(0, 122, 204);//鐭╁舰杈规棰滆壊 + private Color _rectBgColor = Color.FromArgb(89, Color.FromArgb(0xbaa500));//鐭╁舰鑳屾櫙棰滆壊 + + /// <summary> + /// 妗嗛�夊畬鎴愪簨浠� + /// </summary> + public event Action<MouseEventArgs> BoxSelCompletedEvent; + + /// <summary> + /// 鐭╁舰杈规棰滆壊 + /// </summary> + public Color RectBdColor { get => _rectBdrColor; set => _rectBdrColor = value; } + + /// <summary> + /// 鐭╁舰鑳屾櫙棰滆壊 + /// </summary> + public Color RectBgColor { get => _rectBgColor; set => _rectBgColor = value; } + + //鑷畾涔夌粯鍒剁煩褰� + private void chartControl_CustomPaint(object sender, CustomPaintEventArgs e) + { + if (!(e is DXCustomPaintEventArgs dxArgs)) + return; + if (_rect != null) + { + dxArgs.Cache.DrawRectangle(_rect.Value, RectBdColor, 1); + dxArgs.Cache.FillRectangle(RectBgColor, _rect.Value); + } + } + + //榧犳爣鎸変笅 + private void chartControl_MouseDown(object sender, MouseEventArgs e) + { + if (_isStartBoxSelect) + { + _startPoint = e.Location; + } + } + + //榧犳爣绉诲姩 + private void chartControl_MouseMove(object sender, MouseEventArgs e) + { + if (_isStartBoxSelect && _startPoint != null) + { + _rect = GetRectangle(_startPoint.Value, e.Location); + _chart.Invalidate(); + } + } + + private Rectangle GetRectangle(Point p1, Point p2) + { + int x = p1.X < p2.X ? p1.X : p2.X; + int y = p1.Y < p2.Y ? p1.Y : p2.Y; + int width = Math.Abs(p1.X - p2.X); + int height = Math.Abs(p1.Y - p2.Y); + return new Rectangle(x, y, width, height); + } + + private RectangleF GetRectangle(PointF p1, PointF p2) + { + float x = p1.X < p2.X ? p1.X : p2.X; + float y = p1.Y < p2.Y ? p1.Y : p2.Y; + float width = Math.Abs(p1.X - p2.X); + float height = Math.Abs(p1.Y - p2.Y); + return new RectangleF(x, y, width, height); + } + + //榧犳爣寮硅捣 + private void chartControl_MouseUp(object sender, MouseEventArgs e) + { + _isStartBoxSelect = false; + _startPoint = null; + if (_rect != null) + { + this.BoxSelCompletedEvent?.Invoke(e); + } + } + + /// <summary> + /// 寮�濮嬫閫� + /// </summary> + public void StartBoxSel() + { + _isStartBoxSelect = true; + } + + /// <summary> + /// 鍏抽棴妗嗛�� + /// </summary> + public void CloseBoxSel() + { + _rect = null; + _chart.Invalidate(); + } + + //璁$畻鏃堕棿閫変腑鐨勭偣 + public List<SeriesPoint> CalcuDataTimeSelSeriesPoints(List<Series> seriesList) + { + if (seriesList == null || seriesList.Count < 1) + return default; + if (_rect == null) + return default; + + var chartStartPoint = _rect.Value.Location; + var chartEndPoint = new Point(_rect.Value.X + _rect.Value.Width, _rect.Value.Y + _rect.Value.Height); + var xyDiagram = _chart.Diagram as XYDiagram2D; + var coordiStart = xyDiagram.PointToDiagram(chartStartPoint); + var coordiEnd = xyDiagram.PointToDiagram(chartEndPoint); + + if (coordiStart.IsEmpty || coordiEnd.IsEmpty) + return default; + + var start_time = coordiStart.DateTimeArgument; + var start_value = coordiStart.NumericalValue; + var end_time = coordiEnd.DateTimeArgument; + var end_value = coordiEnd.NumericalValue; + + var list = new List<SeriesPoint>(); + foreach (Series series in seriesList) + { + foreach (SeriesPoint point in series.Points) + { + var dataTime = point.DateTimeArgument; + if (dataTime >= start_time && dataTime <= end_time) + { + var dataValue=point.Values[0]; + if ((dataValue >= start_value && dataValue <= end_value) || (dataValue <= start_value && dataValue >= end_value)) + { + list.Add(point); + } + } + } + } + + return list; + } + + //璁$畻鏁板�奸�変腑鐨勭偣 + public List<SeriesPoint> CalcuNumericalSelSeriesPoints (List<Series> seriesList) + { + if (seriesList == null || seriesList.Count < 1) + return default; + if (_rect == null) + return default; + + var chartStartPoint = _rect.Value.Location; + var chartEndPoint = new Point(_rect.Value.X + _rect.Value.Width, _rect.Value.Y + _rect.Value.Height); + var xyDiagram = _chart.Diagram as XYDiagram2D; + var coordiStart = xyDiagram.PointToDiagram(chartStartPoint); + var coordiEnd = xyDiagram.PointToDiagram(chartEndPoint); + + if (coordiStart.IsEmpty || coordiEnd.IsEmpty) + return default; + + PointF startPoint = new PointF((float)coordiStart.NumericalArgument, (float)coordiStart.NumericalValue); + PointF endPoint = new PointF((float)coordiEnd.NumericalArgument, (float)coordiEnd.NumericalValue); + + var bounds = GetRectangle(startPoint, endPoint); + var list = new List<SeriesPoint>(); + foreach (Series series in seriesList) + { + foreach (SeriesPoint point in series.Points) + { + float x = (float)point.NumericalArgument; + float y = (float)point.Values[0]; + if (bounds.Contains(x, y)) + { + list.Add(point); + } + } + } + + return list; + } + + } +} diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.cs" new file mode 100644 index 0000000..8a41804 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.cs" @@ -0,0 +1,244 @@ +锘縰sing DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace IStation.WinFormUI.MonitorDataSet +{ + public partial class FilterDataMgrPage : DocumentPage + { + public FilterDataMgrPage() + { + InitializeComponent(); + _boxSelHelper = new ChartBoxSelHelper(this.chartControl1); + _boxSelHelper.BoxSelCompletedEvent += _boxSelHelper_BoxSelCompletedEvent; + + this.monitorPointTreeListCtrl1.SelectEvent += MonitorPointTreeListCtrl1_SelectEvent; + } + + + #region 褰撳墠瑙嗗浘绫� + public class CurrentViewModel + { + public CurrentViewModel() { } + public CurrentViewModel(Model.SignalRecord rhs) + { + this.DataTime = rhs.Time; + this.DataValue = rhs.Value; + } + + public DateTime DataTime { get; set; } + public double DataValue { get; set; } + } + #endregion + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public void InitialDataSource(long projectId,long sceneId, Model.LogicTree logic) + { + _projectId = projectId; + _sceneId = sceneId; + this.monitorPointTreeListCtrl1.SetBindingData(_projectId, logic.LogicType, logic.LogicId); + } + + private SwiftPlotDiagram _diagram + { + get { return this.chartControl1.Diagram as SwiftPlotDiagram; } + } + private Series _series + { + get + { + return this.chartControl1.Series[0]; + } + } + + private long _projectId; + private long _sceneId; + private Model.Signal _model = null; + private List<CurrentViewModel> _allBindList = null; + private ChartBoxSelHelper _boxSelHelper = null;//妗嗛�夎緟鍔╃被 + + private void MonitorPointTreeListCtrl1_SelectEvent(string objectType, object model, MouseEventArgs arg3) + { + var lays = this.chartControl1.ShowOverlay(); + var monitorPointExSignalList = model as Model.MonitorPointExSignalList; + _model = monitorPointExSignalList?.SignalList.First(); + if (_model == null) + { + this.labCaption.Text = "鏈煡"; + _diagram.AxisY.Title.Text = "鍊�"; + _allBindList = null; + } + else + { + this.labCaption.Text = _model.Name; + _diagram.AxisY.Title.Text = UnitValueHelper.Get(_projectId,_model); + var packet = new BLL.MonitorDataSet().GetSignalRecordPacket(_projectId,_sceneId, _model.MonitorPointId, _model.Id); + if (packet == null|| packet.RecordList==null) + { + _allBindList = new List<CurrentViewModel>(); + lays.Close(); + return; + } + else + { + _allBindList = packet.RecordList.Where(x => x.Value != IStation.Default.Error)?.Select(x => new CurrentViewModel(x)).ToList(); + } + + } + if (_allBindList == null) + _allBindList = new List<CurrentViewModel>(); + this.currentViewModelBindingSource.DataSource = _allBindList; + this.currentViewModelBindingSource.ResetBindings(false); + lays.Close(); + } + + //妗嗛�夊畬鎴� + private void _boxSelHelper_BoxSelCompletedEvent(MouseEventArgs e) + { + _boxSelSeriesPointList = _boxSelHelper?.CalcuDataTimeSelSeriesPoints(new List<Series>() { _series }); + if (_boxSelSeriesPointList == null || _boxSelSeriesPointList.Count < 1) + { + _boxSelHelper?.CloseBoxSel(); + } + else + { + this.popBoxSel.ShowPopup(MousePosition); + } + } + private List<SeriesPoint> _boxSelSeriesPointList = null; + + //鍒犻櫎 + private void barBtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (_boxSelSeriesPointList == null || _boxSelSeriesPointList.Count < 1) + return; + var lays = this.chartControl1.ShowOverlay(); + var dataTimeList = _boxSelSeriesPointList.Select(x => x.DateTimeArgument).ToList(); + var bol = new BLL.MonitorDataSet().SetAbnormal(_projectId,_sceneId, _model.MonitorPointId, _model.Id, dataTimeList,IStation.Default.Abnormal); + if (!bol) + { + lays.Close(); + XtraMessageBox.Show("鍒犻櫎澶辫触!"); + return; + } + _allBindList.RemoveAll(x => dataTimeList.Contains(x.DataTime)); + this.currentViewModelBindingSource.ResetBindings(false); + lays.Close(); + } + + //鍏抽棴 + private void popBoxSel_CloseUp(object sender, EventArgs e) + { + _boxSelHelper?.CloseBoxSel(); + } + + //妗嗛�夊垹闄� + private void barBtnBoxSel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _boxSelHelper?.StartBoxSel(); + } + + //鍖洪棿鍒犻櫎 + private void barBtnRangeDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + XtraMessageBox.Show("鏈仮澶�"); + /*var dlg = new SetRangeDlg(); + if (dlg.ShowDialog() == DialogResult.OK) + { + var dataTimeList = _allBindList?.Where(x => x.DataValue>=dlg.MinValue&&x.DataValue<=dlg.MaxValue).Select(x => x.DataTime).ToList(); + if (dataTimeList == null || dataTimeList.Count < 1) + { + XtraMessageBox.Show("鏈绱㈠埌鍖洪棿鍊�!"); + return; + } + var lays = this.chartControl1.ShowOverlay(); + var bol = new BLL.MonitorDataSet().SetAbnormal(_projectId,_sceneId, _model.MonitorPointId, _model.Id, dataTimeList,IStation.Default.Abnormal); + if (!bol) + { + lays.Close(); + XtraMessageBox.Show("鍒犻櫎澶辫触!"); + return; + } + _allBindList.RemoveAll(x => dataTimeList.Contains(x.DataTime)); + this.currentViewModelBindingSource.ResetBindings(false); + + lays.Close(); + } */ + } + + //娓呴櫎璐熷�� + private void barBtnClearNegative_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (XtraMessageBox.Show("纭娓呴櫎鎵�鏈夎礋鍊煎悧锛�", "璇㈤棶", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) + { + return; + } + var dataTimeList = _allBindList?.Where(x => x.DataValue < 0).Select(x=>x.DataTime).ToList(); + if (dataTimeList == null || dataTimeList.Count < 1) + { + XtraMessageBox.Show("鏈绱㈠埌璐熷��!"); + return; + } + var lays = this.chartControl1.ShowOverlay(); + var bol = new BLL.MonitorDataSet().SetAbnormal(_projectId,_sceneId, _model.MonitorPointId, _model.Id, dataTimeList,IStation.Default.Abnormal); + if (!bol) + { + lays.Close(); + XtraMessageBox.Show("鍒犻櫎澶辫触!"); + return; + } + _allBindList.RemoveAll(x => dataTimeList.Contains(x.DataTime)); + this.currentViewModelBindingSource.ResetBindings(false); + + lays.Close(); + } + + //娓呴櫎闆跺�� + private void barBtnClearZero_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (XtraMessageBox.Show("纭娓呴櫎鎵�鏈夐浂鍊煎悧锛�", "璇㈤棶", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes) + { + return; + } + var dataTimeList = _allBindList?.Where(x => x.DataValue == 0).Select(x => x.DataTime).ToList(); + if (dataTimeList == null || dataTimeList.Count < 1) + { + XtraMessageBox.Show("鏈绱㈠埌闆跺��!"); + return; + } + var lays = this.chartControl1.ShowOverlay(); + var bol = new BLL.MonitorDataSet().SetAbnormal(_projectId, _sceneId, _model.MonitorPointId, _model.Id, dataTimeList, IStation.Default.Abnormal); + if (!bol) + { + lays.Close(); + XtraMessageBox.Show("鍒犻櫎澶辫触!"); + return; + } + _allBindList.RemoveAll(x => dataTimeList.Contains(x.DataTime)); + this.currentViewModelBindingSource.ResetBindings(false); + + lays.Close(); + } + + //鍥炬爣鐨勫彸閿彍鍗� + private void chartControl1_MouseClick(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + this.popMain.ShowPopup(MousePosition); + } + } + + + } +} diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.designer.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.designer.cs" new file mode 100644 index 0000000..5c24b51 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.designer.cs" @@ -0,0 +1,404 @@ +锘� +namespace IStation.WinFormUI.MonitorDataSet +{ + partial class FilterDataMgrPage + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + DevExpress.XtraCharts.SwiftPlotDiagram swiftPlotDiagram1 = new DevExpress.XtraCharts.SwiftPlotDiagram(); + DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.SwiftPlotSeriesView swiftPlotSeriesView1 = new DevExpress.XtraCharts.SwiftPlotSeriesView(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FilterDataMgrPage)); + this.currentViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.dockManager1 = new DevExpress.XtraBars.Docking.DockManager(this.components); + this.docPnlMonitorList = new DevExpress.XtraBars.Docking.DockPanel(); + this.dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); + this.monitorPointTreeListCtrl1 = new IStation.WinFormUI.MonitorDataSet.MonitorPointExSignalListTreeCtrl(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.labCaption = new DevExpress.XtraEditors.LabelControl(); + this.popBoxSel = new DevExpress.XtraBars.PopupMenu(this.components); + this.barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + this.barManager1 = new DevExpress.XtraBars.BarManager(this.components); + this.barDockControlTop = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlRight = new DevExpress.XtraBars.BarDockControl(); + this.barBtnBoxSel = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnClearNegative = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnClearZero = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnRangeDelete = new DevExpress.XtraBars.BarButtonItem(); + this.popMain = new DevExpress.XtraBars.PopupMenu(this.components); + ((System.ComponentModel.ISupportInitialize)(this.currentViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(swiftPlotDiagram1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(swiftPlotSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).BeginInit(); + this.docPnlMonitorList.SuspendLayout(); + this.dockPanel1_Container.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.popBoxSel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.popMain)).BeginInit(); + this.SuspendLayout(); + // + // chartControl1 + // + swiftPlotDiagram1.AxisX.Title.Text = "鏃堕棿"; + swiftPlotDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + swiftPlotDiagram1.AxisY.CrosshairAxisLabelOptions.Visibility = DevExpress.Utils.DefaultBoolean.False; + swiftPlotDiagram1.AxisY.Title.Alignment = System.Drawing.StringAlignment.Far; + swiftPlotDiagram1.AxisY.Title.Text = "鍊�"; + swiftPlotDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; + swiftPlotDiagram1.AxisY.Title.WordWrap = true; + swiftPlotDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + swiftPlotDiagram1.EnableAxisXZooming = true; + swiftPlotDiagram1.PaneLayout.Direction = DevExpress.XtraCharts.PaneLayoutDirection.Horizontal; + swiftPlotDiagram1.RangeControlDateTimeGridOptions.GridAlignment = DevExpress.XtraCharts.DateTimeGridAlignment.Month; + swiftPlotDiagram1.RangeControlDateTimeGridOptions.GridMode = DevExpress.XtraCharts.ChartRangeControlClientGridMode.Manual; + this.chartControl1.Diagram = swiftPlotDiagram1; + this.chartControl1.Legend.Name = "Default Legend"; + this.chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; + this.chartControl1.Location = new System.Drawing.Point(0, 1); + this.chartControl1.Margin = new System.Windows.Forms.Padding(0); + this.chartControl1.Name = "chartControl1"; + series1.ArgumentDataMember = "DataTime"; + series1.CrosshairLabelPattern = "{A:yyyy.MM.dd HH:mm:ss} {V:#.00}"; + series1.CrosshairLabelVisibility = DevExpress.Utils.DefaultBoolean.True; + series1.DataSource = this.currentViewModelBindingSource; + series1.Name = "Series 1"; + series1.ValueDataMembersSerializable = "DataValue"; + swiftPlotSeriesView1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(150)))), ((int)(((byte)(70))))); + series1.View = swiftPlotSeriesView1; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series1}; + this.chartControl1.Size = new System.Drawing.Size(841, 732); + this.chartControl1.TabIndex = 1; + this.chartControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.chartControl1_MouseClick); + // + // layoutControl1 + // + this.tableLayoutPanel1.SetColumnSpan(this.layoutControl1, 2); + this.layoutControl1.Controls.Add(this.chartControl1); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 28); + this.layoutControl1.Margin = new System.Windows.Forms.Padding(0); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(1028, 427, 650, 400); + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(841, 734); + this.layoutControl1.TabIndex = 2; + this.layoutControl1.Text = "layoutControl1"; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1}); + this.Root.Name = "Root"; + this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.Root.Size = new System.Drawing.Size(841, 734); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.chartControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 1, 1); + this.layoutControlItem1.Size = new System.Drawing.Size(841, 734); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // dockManager1 + // + this.dockManager1.Form = this; + this.dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { + this.docPnlMonitorList}); + this.dockManager1.TopZIndexControls.AddRange(new string[] { + "DevExpress.XtraBars.BarDockControl", + "DevExpress.XtraBars.StandaloneBarDockControl", + "System.Windows.Forms.StatusBar", + "System.Windows.Forms.MenuStrip", + "System.Windows.Forms.StatusStrip", + "DevExpress.XtraBars.Ribbon.RibbonStatusBar", + "DevExpress.XtraBars.Ribbon.RibbonControl", + "DevExpress.XtraBars.Navigation.OfficeNavigationBar", + "DevExpress.XtraBars.Navigation.TileNavPane", + "DevExpress.XtraBars.TabFormControl", + "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", + "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl"}); + // + // docPnlMonitorList + // + this.docPnlMonitorList.Controls.Add(this.dockPanel1_Container); + this.docPnlMonitorList.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; + this.docPnlMonitorList.ID = new System.Guid("d3ac34ca-555a-4091-b72a-ce18875fd99b"); + this.docPnlMonitorList.Location = new System.Drawing.Point(0, 0); + this.docPnlMonitorList.Name = "docPnlMonitorList"; + this.docPnlMonitorList.Options.AllowDockAsTabbedDocument = false; + this.docPnlMonitorList.Options.AllowDockBottom = false; + this.docPnlMonitorList.Options.AllowDockFill = false; + this.docPnlMonitorList.Options.AllowDockRight = false; + this.docPnlMonitorList.Options.AllowDockTop = false; + this.docPnlMonitorList.Options.AllowFloating = false; + this.docPnlMonitorList.Options.FloatOnDblClick = false; + this.docPnlMonitorList.Options.ShowCloseButton = false; + this.docPnlMonitorList.Options.ShowMaximizeButton = false; + this.docPnlMonitorList.OriginalSize = new System.Drawing.Size(222, 200); + this.docPnlMonitorList.Size = new System.Drawing.Size(222, 762); + this.docPnlMonitorList.Text = "娴嬬偣鍒楄〃"; + // + // dockPanel1_Container + // + this.dockPanel1_Container.Controls.Add(this.monitorPointTreeListCtrl1); + this.dockPanel1_Container.Location = new System.Drawing.Point(3, 26); + this.dockPanel1_Container.Name = "dockPanel1_Container"; + this.dockPanel1_Container.Size = new System.Drawing.Size(215, 733); + this.dockPanel1_Container.TabIndex = 0; + // + // monitorPointTreeListCtrl1 + // + this.monitorPointTreeListCtrl1.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.monitorPointTreeListCtrl1.Appearance.Options.UseBackColor = true; + this.monitorPointTreeListCtrl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.monitorPointTreeListCtrl1.Location = new System.Drawing.Point(0, 0); + this.monitorPointTreeListCtrl1.Name = "monitorPointTreeListCtrl1"; + this.monitorPointTreeListCtrl1.Size = new System.Drawing.Size(215, 733); + this.monitorPointTreeListCtrl1.TabIndex = 0; + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F)); + this.tableLayoutPanel1.Controls.Add(this.labCaption, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.layoutControl1, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(222, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(841, 762); + this.tableLayoutPanel1.TabIndex = 1; + // + // labCaption + // + this.labCaption.Appearance.BackColor = System.Drawing.Color.LightGray; + this.labCaption.Appearance.Options.UseBackColor = true; + this.labCaption.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; + this.tableLayoutPanel1.SetColumnSpan(this.labCaption, 2); + this.labCaption.Dock = System.Windows.Forms.DockStyle.Fill; + this.labCaption.ImageAlignToText = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; + this.labCaption.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("labCaption.ImageOptions.SvgImage"))); + this.labCaption.ImageOptions.SvgImageSize = new System.Drawing.Size(20, 20); + this.labCaption.Location = new System.Drawing.Point(0, 0); + this.labCaption.Margin = new System.Windows.Forms.Padding(0); + this.labCaption.Name = "labCaption"; + this.labCaption.Size = new System.Drawing.Size(841, 28); + this.labCaption.TabIndex = 0; + this.labCaption.Text = "鏈煡"; + // + // popBoxSel + // + this.popBoxSel.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnDelete)}); + this.popBoxSel.Manager = this.barManager1; + this.popBoxSel.Name = "popBoxSel"; + this.popBoxSel.CloseUp += new System.EventHandler(this.popBoxSel_CloseUp); + // + // barBtnDelete + // + this.barBtnDelete.Caption = "鍒犻櫎"; + this.barBtnDelete.Id = 0; + this.barBtnDelete.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnDelete.ImageOptions.SvgImage"))); + this.barBtnDelete.Name = "barBtnDelete"; + this.barBtnDelete.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnDelete_ItemClick); + // + // barManager1 + // + this.barManager1.DockControls.Add(this.barDockControlTop); + this.barManager1.DockControls.Add(this.barDockControlBottom); + this.barManager1.DockControls.Add(this.barDockControlLeft); + this.barManager1.DockControls.Add(this.barDockControlRight); + this.barManager1.Form = this; + this.barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { + this.barBtnDelete, + this.barBtnBoxSel, + this.barBtnClearNegative, + this.barBtnClearZero, + this.barBtnRangeDelete}); + this.barManager1.MaxItemId = 5; + // + // barDockControlTop + // + this.barDockControlTop.CausesValidation = false; + this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top; + this.barDockControlTop.Location = new System.Drawing.Point(0, 0); + this.barDockControlTop.Manager = this.barManager1; + this.barDockControlTop.Size = new System.Drawing.Size(1063, 0); + // + // barDockControlBottom + // + this.barDockControlBottom.CausesValidation = false; + this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.barDockControlBottom.Location = new System.Drawing.Point(0, 762); + this.barDockControlBottom.Manager = this.barManager1; + this.barDockControlBottom.Size = new System.Drawing.Size(1063, 0); + // + // barDockControlLeft + // + this.barDockControlLeft.CausesValidation = false; + this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left; + this.barDockControlLeft.Location = new System.Drawing.Point(0, 0); + this.barDockControlLeft.Manager = this.barManager1; + this.barDockControlLeft.Size = new System.Drawing.Size(0, 762); + // + // barDockControlRight + // + this.barDockControlRight.CausesValidation = false; + this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right; + this.barDockControlRight.Location = new System.Drawing.Point(1063, 0); + this.barDockControlRight.Manager = this.barManager1; + this.barDockControlRight.Size = new System.Drawing.Size(0, 762); + // + // barBtnBoxSel + // + this.barBtnBoxSel.Caption = "妗嗛�夊垹闄�"; + this.barBtnBoxSel.Id = 1; + this.barBtnBoxSel.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnBoxSel.ImageOptions.SvgImage"))); + this.barBtnBoxSel.Name = "barBtnBoxSel"; + this.barBtnBoxSel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnBoxSel_ItemClick); + // + // barBtnClearNegative + // + this.barBtnClearNegative.Caption = "娓呴櫎璐熷��"; + this.barBtnClearNegative.Id = 2; + this.barBtnClearNegative.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnClearNegative.ImageOptions.SvgImage"))); + this.barBtnClearNegative.Name = "barBtnClearNegative"; + this.barBtnClearNegative.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnClearNegative_ItemClick); + // + // barBtnClearZero + // + this.barBtnClearZero.Caption = "娓呴櫎闆跺��"; + this.barBtnClearZero.Id = 3; + this.barBtnClearZero.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnClearZero.ImageOptions.SvgImage"))); + this.barBtnClearZero.Name = "barBtnClearZero"; + this.barBtnClearZero.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnClearZero_ItemClick); + // + // barBtnRangeDelete + // + this.barBtnRangeDelete.Caption = "鍖洪棿鍒犻櫎"; + this.barBtnRangeDelete.Id = 4; + this.barBtnRangeDelete.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnRangeDelete.ImageOptions.SvgImage"))); + this.barBtnRangeDelete.Name = "barBtnRangeDelete"; + this.barBtnRangeDelete.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnRangeDelete_ItemClick); + // + // popMain + // + this.popMain.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnBoxSel), + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnRangeDelete), + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnClearNegative), + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnClearZero)}); + this.popMain.Manager = this.barManager1; + this.popMain.Name = "popMain"; + // + // FilterDataMgrCtrl + // + this.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.Appearance.Options.UseBackColor = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.docPnlMonitorList); + this.Controls.Add(this.barDockControlLeft); + this.Controls.Add(this.barDockControlRight); + this.Controls.Add(this.barDockControlBottom); + this.Controls.Add(this.barDockControlTop); + this.Name = "FilterDataMgrCtrl"; + this.Size = new System.Drawing.Size(1063, 762); + ((System.ComponentModel.ISupportInitialize)(this.currentViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(swiftPlotDiagram1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(swiftPlotSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dockManager1)).EndInit(); + this.docPnlMonitorList.ResumeLayout(false); + this.dockPanel1_Container.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.popBoxSel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.popMain)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private DevExpress.XtraBars.Docking.DockManager dockManager1; + private DevExpress.XtraBars.Docking.DockPanel docPnlMonitorList; + private DevExpress.XtraBars.Docking.ControlContainer dockPanel1_Container; + private MonitorPointExSignalListTreeCtrl monitorPointTreeListCtrl1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private DevExpress.XtraEditors.LabelControl labCaption; + private DevExpress.XtraCharts.ChartControl chartControl1; + private System.Windows.Forms.BindingSource currentViewModelBindingSource; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraBars.BarDockControl barDockControlLeft; + private DevExpress.XtraBars.BarManager barManager1; + private DevExpress.XtraBars.BarDockControl barDockControlTop; + private DevExpress.XtraBars.BarDockControl barDockControlBottom; + private DevExpress.XtraBars.BarDockControl barDockControlRight; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.PopupMenu popBoxSel; + private DevExpress.XtraBars.BarButtonItem barBtnBoxSel; + private DevExpress.XtraBars.BarButtonItem barBtnClearNegative; + private DevExpress.XtraBars.BarButtonItem barBtnClearZero; + private DevExpress.XtraBars.PopupMenu popMain; + private DevExpress.XtraBars.BarButtonItem barBtnRangeDelete; + } +} diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.resx" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.resx" new file mode 100644 index 0000000..716e9ec --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/FilterDataMgrPage.resx" @@ -0,0 +1,267 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="currentViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>157, 17</value> + </metadata> + <assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="labCaption.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJkCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxz + dHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQo8L3N0eWxlPg0KICA8ZyBp + ZD0iTGF5ZXJfMSI+DQogICAgPHBhdGggZD0iTTIzLjcsMTQuNGMwLjUsMC4zLDAuNSwwLjgsMCwxLjFs + LTExLjgsNy4zdjIuNmMwLDAuNiwwLjQsMC44LDAuOSwwLjVsMTYuOC0xMC40YzAuNS0wLjMsMC41LTAu + OCwwLTEuMSAgIEwxMi44LDQuMWMtMC41LTAuMy0wLjktMC4xLTAuOSwwLjV2Mi42TDIzLjcsMTQuNHoi + IGNsYXNzPSJCbHVlIiAvPg0KICAgIDxwYXRoIGQ9Ik0xOS43LDE1LjVjMC41LTAuMywwLjUtMC44LDAt + MS4xTDIuOSw0LjFDMi40LDMuOCwyLDQsMiw0LjZ2MjAuNmMwLDAuNiwwLjQsMC44LDAuOSwwLjVMMTku + NywxNS41eiIgY2xhc3M9IkJsdWUiIC8+DQogIDwvZz4NCiAgPGcgaWQ9IkxheWVyXzIiIC8+DQo8L3N2 + Zz4L +</value> + </data> + <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>535, 17</value> + </metadata> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnBoxSel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJ4BAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt + YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IkxheWVyXzEi + Pg0KICA8cmVjdCB4PSIwIiB5PSI2IiB3aWR0aD0iMzIiIGhlaWdodD0iMjIiIGZpbGw9IiMzNzdBQjUi + IC8+DQogIDxyZWN0IHg9IjIiIHk9IjcuNSIgd2lkdGg9IjI4IiBoZWlnaHQ9IjE5IiBmaWxsPSIjRkZG + RkZGIiBvcGFjaXR5PSIwLjYiIC8+DQogIDxnIGlkPSJMYXllcl80IiAvPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnClearNegative.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFECAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IlJlbW92ZUNpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0x + Niw0QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHog + TTI0LDE4SDh2LTRoMTZWMTh6IiBjbGFzcz0iUmVkIiAvPg0KICA8L2c+DQo8L3N2Zz4L +</value> + </data> + <data name="barBtnClearZero.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBlbmFibGUt + YmFja2dyb3VuZD0ibmV3IDAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaWQ9IkxheWVyXzEi + Pg0KICA8cGF0aCBkPSJNMy40LDI1LjhsNC4zLTQuM2MtMC43LTEtMS4yLTIuMi0xLjUtMy41SDAuMUMw + LjUsMjAuOSwxLjcsMjMuNiwzLjQsMjUuOHoiIGZpbGw9IiM0REFFODkiIG9wYWNpdHk9IjAuNiIgLz4N + CiAgPHBhdGggZD0iTTE0LDMxLjl2LTYuMWMtMS4zLTAuMy0yLjUtMC44LTMuNS0xLjVsLTQuMyw0LjND + OC40LDMwLjMsMTEuMSwzMS41LDE0LDMxLjl6IiBmaWxsPSIjNERBRTg5IiAvPg0KICA8cGF0aCBkPSJN + MjEuNSwyNC4zYy0xLDAuNy0yLjIsMS4yLTMuNSwxLjV2Ni4xYzIuOS0wLjQsNS42LTEuNSw3LjgtMy4y + TDIxLjUsMjQuM3oiIGZpbGw9IiM0REFFODkiIC8+DQogIDxwYXRoIGQ9Ik0xOCwwLjF2Ni4xYzEuMyww + LjMsMi41LDAuOCwzLjUsMS41bDQuMy00LjNDMjMuNiwxLjcsMjAuOSwwLjUsMTgsMC4xeiIgZmlsbD0i + IzM4N0JCNSIgLz4NCiAgPHBhdGggZD0iTTEwLjUsNy43YzEtMC43LDIuMi0xLjIsMy41LTEuNVYwLjFj + LTIuOSwwLjQtNS42LDEuNS03LjgsMy4yTDEwLjUsNy43eiIgZmlsbD0iIzM4N0JCNSIgLz4NCiAgPHBh + dGggZD0iTTAuMSwxNGg2LjFjMC4zLTEuMywwLjgtMi41LDEuNS0zLjVMMy40LDYuMkMxLjcsOC40LDAu + NSwxMS4xLDAuMSwxNHoiIGZpbGw9IiMzODdCQjUiIG9wYWNpdHk9IjAuNiIgLz4NCiAgPHBhdGggZD0i + TTQuNyw0LjdDNC43LDQuNyw0LjcsNC43LDQuNyw0LjdMNC43LDQuN3oiIC8+DQogIDxwYXRoIGQ9Ik00 + LjcsMjcuM0M0LjcsMjcuMyw0LjcsMjcuMyw0LjcsMjcuM0w0LjcsMjcuM3oiIGZpbGw9IiM0REFFODki + IC8+DQogIDxwYXRoIGQ9Ik0yNy4zLDI3LjNDMjcuMywyNy4zLDI3LjMsMjcuMywyNy4zLDI3LjNMMjcu + MywyNy4zeiIgZmlsbD0iIzREQUU4OSIgLz4NCiAgPHBhdGggZD0iTTI4LjYsNi4ybC00LjMsNC4zYzAu + NywxLDEuMiwyLjIsMS41LDMuNWg2LjFDMzEuNSwxMS4xLDMwLjMsOC40LDI4LjYsNi4yeiIgZmlsbD0i + IzM4N0JCNSIgb3BhY2l0eT0iMC42IiAvPg0KICA8cGF0aCBkPSJNMjcuMyw0LjdDMjcuMyw0LjcsMjcu + Myw0LjcsMjcuMyw0LjdMMjcuMyw0Ljd6IiAvPg0KICA8cGF0aCBkPSJNMzEuOSwxOGgtNi4xYy0wLjMs + MS4zLTAuOCwyLjUtMS41LDMuNWw0LjMsNC4zQzMwLjMsMjMuNiwzMS41LDIwLjksMzEuOSwxOHoiIGZp + bGw9IiM0REFFODkiIG9wYWNpdHk9IjAuNiIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnRangeDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi42 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABAFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iR3JpZENvbHVt + bkZpdFRvQ29udGVudCI+DQogICAgPHBhdGggZD0iTTI0LDMydi00SDh2NGwtNS01bDUtNXY0aDE2di00 + bDUsNUwyNCwzMnogTTIsMjJIMHYxMGgyVjIyeiBNMzIsMjJoLTJ2MTBoMlYyMnoiIGNsYXNzPSJCbGFj + ayIgLz4NCiAgICA8cGF0aCBkPSJNMjEuNywxMmMwLjIsMC4yLDAuMywwLjUsMC4zLDAuOWMwLDAuNC0w + LjEsMC43LTAuMywxcy0wLjUsMC40LTAuOSwwLjRoLTAuOXYtMi42aDEgICBDMjEuMiwxMS43LDIxLjUs + MTEuOCwyMS43LDEyeiBNMjEuNCw5LjdjMC4yLTAuMiwwLjMtMC41LDAuMy0wLjljMC0wLjgtMC40LTEu + Mi0xLjMtMS4yaC0wLjd2Mi40aDAuOEMyMSwxMC4xLDIxLjIsOS45LDIxLjQsOS43eiAgICBNMTIuMSw3 + LjhjMC0wLjEsMC0wLjIsMC0wLjJoMGMtMC4xLDAuNi0wLjIsMS0wLjIsMS4yTDExLDEySDEzbC0wLjct + My4xQzEyLjIsOC42LDEyLjEsOC4zLDEyLjEsNy44eiBNMzIsM3YxNmMwLDAuNS0wLjUsMS0xLDFIMSAg + IGMtMC41LDAtMS0wLjUtMS0xVjNjMC0wLjUsMC41LTEsMS0xaDMwQzMxLjUsMiwzMiwyLjUsMzIsM3og + TTE2LDE2TDEzLjIsNmgtMi4zTDgsMTZoMi4xbDAuNi0yLjVoMi42bDAuNiwyLjVIMTZ6IE0yNCwxMyAg + IGMwLTAuNi0wLjItMS4xLTAuNS0xLjZjLTAuMy0wLjQtMC44LTAuNy0xLjMtMC44djBjMC41LTAuMSww + LjgtMC40LDEuMS0wLjhjMC4zLTAuNCwwLjQtMC45LDAuNC0xLjRjMC0xLjYtMC45LTIuNC0yLjgtMi40 + SDE4djEwICAgaDMuMWMwLjksMCwxLjYtMC4zLDIuMS0wLjhDMjMuOCwxNC43LDI0LDEzLjksMjQsMTN6 + IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <metadata name="popBoxSel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>403, 17</value> + </metadata> + <metadata name="popMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>666, 17</value> + </metadata> +</root> \ No newline at end of file diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.cs" new file mode 100644 index 0000000..c105882 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.cs" @@ -0,0 +1,312 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using DevExpress.XtraEditors; +using DevExpress.Utils; +using IStation.Untity; + + +namespace IStation.WinFormUI.MonitorDataSet +{ + /// <summary> + /// 娴嬬偣鏍戝垪琛ㄦ帶浠� + /// </summary> + public partial class MonitorPointExSignalListTreeCtrl : XtraUserControl + { + public MonitorPointExSignalListTreeCtrl() + { + InitializeComponent(); + this.treeList1.InitialDefaultSettings(); + this.treeList1.SelectImageList = CurrentViewModel.Image16Store; + this.layoutControl1.SetupLayoutControl(); + } + + #region 褰撳墠瑙嗗浘 + + public class CurrentViewModel + { + public CurrentViewModel() { } + public CurrentViewModel(Model.MonitorPointGroup rhs) + { + this.ID = $"{IStation.ObjectType.MonitorPointGroup}_{rhs.Id}"; + this.ParentID = $"{IStation.ObjectType.MonitorPointGroup}_{TreeParentIdsHelper.GetLastParentID(rhs.ParentIds)}"; + this.Name = rhs.Name; + this.ObjectType = IStation.ObjectType.MonitorPointGroup; + this.ObjectID = rhs.Id; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.ImageIndex = 0; + this.Model = rhs; + } + + public CurrentViewModel(Model.MonitorPointExSignalList rhs) + { + this.ID = $"{IStation.ObjectType.MonitorPoint}_{rhs.Id}"; + this.ParentID = $"{IStation.ObjectType.MonitorPointGroup}_{rhs.GroupId}"; + this.Name = rhs.Name; + this.ObjectType = IStation.ObjectType.MonitorPoint; + this.ObjectID = rhs.Id; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + this.ImageIndex = 1; + this.Model = rhs; + } + + public string ID { get; set; } + public string ParentID { get; set; } + public string Name { get; set; } + public string ObjectType { get; set; } + public long ObjectID { get; set; } + public int SortCode { get; set; } + public string Description { get; set; } + public int ImageIndex { get; set; } + public object Model { get; set; } + + /// <summary> + /// 鍥炬爣浠撳簱 + /// </summary> + public static ImageCollection Image16Store + { + get + { + if (_image16Store == null) + { + _image16Store = new ImageCollection(); + _image16Store.ImageSize = new Size(16, 16); + _image16Store.Images.Add(WinFormUI.Properties.Resource.Group, "Group"); + _image16Store.Images.Add(WinFormUI.Properties.Resource.MonitorPoint, "MonitorPoint"); + //_image16Store.Images.Add(WinFormUI.Properties.Resource.Signal, "Signal"); + } + return _image16Store; + } + } + private static ImageCollection _image16Store; + + public static Image Get16ObjectTypeImage(string objectType) + { + + Image img = null; + switch (objectType) + { + case IStation.ObjectType.MonitorPointGroup: img = Image16Store.Images["Group"]; break; + case IStation.ObjectType.MonitorPoint: img = Image16Store.Images["MonitorPoint"]; break; + case IStation.ObjectType.Signal: img = Image16Store.Images["Signal"]; break; + } + + if (img == null) + img = Image16Store.Images["Question"]; + return img; + } + + //鑾峰彇 + public static int Get16ObjectTypeImageIndex(string objectId) + { + var img = Get16ObjectTypeImage(objectId); + return Image16Store.Images.IndexOf(img); + } + + } + + #endregion + + /// <summary> + /// 鑱氱劍鏀瑰彉浜嬩欢 + /// </summary> + public event Action<string, object> FocusedChangedEvent; + + /// <summary> + /// 閫夋嫨浜嬩欢 + /// </summary> + public event Action<string, object, MouseEventArgs> SelectEvent; + + private long _projectId;//椤圭洰鏍囪瘑 + private List<CurrentViewModel> _allBindingList = null;//鎵�鏈夌粦瀹氬垪琛� + private CurrentViewModel _focused = null;//褰撳墠鑱氱劍 + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(long projectId) + { + _projectId = projectId; + var group_list = new BLL.MonitorPointGroup().GetAll(_projectId); + var point_list = new BLL.MonitorPoint().GetExSignalList(_projectId); + this.SetBindingData(group_list, point_list); + } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(long projectId, string belongType, long belongId) + { + _projectId = projectId; + var group_list = new BLL.MonitorPointGroup().GetByBelongTypeAndBelongId(_projectId,belongType,belongId); + var point_list = new BLL.MonitorPoint().GetExSignalListByBelongTypeAndBelongId(_projectId, belongType,belongId); + this.SetBindingData(group_list, point_list); + } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(List<Model.MonitorPointGroup> group_list, List<Model.MonitorPointExSignalList> point_list) + { + _allBindingList = new List<CurrentViewModel>(); + if (group_list != null && group_list.Count > 0) + { + group_list = group_list.OrderBy(x => x.SortCode).ToList(); + group_list.ForEach(x => _allBindingList.Add(new CurrentViewModel(x))); + } + else + { + var group = new Model.MonitorPointGroup(); + group.Id = -1; + group.Name = "鏈垎缁�"; + group.SortCode = int.MaxValue; + group.Description = "铏氭嫙鍒嗙粍"; + _allBindingList.Add(new CurrentViewModel(group)); + } + + if (point_list != null && point_list.Count > 0) + { + point_list = point_list.OrderBy(x => x.SortCode).ToList(); + foreach (var point in point_list) + { + _allBindingList.Add(new CurrentViewModel(point)); + } + } + + this.treeList1.DataSource = _allBindingList; + this.treeList1.ForceInitialize(); + this.treeList1.ExpandAll(); + if (_allBindingList.Count < 1) + { + if (_focused != null) + { + _focused = null; + this.FocusedChangedEvent?.Invoke(string.Empty, null); + } + } + } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(long projectId, long groupId) + { + if (groupId < 1) + return; + _allBindingList = new List<CurrentViewModel>(); + var group = new BLL.MonitorPointGroup().GetById(projectId, groupId); + _allBindingList.Add(new CurrentViewModel(group)); + var point_list = new BLL.MonitorPoint().GetExSignalListByGroupId(projectId, groupId); + if (point_list != null && point_list.Count > 0) + { + point_list = point_list.OrderBy(x => x.SortCode).ToList(); + point_list.ForEach(x => _allBindingList.Add(new CurrentViewModel(x))); + } + this.treeList1.DataSource = _allBindingList; + this.treeList1.ForceInitialize(); + this.treeList1.ExpandAll(); + if (_allBindingList.Count < 1) + { + if (_focused != null) + { + _focused = null; + this.FocusedChangedEvent?.Invoke(string.Empty, null); + } + } + } + + + /// <summary> + /// 鑾峰彇鑱氱劍 + /// </summary> + public object GetFocused() + { + var vm = this.treeList1.GetFocusedRow() as CurrentViewModel; + return vm?.Model; + } + + /// <summary> + /// 璁剧疆鑱氱劍 + /// </summary> + public bool SetFocused(string objectType,long objectId) + { + var key = $"{objectType}_{objectId}"; + var node = this.treeList1.FindNodeByKeyID(key); + if (node == null) + return false; + this.treeList1.FocusedNode = node; + return true; + } + + + //鍏ㄩ儴灞曞紑 + private void barBtnExpandAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.ExpandAll(); + } + + //鍏ㄩ儴鎶樺彔 + private void barBtnCollpseAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.CollapseAll(); + } + + //妫�绱紙menu锛� + private void barBtnSearch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (this.layoutControlItem1.Visibility == DevExpress.XtraLayout.Utils.LayoutVisibility.Always) + this.layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + else + this.layoutControlItem1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; + } + + //鏍戠嚎 + private void barCkTreeLine_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.treeList1.OptionsView.ShowTreeLines = this.barCkTreeLine.Checked ? DefaultBoolean.True : DefaultBoolean.False; + } + + //鑱氱劍鏀瑰彉 + private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) + { + var vm = this.treeList1.GetFocusedRow() as CurrentViewModel; + this.FocusedChangedEvent?.Invoke(vm.ObjectType, vm?.Model); + } + + //榧犳爣鐐瑰嚮 + private void treeList1_RowCellClick(object sender, DevExpress.XtraTreeList.RowCellClickEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + var vm = this.treeList1.GetDataRecordByNode(e.Node) as CurrentViewModel; + this.SelectEvent?.Invoke(vm.ObjectType, vm.Model, e); + } + } + + + public List<Model.MonitorPointGroup> GetMonitorPointGroups() + { + if (_allBindingList == null || _allBindingList.Count < 1) + return default; + return _allBindingList.Where(x => x.ObjectType == IStation.ObjectType.MonitorPointGroup).Select(x => x.Model as Model.MonitorPointGroup).ToList(); + } + + public List<Model.MonitorPointExSignalList> GetMonitorPointExSignalList() + { + if (_allBindingList == null || _allBindingList.Count < 1) + return default; + return _allBindingList.Where(x => x.ObjectType == IStation.ObjectType.MonitorPoint).Select(x => x.Model as Model.MonitorPointExSignalList).ToList(); + } + + + } + +} diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.designer.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.designer.cs" new file mode 100644 index 0000000..a0d2628 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.designer.cs" @@ -0,0 +1,310 @@ +锘縩amespace IStation.WinFormUI.MonitorDataSet +{ + partial class MonitorPointExSignalListTreeCtrl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MonitorPointExSignalListTreeCtrl)); + this.barManager1 = new DevExpress.XtraBars.BarManager(this.components); + this.bar1 = new DevExpress.XtraBars.Bar(); + this.barBtnExpandAll = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnCollpseAll = new DevExpress.XtraBars.BarButtonItem(); + this.barBtnSearchBox = new DevExpress.XtraBars.BarButtonItem(); + this.barCkTreeLine = new DevExpress.XtraBars.BarCheckItem(); + this.barDockControlTop = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); + this.barDockControlRight = new DevExpress.XtraBars.BarDockControl(); + this.barRoot = new DevExpress.XtraBars.BarSubItem(); + this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + this.searchControl1 = new DevExpress.XtraEditors.SearchControl(); + this.treeList1 = new DevExpress.XtraTreeList.TreeList(); + this.colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.barRootBasicInfoMgr = new DevExpress.XtraBars.BarSubItem(); + ((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); + this.layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.searchControl1.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.treeList1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + this.SuspendLayout(); + // + // barManager1 + // + this.barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] { + this.bar1}); + this.barManager1.Categories.AddRange(new DevExpress.XtraBars.BarManagerCategory[] { + new DevExpress.XtraBars.BarManagerCategory("Menu", new System.Guid("66025f6c-663a-4ef4-927a-145971e982ee"))}); + this.barManager1.DockControls.Add(this.barDockControlTop); + this.barManager1.DockControls.Add(this.barDockControlBottom); + this.barManager1.DockControls.Add(this.barDockControlLeft); + this.barManager1.DockControls.Add(this.barDockControlRight); + this.barManager1.Form = this; + this.barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { + this.barBtnExpandAll, + this.barBtnCollpseAll, + this.barBtnSearchBox, + this.barCkTreeLine}); + this.barManager1.MaxItemId = 36; + // + // bar1 + // + this.bar1.BarName = "Custom 2"; + this.bar1.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Top; + this.bar1.DockCol = 0; + this.bar1.DockRow = 0; + this.bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + this.bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnExpandAll), + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnCollpseAll), + new DevExpress.XtraBars.LinkPersistInfo(this.barBtnSearchBox), + new DevExpress.XtraBars.LinkPersistInfo(this.barCkTreeLine)}); + this.bar1.OptionsBar.AllowQuickCustomization = false; + this.bar1.OptionsBar.DrawDragBorder = false; + this.bar1.OptionsBar.MultiLine = true; + this.bar1.OptionsBar.UseWholeRow = true; + this.bar1.Text = "Custom 2"; + // + // barBtnExpandAll + // + this.barBtnExpandAll.Caption = "鍏ㄩ儴灞曞紑"; + this.barBtnExpandAll.CategoryGuid = new System.Guid("66025f6c-663a-4ef4-927a-145971e982ee"); + this.barBtnExpandAll.Id = 8; + this.barBtnExpandAll.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnExpandAll.ImageOptions.SvgImage"))); + this.barBtnExpandAll.Name = "barBtnExpandAll"; + this.barBtnExpandAll.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnExpandAll_ItemClick); + // + // barBtnCollpseAll + // + this.barBtnCollpseAll.Caption = "鍏ㄩ儴鎶樺彔"; + this.barBtnCollpseAll.CategoryGuid = new System.Guid("66025f6c-663a-4ef4-927a-145971e982ee"); + this.barBtnCollpseAll.Id = 9; + this.barBtnCollpseAll.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnCollpseAll.ImageOptions.SvgImage"))); + this.barBtnCollpseAll.Name = "barBtnCollpseAll"; + this.barBtnCollpseAll.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnCollpseAll_ItemClick); + // + // barBtnSearchBox + // + this.barBtnSearchBox.Caption = "鎼滅储妗�"; + this.barBtnSearchBox.CategoryGuid = new System.Guid("66025f6c-663a-4ef4-927a-145971e982ee"); + this.barBtnSearchBox.Id = 10; + this.barBtnSearchBox.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barBtnSearchBox.ImageOptions.SvgImage"))); + this.barBtnSearchBox.Name = "barBtnSearchBox"; + this.barBtnSearchBox.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barBtnSearch_ItemClick); + // + // barCkTreeLine + // + this.barCkTreeLine.Caption = "鏍戠嚎"; + this.barCkTreeLine.CategoryGuid = new System.Guid("66025f6c-663a-4ef4-927a-145971e982ee"); + this.barCkTreeLine.Id = 13; + this.barCkTreeLine.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("barCkTreeLine.ImageOptions.SvgImage"))); + this.barCkTreeLine.Name = "barCkTreeLine"; + this.barCkTreeLine.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.barCkTreeLine_CheckedChanged); + // + // barDockControlTop + // + this.barDockControlTop.CausesValidation = false; + this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top; + this.barDockControlTop.Location = new System.Drawing.Point(0, 0); + this.barDockControlTop.Manager = this.barManager1; + this.barDockControlTop.Size = new System.Drawing.Size(239, 24); + // + // barDockControlBottom + // + this.barDockControlBottom.CausesValidation = false; + this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.barDockControlBottom.Location = new System.Drawing.Point(0, 569); + this.barDockControlBottom.Manager = this.barManager1; + this.barDockControlBottom.Size = new System.Drawing.Size(239, 0); + // + // barDockControlLeft + // + this.barDockControlLeft.CausesValidation = false; + this.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left; + this.barDockControlLeft.Location = new System.Drawing.Point(0, 24); + this.barDockControlLeft.Manager = this.barManager1; + this.barDockControlLeft.Size = new System.Drawing.Size(0, 545); + // + // barDockControlRight + // + this.barDockControlRight.CausesValidation = false; + this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right; + this.barDockControlRight.Location = new System.Drawing.Point(239, 24); + this.barDockControlRight.Manager = this.barManager1; + this.barDockControlRight.Size = new System.Drawing.Size(0, 545); + // + // barRoot + // + this.barRoot.Caption = "barSubItem1"; + this.barRoot.Id = 17; + this.barRoot.Name = "barRoot"; + // + // layoutControl1 + // + this.layoutControl1.Controls.Add(this.searchControl1); + this.layoutControl1.Controls.Add(this.treeList1); + this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.layoutControl1.Location = new System.Drawing.Point(0, 24); + this.layoutControl1.Name = "layoutControl1"; + this.layoutControl1.Root = this.Root; + this.layoutControl1.Size = new System.Drawing.Size(239, 545); + this.layoutControl1.TabIndex = 6; + this.layoutControl1.Text = "layoutControl1"; + // + // searchControl1 + // + this.searchControl1.Client = this.treeList1; + this.searchControl1.Location = new System.Drawing.Point(0, 2); + this.searchControl1.Name = "searchControl1"; + this.searchControl1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Repository.ClearButton(), + new DevExpress.XtraEditors.Repository.SearchButton()}); + this.searchControl1.Properties.Client = this.treeList1; + this.searchControl1.Properties.FilterCondition = DevExpress.Data.Filtering.FilterCondition.Contains; + this.searchControl1.Size = new System.Drawing.Size(239, 20); + this.searchControl1.StyleController = this.layoutControl1; + this.searchControl1.TabIndex = 8; + // + // treeList1 + // + this.treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { + this.colName}); + this.treeList1.Location = new System.Drawing.Point(0, 24); + this.treeList1.Name = "treeList1"; + this.treeList1.OptionsBehavior.Editable = false; + this.treeList1.OptionsBehavior.ReadOnly = true; + this.treeList1.OptionsMenu.EnableNodeMenu = false; + this.treeList1.OptionsSelection.EnableAppearanceFocusedCell = false; + this.treeList1.OptionsView.FocusRectStyle = DevExpress.XtraTreeList.DrawFocusRectStyle.None; + this.treeList1.Size = new System.Drawing.Size(239, 519); + this.treeList1.TabIndex = 7; + this.treeList1.ViewStyle = DevExpress.XtraTreeList.TreeListViewStyle.TreeView; + this.treeList1.RowCellClick += new DevExpress.XtraTreeList.RowCellClickEventHandler(this.treeList1_RowCellClick); + this.treeList1.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(this.treeList1_FocusedNodeChanged); + // + // colName + // + this.colName.Caption = "鍚嶇О"; + this.colName.FieldName = "Name"; + this.colName.MinWidth = 23; + this.colName.Name = "colName"; + this.colName.Visible = true; + this.colName.VisibleIndex = 0; + this.colName.Width = 87; + // + // Root + // + this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.Root.GroupBordersVisible = false; + this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem1, + this.layoutControlItem2}); + this.Root.Name = "Root"; + this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); + this.Root.Size = new System.Drawing.Size(239, 545); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.searchControl1; + this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 2, 1); + this.layoutControlItem1.Size = new System.Drawing.Size(239, 23); + this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem1.TextVisible = false; + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.treeList1; + this.layoutControlItem2.Location = new System.Drawing.Point(0, 23); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 1, 2); + this.layoutControlItem2.Size = new System.Drawing.Size(239, 522); + this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem2.TextVisible = false; + // + // barRootBasicInfoMgr + // + this.barRootBasicInfoMgr.Caption = "barSubItem1"; + this.barRootBasicInfoMgr.Id = 20; + this.barRootBasicInfoMgr.Name = "barRootBasicInfoMgr"; + // + // CorpTreeListCtrl + // + this.Appearance.BackColor = System.Drawing.SystemColors.Control; + this.Appearance.Options.UseBackColor = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.layoutControl1); + this.Controls.Add(this.barDockControlLeft); + this.Controls.Add(this.barDockControlRight); + this.Controls.Add(this.barDockControlBottom); + this.Controls.Add(this.barDockControlTop); + this.Name = "CorpTreeListCtrl"; + this.Size = new System.Drawing.Size(239, 569); + ((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); + this.layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.searchControl1.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.treeList1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private DevExpress.XtraBars.BarManager barManager1; + private DevExpress.XtraBars.BarDockControl barDockControlTop; + private DevExpress.XtraBars.BarDockControl barDockControlBottom; + private DevExpress.XtraBars.BarDockControl barDockControlLeft; + private DevExpress.XtraBars.BarDockControl barDockControlRight; + private DevExpress.XtraBars.Bar bar1; + private DevExpress.XtraBars.BarButtonItem barBtnExpandAll; + private DevExpress.XtraBars.BarButtonItem barBtnCollpseAll; + private DevExpress.XtraBars.BarButtonItem barBtnSearchBox; + private DevExpress.XtraBars.BarCheckItem barCkTreeLine; + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.SearchControl searchControl1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraBars.BarSubItem barRoot; + private DevExpress.XtraBars.BarSubItem barRootBasicInfoMgr; + } +} diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.resx" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.resx" new file mode 100644 index 0000000..314adb2 --- /dev/null +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\225\260\346\215\256\347\255\233\346\237\245/MonitorPointExSignalListTreeCtrl.resx" @@ -0,0 +1,204 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="barManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>29, 18</value> + </metadata> + <assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barBtnExpandAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAALACAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iRXhwYW5kX0ZpZWxkIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3 + IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDojNzI3Mjcy + O30KCS5HcmVlbntmaWxsOiMwMzlDMjM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cG9seWdvbiBwb2ludHM9IjE0LDYgMTAsNiAxMCwyIDYsMiA2LDYgMiw2IDIsMTAgNiwxMCA2LDE0IDEw + LDE0IDEwLDEwIDE0LDEwICIgY2xhc3M9IkdyZWVuIiAvPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8 + cGF0aCBkPSJNMjIsNmgxMHYySDIyVjZ6IE0yMiwxMmgxMHYtMkgyMlYxMnogTTIyLDIwaDEwdi0ySDIy + VjIweiBNMjIsMjRoMTB2LTJIMjJWMjR6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGgg + ZD0iTTE4LDJoMTR2MkgxOFYyeiBNMTgsMTZoMTR2LTJIMThWMTZ6IE0xOCwyOGgxNHYtMkgxOFYyOHoi + IGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnCollpseAll.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJUCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iQ29sbGFwc2VfRmllbGQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpu + ZXcgMCAwIDMyIDMyIj4NCiAgPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5CbGFja3tmaWxsOiM3Mjcy + NzI7fQoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLnN0MHtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8 + cmVjdCB4PSIyIiB5PSI2IiB3aWR0aD0iMTIiIGhlaWdodD0iNCIgcng9IjAiIHJ5PSIwIiBjbGFzcz0i + UmVkIiAvPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8cGF0aCBkPSJNMjIsNmgxMHYySDIyVjZ6IE0y + MiwxMmgxMHYtMkgyMlYxMnogTTIyLDIwaDEwdi0ySDIyVjIweiBNMjIsMjRoMTB2LTJIMjJWMjR6IiBj + bGFzcz0iQmxhY2siIC8+DQogIDwvZz4NCiAgPHBhdGggZD0iTTE4LDJoMTR2MkgxOFYyeiBNMTgsMTZo + MTR2LTJIMThWMTZ6IE0xOCwyOGgxNHYtMkgxOFYyOHoiIGNsYXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnSearchBox.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM + MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5 + YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu + MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x + LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> + <data name="barCkTreeLine.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIkDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku + QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC + MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iSW5zZXJ0VHJl + ZVZpZXciPg0KICAgIDxwYXRoIGQ9Ik0xMyw4SDVDNC40LDgsNCw3LjYsNCw3VjNjMC0wLjUsMC40LTEs + MS0xaDhjMC42LDAsMSwwLjUsMSwxdjRDMTQsNy42LDEzLjYsOCwxMyw4eiBNMjYsMTd2LTQgICBjMC0w + LjYtMC41LTEtMS0xaC04Yy0wLjUsMC0xLDAuNC0xLDF2NGMwLDAuNSwwLjUsMSwxLDFoOEMyNS41LDE4 + LDI2LDE3LjUsMjYsMTd6IE0yNiwyN3YtNGMwLTAuNS0wLjUtMS0xLTFoLThjLTAuNSwwLTEsMC41LTEs + MSAgIHY0YzAsMC41LDAuNSwxLDEsMWg4QzI1LjUsMjgsMjYsMjcuNSwyNiwyN3oiIGNsYXNzPSJZZWxs + b3ciIC8+DQogICAgPHBvbHlnb24gcG9pbnRzPSIxNCwxNiAxNCwxNCAxMCwxNCAxMCwxMCA4LDEwIDgs + MjYgMTQsMjYgMTQsMjQgMTAsMjQgMTAsMTYgICIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2 + Zz4L +</value> + </data> +</root> \ No newline at end of file diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.Designer.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.Designer.cs" index 24e3557..b1eaebc 100644 --- "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.Designer.cs" +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.Designer.cs" @@ -554,8 +554,8 @@ createRotatedBarChartItem1.Hint = "Insert a bar chart.\r\n\r\nBar charts are the best chart type for comparing multiple " + "values."; createRotatedFullStackedBarChartItem1.Caption = "100% Stacked Bar"; - createRotatedFullStackedBarChartItem1.Description = resources.QueryString("createRotatedFullStackedBarChartItem1.Description"); - createRotatedFullStackedBarChartItem1.Hint = resources.QueryString("createRotatedFullStackedBarChartItem1.Hint"); + createRotatedFullStackedBarChartItem1.Description = resources.GetString("createRotatedFullStackedBarChartItem1.Description"); + createRotatedFullStackedBarChartItem1.Hint = resources.GetString("createRotatedFullStackedBarChartItem1.Hint"); createRotatedSideBySideFullStackedBarChartItem1.Caption = "Clustered 100% Stacked Bar"; createRotatedSideBySideFullStackedBarChartItem1.Description = "Combine the advantages of both the 100% Stacked Bar and Clustered Bar chart types" + ", so you can stack different bars, and combine them into groups across the same " + @@ -643,11 +643,11 @@ createStackedSplineAreaChartItem1, createStepAreaChartItem1}); createArea3DChartItem1.Caption = "3-D Area"; - createArea3DChartItem1.Description = resources.QueryString("createArea3DChartItem1.Description"); - createArea3DChartItem1.Hint = resources.QueryString("createArea3DChartItem1.Hint"); + createArea3DChartItem1.Description = resources.GetString("createArea3DChartItem1.Description"); + createArea3DChartItem1.Hint = resources.GetString("createArea3DChartItem1.Hint"); createFullStackedArea3DChartItem1.Caption = "100% Stacked Area in 3-D"; - createFullStackedArea3DChartItem1.Description = resources.QueryString("createFullStackedArea3DChartItem1.Description"); - createFullStackedArea3DChartItem1.Hint = resources.QueryString("createFullStackedArea3DChartItem1.Hint"); + createFullStackedArea3DChartItem1.Description = resources.GetString("createFullStackedArea3DChartItem1.Description"); + createFullStackedArea3DChartItem1.Hint = resources.GetString("createFullStackedArea3DChartItem1.Hint"); createFullStackedSplineArea3DChartItem1.Caption = "100% Stacked Spline Area in 3-D"; createFullStackedSplineArea3DChartItem1.Description = "Behave similar to 100% Stacked Area Chart in 3D, but plot a fitted curve through " + "each data point in a series."; @@ -704,20 +704,20 @@ createPointChartItem1, createBubbleChartItem1}); createFunnelChartItem1.Caption = "Funnel"; - createFunnelChartItem1.Description = resources.QueryString("createFunnelChartItem1.Description"); - createFunnelChartItem1.Hint = resources.QueryString("createFunnelChartItem1.Hint"); + createFunnelChartItem1.Description = resources.GetString("createFunnelChartItem1.Description"); + createFunnelChartItem1.Hint = resources.GetString("createFunnelChartItem1.Hint"); createFunnel3DChartItem1.Caption = "3-D Funnel"; - createFunnel3DChartItem1.Description = resources.QueryString("createFunnel3DChartItem1.Description"); - createFunnel3DChartItem1.Hint = resources.QueryString("createFunnel3DChartItem1.Hint"); + createFunnel3DChartItem1.Description = resources.GetString("createFunnel3DChartItem1.Description"); + createFunnel3DChartItem1.Hint = resources.GetString("createFunnel3DChartItem1.Hint"); chartControlCommandGalleryItemGroupFunnel1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createFunnelChartItem1, createFunnel3DChartItem1}); createStockChartItem1.Caption = "Stock"; - createStockChartItem1.Description = resources.QueryString("createStockChartItem1.Description"); - createStockChartItem1.Hint = resources.QueryString("createStockChartItem1.Hint"); + createStockChartItem1.Description = resources.GetString("createStockChartItem1.Description"); + createStockChartItem1.Hint = resources.GetString("createStockChartItem1.Hint"); createCandleStickChartItem1.Caption = "Candle Stick"; - createCandleStickChartItem1.Description = resources.QueryString("createCandleStickChartItem1.Description"); - createCandleStickChartItem1.Hint = resources.QueryString("createCandleStickChartItem1.Hint"); + createCandleStickChartItem1.Description = resources.GetString("createCandleStickChartItem1.Description"); + createCandleStickChartItem1.Hint = resources.GetString("createCandleStickChartItem1.Hint"); chartControlCommandGalleryItemGroupFinancial1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createStockChartItem1, createCandleStickChartItem1}); @@ -737,11 +737,11 @@ createRadarAreaChartItem1.Hint = "Displays series as filled area on a circular grid that has multiple axes along wh" + "ich data can be plotted."; createRadarRangeAreaChartItem1.Caption = "Radar Range Area"; - createRadarRangeAreaChartItem1.Description = resources.QueryString("createRadarRangeAreaChartItem1.Description"); - createRadarRangeAreaChartItem1.Hint = resources.QueryString("createRadarRangeAreaChartItem1.Hint"); + createRadarRangeAreaChartItem1.Description = resources.GetString("createRadarRangeAreaChartItem1.Description"); + createRadarRangeAreaChartItem1.Hint = resources.GetString("createRadarRangeAreaChartItem1.Hint"); createScatterRadarLineChartItem1.Caption = "Scatter Radar Line"; - createScatterRadarLineChartItem1.Description = resources.QueryString("createScatterRadarLineChartItem1.Description"); - createScatterRadarLineChartItem1.Hint = resources.QueryString("createScatterRadarLineChartItem1.Hint"); + createScatterRadarLineChartItem1.Description = resources.GetString("createScatterRadarLineChartItem1.Description"); + createScatterRadarLineChartItem1.Hint = resources.GetString("createScatterRadarLineChartItem1.Hint"); chartControlCommandGalleryItemGroupRadar1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createRadarPointChartItem1, createRadarLineChartItem1, @@ -762,11 +762,11 @@ createPolarAreaChartItem1.Description = "Displays series as filled area on a circular diagram on the basis of angles."; createPolarAreaChartItem1.Hint = "Displays series as filled area on a circular diagram on the basis of angles."; createPolarRangeAreaChartItem1.Caption = "Polar Range Area"; - createPolarRangeAreaChartItem1.Description = resources.QueryString("createPolarRangeAreaChartItem1.Description"); - createPolarRangeAreaChartItem1.Hint = resources.QueryString("createPolarRangeAreaChartItem1.Hint"); + createPolarRangeAreaChartItem1.Description = resources.GetString("createPolarRangeAreaChartItem1.Description"); + createPolarRangeAreaChartItem1.Hint = resources.GetString("createPolarRangeAreaChartItem1.Hint"); createScatterPolarLineChartItem1.Caption = "Scatter Polar Line"; - createScatterPolarLineChartItem1.Description = resources.QueryString("createScatterPolarLineChartItem1.Description"); - createScatterPolarLineChartItem1.Hint = resources.QueryString("createScatterPolarLineChartItem1.Hint"); + createScatterPolarLineChartItem1.Description = resources.GetString("createScatterPolarLineChartItem1.Description"); + createScatterPolarLineChartItem1.Hint = resources.GetString("createScatterPolarLineChartItem1.Hint"); chartControlCommandGalleryItemGroupPolar1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createPolarPointChartItem1, createPolarLineChartItem1, @@ -784,11 +784,11 @@ createSideBySideRangeBarChartItem1.Hint = "Show activity columns from different series grouped by their arguments. Each colu" + "mn represents a range of data with two values for each argument value."; createRangeAreaChartItem1.Caption = "Range Area"; - createRangeAreaChartItem1.Description = resources.QueryString("createRangeAreaChartItem1.Description"); - createRangeAreaChartItem1.Hint = resources.QueryString("createRangeAreaChartItem1.Hint"); + createRangeAreaChartItem1.Description = resources.GetString("createRangeAreaChartItem1.Description"); + createRangeAreaChartItem1.Hint = resources.GetString("createRangeAreaChartItem1.Hint"); createRangeArea3DChartItem1.Caption = "Range Area in 3-D"; - createRangeArea3DChartItem1.Description = resources.QueryString("createRangeArea3DChartItem1.Description"); - createRangeArea3DChartItem1.Hint = resources.QueryString("createRangeArea3DChartItem1.Hint"); + createRangeArea3DChartItem1.Description = resources.GetString("createRangeArea3DChartItem1.Description"); + createRangeArea3DChartItem1.Hint = resources.GetString("createRangeArea3DChartItem1.Hint"); chartControlCommandGalleryItemGroupRange1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createRangeBarChartItem1, createSideBySideRangeBarChartItem1, @@ -798,14 +798,14 @@ createGanttChartItem1.Description = "Track different activities during the time frame."; createGanttChartItem1.Hint = "Track different activities during the time frame."; createSideBySideGanttChartItem1.Caption = "Clustered Gantt"; - createSideBySideGanttChartItem1.Description = resources.QueryString("createSideBySideGanttChartItem1.Description"); - createSideBySideGanttChartItem1.Hint = resources.QueryString("createSideBySideGanttChartItem1.Hint"); + createSideBySideGanttChartItem1.Description = resources.GetString("createSideBySideGanttChartItem1.Description"); + createSideBySideGanttChartItem1.Hint = resources.GetString("createSideBySideGanttChartItem1.Hint"); chartControlCommandGalleryItemGroupGantt1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createGanttChartItem1, createSideBySideGanttChartItem1}); createBoxPlotChartItem1.Caption = "BoxPlot"; - createBoxPlotChartItem1.Description = resources.QueryString("createBoxPlotChartItem1.Description"); - createBoxPlotChartItem1.Hint = resources.QueryString("createBoxPlotChartItem1.Hint"); + createBoxPlotChartItem1.Description = resources.GetString("createBoxPlotChartItem1.Description"); + createBoxPlotChartItem1.Hint = resources.GetString("createBoxPlotChartItem1.Hint"); chartControlCommandGalleryItemGroupBoxPlot1.Items.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItem[] { createBoxPlotChartItem1}); this.commandBarGalleryDropDown6.Gallery.Groups.AddRange(new DevExpress.XtraBars.Ribbon.GalleryItemGroup[] { diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.cs" index aa0ad5f..1905ca4 100644 --- "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.cs" +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareChartMgr.cs" @@ -43,7 +43,7 @@ private long _projectId; private long _sceneId; - private Model.LogicTreeEx _logic; + private Model.LogicTree _logic; private SwiftPlotDiagram _diagram { @@ -53,14 +53,14 @@ /// <summary> /// 鍒濆鍖栨暟鎹� /// </summary> - public void InitialDataSource(long projectId,long sceneId, Model.LogicTreeEx logic) + public void InitialDataSource(long projectId,long sceneId, Model.LogicTree logic) { _projectId = projectId; _sceneId = sceneId; SetBindingData(logic); } - private void SetBindingData(Model.LogicTreeEx obj) + private void SetBindingData(Model.LogicTree obj) { _logic = obj; if (_logic == null) @@ -78,7 +78,7 @@ var signal = obj.SignalList.First(); var lays = this.chartControl1.ShowOverlay(); - var packet = new BLL.MonitorDataSet().QuerySignalRecordPacket(_projectId, _sceneId, obj.Id, signal.Id); + var packet = new BLL.MonitorDataSet().GetSignalRecordPacket(_projectId, _sceneId, obj.Id, signal.Id); if (packet==null|| packet.RecordList==null) { XtraMessageBox.Show("鏃犳暟鎹�!"); diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareMultiSelectMonitorPointTreeListCtrl.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareMultiSelectMonitorPointTreeListCtrl.cs" index b7f8642..aab27f8 100644 --- "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareMultiSelectMonitorPointTreeListCtrl.cs" +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/CurveCompareMultiSelectMonitorPointTreeListCtrl.cs" @@ -121,8 +121,8 @@ public void SetBindingData(long projectId) { _projectId = projectId; - var group_list = new BLL.MonitorPointGroup().QueryAll(_projectId); - var point_list = new BLL.MonitorPoint().QueryExSignalList(_projectId); + var group_list = new BLL.MonitorPointGroup().GetAll(_projectId); + var point_list = new BLL.MonitorPoint().GetExSignalList(_projectId); this.SetBindingData(group_list, point_list); } @@ -132,8 +132,8 @@ public void SetBindingData(long projectId, string belongType, long belongId) { _projectId = projectId; - var group_list = new BLL.MonitorPointGroup().QueryByBelongTypeAndBelongId(_projectId, belongType, belongId); - var point_list = new BLL.MonitorPoint().QueryExSignalListByBelongTypeAndBelongId(_projectId, belongType, belongId); + var group_list = new BLL.MonitorPointGroup().GetByBelongTypeAndBelongId(_projectId, belongType, belongId); + var point_list = new BLL.MonitorPoint().GetExSignalListByBelongTypeAndBelongId(_projectId, belongType, belongId); this.SetBindingData(group_list, point_list); } @@ -213,7 +213,7 @@ return; if (e.Node.Checked) { - node.Color = QueryColor(); + node.Color = GetColor(); this.SelectedEvent?.Invoke(monitorPoint, node.Color.Value); } else @@ -223,7 +223,7 @@ } } - Color QueryColor() + Color GetColor() { foreach(var c in _colorArray) { diff --git "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/UnitValueHelper.cs" "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/UnitValueHelper.cs" index 10d2a40..2a1345a 100644 --- "a/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/UnitValueHelper.cs" +++ "b/WinFormUI/IStation.WinFormUI.MonitorDataSet/\346\233\262\347\272\277\346\257\224\350\276\203/UnitValueHelper.cs" @@ -22,7 +22,7 @@ if (int.TryParse(signal.UnitValue, out int unitValue)) { if (_allSignalTypeList == null || _allSignalTypeList.Count < 1) - _allSignalTypeList = new BLL. SignalType().QueryAll(projectId); + _allSignalTypeList = new BLL. SignalType().GetAll(projectId); var type = _allSignalTypeList?.Find(x => x.Identifier == signal.SignalType); if (type != null) { diff --git a/WinFormUI/IStation.WinFormUI.Project/helpers/ProjectHelper.cs b/WinFormUI/IStation.WinFormUI.Project/helpers/ProjectHelper.cs index 992898e..5cfb4a3 100644 --- a/WinFormUI/IStation.WinFormUI.Project/helpers/ProjectHelper.cs +++ b/WinFormUI/IStation.WinFormUI.Project/helpers/ProjectHelper.cs @@ -16,7 +16,7 @@ public static bool LoadProject(long projectId) { WaitFrmHelper.ShowWaitForm("姝e湪鍔犺浇椤圭洰,璇风◢鍊�..."); - var result = new BLL.Project().QueryById(projectId); + var result = new BLL.Project().GetById(projectId); WaitFrmHelper.HideWaitForm(); if (result == null) { @@ -64,7 +64,7 @@ /// </summary> public static bool OtherSaveProject(long projectId) { - var model = new BLL.Project().QueryById(projectId); + var model = new BLL.Project().GetById(projectId); if (model == null) { XtraMessageBox.Show("鑾峰彇椤圭洰淇℃伅澶辫触"); diff --git a/WinFormUI/IStation.WinFormUI.Project/project/EditProjectDlg.cs b/WinFormUI/IStation.WinFormUI.Project/project/EditProjectDlg.cs index abd7ac2..2c9fcb8 100644 --- a/WinFormUI/IStation.WinFormUI.Project/project/EditProjectDlg.cs +++ b/WinFormUI/IStation.WinFormUI.Project/project/EditProjectDlg.cs @@ -35,7 +35,7 @@ /// </summary> public void SetBindingData(long projectId) { - var rhs = new BLL.Project().QueryById(projectId); + var rhs = new BLL.Project().GetById(projectId); _model = new Model.Project(rhs); this.NameTextEdit.EditValue = _model.Name; this.TagNameTextEdit.EditValue = _model.TagName; @@ -83,7 +83,7 @@ if (this.ReloadDataEvent != null) { - var model = bll.QueryById(_model.Id); + var model = bll.GetById(_model.Id); this.ReloadDataEvent.Invoke(model); } this.DialogResult = DialogResult.OK; diff --git a/WinFormUI/IStation.WinFormUI.Project/project/LatelyProjectOverviewPage.cs b/WinFormUI/IStation.WinFormUI.Project/project/LatelyProjectOverviewPage.cs index 2a3b526..a656ad8 100644 --- a/WinFormUI/IStation.WinFormUI.Project/project/LatelyProjectOverviewPage.cs +++ b/WinFormUI/IStation.WinFormUI.Project/project/LatelyProjectOverviewPage.cs @@ -112,7 +112,7 @@ public override void InitialDataSource() { _allBindList = new List<CurrentViewModel>(); - var allProjects = new BLL.Project().QueryAll(); + var allProjects = new BLL.Project().GetAll(); if (allProjects != null && allProjects.Count > 0) allProjects.ForEach(x => _allBindList.Add(new CurrentViewModel(x))); _allBindList = _allBindList.OrderByDescending(t => t.LastSaveTime).ToList(); diff --git a/WinFormUI/IStation.WinFormUI.Project/project/LoadProjectListDlg.cs b/WinFormUI/IStation.WinFormUI.Project/project/LoadProjectListDlg.cs index 325ab79..ad692c4 100644 --- a/WinFormUI/IStation.WinFormUI.Project/project/LoadProjectListDlg.cs +++ b/WinFormUI/IStation.WinFormUI.Project/project/LoadProjectListDlg.cs @@ -39,7 +39,7 @@ var result = ProjectHelper.LoadProject(obj.Id); if (!result) return; - Project = new BLL.Project().QueryById(obj.Id); + Project = new BLL.Project().GetById(obj.Id); this.DialogResult = DialogResult.OK; this.Close(); } @@ -49,7 +49,7 @@ /// </summary> public void SetBindingData() { - var allPrj = new BLL.Project().QueryAll(); + var allPrj = new BLL.Project().GetAll(); if (allPrj == null) allPrj = new List<Model.Project>(); this.projectTileViewCtrl1.SetBindingData(allPrj); diff --git a/WinFormUI/IStation.WinFormUI.Project/project/OpenProjectOverviewDlg.cs b/WinFormUI/IStation.WinFormUI.Project/project/OpenProjectOverviewDlg.cs index b3183b5..0a6b6da 100644 --- a/WinFormUI/IStation.WinFormUI.Project/project/OpenProjectOverviewDlg.cs +++ b/WinFormUI/IStation.WinFormUI.Project/project/OpenProjectOverviewDlg.cs @@ -52,7 +52,7 @@ /// </summary> public void SetBindingData() { - var allPrj = new BLL.Project().QueryAll(); + var allPrj = new BLL.Project().GetAll(); if (allPrj == null) allPrj = new List<Model.Project>(); this.projectTileViewCtrl1.SetBindingData(allPrj); diff --git a/WinFormUI/IStation.WinFormUI.Project/project/ProjectTileViewCtrl.cs b/WinFormUI/IStation.WinFormUI.Project/project/ProjectTileViewCtrl.cs index 1e8cf7a..14d2576 100644 --- a/WinFormUI/IStation.WinFormUI.Project/project/ProjectTileViewCtrl.cs +++ b/WinFormUI/IStation.WinFormUI.Project/project/ProjectTileViewCtrl.cs @@ -112,7 +112,7 @@ public void SetBindingData() { _allBindList = new List<CurrentViewModel>(); - var allProjects = new BLL.Project().QueryAll(); + var allProjects = new BLL.Project().GetAll(); if (allProjects != null && allProjects.Count > 0) allProjects.ForEach(x => _allBindList.Add(new CurrentViewModel(x))); _allBindList = _allBindList.OrderByDescending(t => t.LastSaveTime).ToList(); diff --git a/WinFormUI/IStation.WinFormUI.Scene/import/general/GeneralMonitorDataImportHelper.cs b/WinFormUI/IStation.WinFormUI.Scene/import/general/GeneralMonitorDataImportHelper.cs index 8f78f24..7a5db9f 100644 --- a/WinFormUI/IStation.WinFormUI.Scene/import/general/GeneralMonitorDataImportHelper.cs +++ b/WinFormUI/IStation.WinFormUI.Scene/import/general/GeneralMonitorDataImportHelper.cs @@ -22,7 +22,7 @@ if (mapperList == null || mapperList.Count < 1) return false; var monitorPointIds = mapperList.Select(x => x.SysId).Distinct().ToList(); - var monitorList = new BLL.MonitorPoint().QueryExSignalListByIds(projectId, monitorPointIds); + var monitorList = new BLL.MonitorPoint().GetExSignalListByIds(projectId, monitorPointIds); if (monitorList == null || monitorList.Count < 1) return false; var fileDlg = new OpenFileDialog(); @@ -42,9 +42,9 @@ { var mapper = mapperList.Find(x => x.SysId == monitor.Id); var dockingModel = new GeneralMonitorDataImportModel(); - var signal = monitor.SignalList.First(); - dockingModel.SignalId = signal.Id; + var signal = monitor.SignalList.First(); dockingModel.MonitorPointId = monitor.Id; + dockingModel.SignalId = signal.Id; dockingModel.TagName = mapper.SignId; dockingModel.ConvertParas = mapper.ConvertParas; dockingModel.CorrectParas = mapper.CorrectParas; -- Gitblit v1.9.3