From ef1fc8b0eeea6972964d8c62dfef7819bea49d1a Mon Sep 17 00:00:00 2001 From: qin <a@163.com> Date: 星期五, 14 三月 2025 11:01:34 +0800 Subject: [PATCH] 提交文件 --- WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user | 3 Desktop/PBS.Desktop/PBS.Desktop.csproj.user | 9 WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.resx | 140 +++ WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.resx | 126 ++ WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.Designer.cs | 58 Desktop/PBS.Desktop/PBS.Desktop.csproj | 2 WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj | 1 Vmo/PBS.Vmo/PBS.Vmo.csproj | 1 WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs | 3 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs | 152 -- WinFrmUI/PBS.WinFrmUI.DataAnalysis/PBS.WinFrmUI.DataAnalysis.csproj | 6 Vmo/PBS.Vmo/04-IBoxViewModel/IBoxControllViewModel.cs | 9 WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs | 7 Vmo/PBS.Vmo/04-IBoxViewModel/IBoxDataHelper.cs | 2 WinFrmUI/IBox.WinFrmUI/IBoxForm.cs | 17 WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj | 5 Desktop/PBS.Desktop/MainForm.cs | 37 WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.Designer.cs | 619 ++++++++++++++ /dev/null | 374 -------- WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs | 2 WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.Designer.cs | 159 +++ WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.cs | 300 ++++++ WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.cs | 286 ++++++ WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.cs | 181 ++- WinFrmUI/IBox.WinFrmUI/ViewModel/IBoxControllDownloadViewModel.cs | 47 + 25 files changed, 1,913 insertions(+), 633 deletions(-) diff --git a/Desktop/PBS.Desktop/MainForm.cs b/Desktop/PBS.Desktop/MainForm.cs index 2f2dd91..b3b8240 100644 --- a/Desktop/PBS.Desktop/MainForm.cs +++ b/Desktop/PBS.Desktop/MainForm.cs @@ -12,6 +12,7 @@ using HStation.WinFrmUI.Assets; using HStation.WinFrmUI.Basic; using HStation.WinFrmUI.Dict; +using IBox.WinFrmUI; using NPOI.SS.Formula.Functions; using PBS.WinFrmUI; using PBS.WinFrmUI.DataAnalysis; @@ -20,6 +21,7 @@ using System.IO; using Yw.WinFrmUI; using Yw.WinFrmUI.Page; +using PBS.Vmo; namespace PBS.Desktop { @@ -538,6 +540,27 @@ btn.Appearance.ForeColor = Color.Black; } } + } + + //智能硬件 + if (modular == "SmartHardware") + { + var guid = new PageGuid() + { + Modular = "SmartHardware", + MoudingType = eMoudingType.Tab, + Function = "IBox", + }; + if (!IsExistPage(guid, true)) + { + var ibox = IBoxDataHelper.GetData(); + var page = new IBoxForm(ibox); + page.PageGuid = guid; + page.PageTitle.Caption = "智能硬件"; + page.PageTitle.HeaderSvgImage = svgImgItem32[4]; + page.PageTitle.SvgImageSize = new Size(18, 18); + CreatePage(page, guid); + } } //初始功能列表 @@ -1492,11 +1515,11 @@ case "DataAnalysis": { - var analysis1 = Get("流量压力分析", new PageGuid() + var analysis1 = Get("流量压力比对分析", new PageGuid() { Modular = "DataAnalysis", MoudingType = eMoudingType.Tab, - Function = " ", + Function = "FlowPressAnalysis", }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => { if (!IsExistPage(guid, true)) @@ -1510,15 +1533,21 @@ } }); - var analysis2 = Get("分析1", new PageGuid() + var analysis2 = Get("末端压力分析", new PageGuid() { Modular = "DataAnalysis", MoudingType = eMoudingType.Tab, - Function = " ", + Function = "EndPressAnalysis", }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => { if (!IsExistPage(guid, true)) { + var page = new EndPressAnalysis(); + page.PageGuid = guid; + page.PageTitle.Caption = caption; + page.PageTitle.HeaderSvgImage = svg; + page.PageTitle.SvgImageSize = size; + CreatePage(page, guid); } }); diff --git a/Desktop/PBS.Desktop/PBS.Desktop.csproj b/Desktop/PBS.Desktop/PBS.Desktop.csproj index 40bfac2..f2616ba 100644 --- a/Desktop/PBS.Desktop/PBS.Desktop.csproj +++ b/Desktop/PBS.Desktop/PBS.Desktop.csproj @@ -30,7 +30,9 @@ </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\Vmo\PBS.Vmo\PBS.Vmo.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Assets.Core\HStation.WinFrmUI.Assets.Core.csproj" /> + <ProjectReference Include="..\..\WinFrmUI\IBox.WinFrmUI\IBox.WinFrmUI.csproj" /> <ProjectReference Include="..\..\WinFrmUI\PBS.WinFrmUI.DataAnalysis\PBS.WinFrmUI.DataAnalysis.csproj" /> <ProjectReference Include="..\..\WinFrmUI\PBS.WinFrmUI.Hydro\PBS.WinFrmUI.Hydro.csproj" /> <ProjectReference Include="..\..\WinFrmUI\PBS.WinFrmUI.WE\PBS.WinFrmUI.WE.csproj" /> diff --git a/Desktop/PBS.Desktop/PBS.Desktop.csproj.user b/Desktop/PBS.Desktop/PBS.Desktop.csproj.user index 4e08548..888dcfb 100644 --- a/Desktop/PBS.Desktop/PBS.Desktop.csproj.user +++ b/Desktop/PBS.Desktop/PBS.Desktop.csproj.user @@ -17,14 +17,5 @@ <Compile Update="MainForm.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="MainForm.cs.BASE.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="MainForm.cs.LOCAL.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="MainForm.cs.REMOTE.cs"> - <SubType>Form</SubType> - </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxControllViewModel.cs b/Vmo/PBS.Vmo/04-IBoxViewModel/IBoxControllViewModel.cs similarity index 94% rename from WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxControllViewModel.cs rename to Vmo/PBS.Vmo/04-IBoxViewModel/IBoxControllViewModel.cs index 3a91b2f..61eec45 100644 --- a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxControllViewModel.cs +++ b/Vmo/PBS.Vmo/04-IBoxViewModel/IBoxControllViewModel.cs @@ -1,4 +1,6 @@ -锘縩amespace PBS.WinFrmUI +锘縰sing System.Drawing; + +namespace PBS.Vmo { public class IBoxControllViewModel { @@ -86,7 +88,10 @@ /// 娴侀噺鍘嬮檷涓婇檺 /// </summary> public List<PointF> 娴侀噺鍘嬮檷涓婇檺 { get; set; } - + /// <summary> + /// 鎻掑�硷紝鎷熷悎 + /// </summary> + //public DenseVector coefficients { get; set; } /// <summary> /// diff --git a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxDataHelper.cs b/Vmo/PBS.Vmo/04-IBoxViewModel/IBoxDataHelper.cs similarity index 98% rename from WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxDataHelper.cs rename to Vmo/PBS.Vmo/04-IBoxViewModel/IBoxDataHelper.cs index 6438fea..90341dc 100644 --- a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/IBoxDataHelper.cs +++ b/Vmo/PBS.Vmo/04-IBoxViewModel/IBoxDataHelper.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace PBS.WinFrmUI +namespace PBS.Vmo { public class IBoxDataHelper { diff --git a/Vmo/PBS.Vmo/PBS.Vmo.csproj b/Vmo/PBS.Vmo/PBS.Vmo.csproj index 5eb4885..7ef042c 100644 --- a/Vmo/PBS.Vmo/PBS.Vmo.csproj +++ b/Vmo/PBS.Vmo/PBS.Vmo.csproj @@ -8,6 +8,7 @@ <ItemGroup> <ProjectReference Include="..\..\Dto\PBS.Dto\PBS.Dto.csproj" /> + <ProjectReference Include="..\HStation.Vmo.Assets.Core\HStation.Vmo.Assets.Core.csproj" /> <ProjectReference Include="..\HStation.Vmo.Core\HStation.Vmo.Core.csproj" /> </ItemGroup> diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs index ddca6a9..99f55c1 100644 --- a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormControll.cs @@ -1,4 +1,5 @@ 锘縰sing PBS.Model; +using PBS.Vmo; using System.Data; using System.IO; using Yw; @@ -57,41 +58,43 @@ break; } } - private Model.Facilities _facilities = null; - private BLL.EquipmentEChartMapping _bll = new BLL.EquipmentEChartMapping(); - private BLL.EChart _bllEChart = new BLL.EChart(); - private BLL.Equipment _bllEquipment = new BLL.Equipment(); - private Model.Kit _kit = null; - private BLL.EquipmentTypeEChartMapping _equipmentTypeEChartMappingBLL = new BLL.EquipmentTypeEChartMapping(); - public IBoxFormControll(Facility facilities) + private FacilityVmo _facilities = null; + private IBoxControllViewModel boxControllViewModel = null; + //private BLL.EquipmentEChartMapping _bll = new BLL.EquipmentEChartMapping(); + //private BLL.EChart _bllEChart = new BLL.EChart(); + //private BLL.Equipment _bllEquipment = new BLL.Equipment(); + //private Model.Kit _kit = null; + //private BLL.EquipmentTypeEChartMapping _equipmentTypeEChartMappingBLL = new BLL.EquipmentTypeEChartMapping(); + public IBoxFormControll(IBoxControllViewModel ibox) { this.PageTitle.Caption = "鏅鸿兘鎺у埗"; - _facilities = facilities; + _facilities = ibox.facilities; + boxControllViewModel = ibox; InitializeComponent(); - this.treeListCtrl1.FocusedChangedEvent += EquipmentTreeListCtrl1_FocusedChangedEvent; + //this.treeListCtrl1.FocusedChangedEvent += EquipmentTreeListCtrl1_FocusedChangedEvent; InitDataSource(); } - private string filePath = "Data\\AnalyData_{0}.json"; + //private string filePath = "Data\\AnalyData_{0}.json"; private void InitDataSource() { - var f = new BLL.Facilities().GetByID(this._facilities.ID); - if (f != null) - { - var kid = long.Parse(f.CompletePlant); - var kit = new BLL.Kit().GetByID(kid); - _kit = kit; - this.treeListCtrl1.SetBindingData(kid); - } - this._SelectedBuild = new Basic.Build() + var f = _facilities; + //var f = new BLL.Facilities().GetByID(this._facilities.ID); + //if (f != null) + //{ + // var kid = long.Parse(f.CompletePlant); + // var kit = new BLL.Kit().GetByID(kid); + // _kit = kit; + // this.treeListCtrl1.SetBindingData(kid); + //} + this._SelectedBuild = new Build() { factoryName = f.Name, - 绯荤粺鏈�澶ф祦閲� = f.WaterHeight, + 绯荤粺鏈�澶ф祦閲� = f.MaxWaterDemand.Value, Type = 浜屼緵鍒嗗尯Type.鍔犲帇渚涙按, ID = f.ID.ToString(), - 鐢ㄦ埛鍘嬪姏闇�姹� = int.Parse(f.WaterPressure.ToString()), + 鐢ㄦ埛鍘嬪姏闇�姹� = int.Parse(f.TerminalPressure.ToString()), 灞傛暟 = double.Parse(f.Floor.ToString()), 灞傞珮 = double.Parse(f.FloorHeight.ToString()), - 姣忓眰鎴锋暟 = double.Parse(f.FloorHouseHolds.ToString()) }; ShowChart(); } @@ -113,7 +116,7 @@ private void SetResult(string path) { - var content = new Eventech.Common.FileHelper().ReadFile(path); + var content = new FileHelper().ReadFile(path); var result = JsonHelper.Json2Object<List<Result>>(content); AddPoints(result); ShowPressPoints(); @@ -254,77 +257,13 @@ serie.Points.AddXY(point.X, point.Y); } } - private void EquipmentTreeListCtrl1_FocusedChangedEvent(string objType, object obj) - { - this.curveExpressChart1.InitialChartData(); - if (obj != null && objType == ISupply.ObjectType.Kit) - { - _kit = obj as Model.Kit; - var equipmentList = _bllEquipment.GetByKitIDAndCatalog(_kit.ID, ISupply.Equipment.Pump); - if (equipmentList != null && equipmentList.Any()) - { - var mappings = new List<Model.EquipmentEChartMapping>(); - foreach (var equipment in equipmentList) - { - var mapping = _bll.GetWorkingByEquipmentID(equipment.ID); - if (mapping != null) - { - mappings.Add(mapping); - } - } - if (mappings.Any()) - { - var curveInfoList = new List<Model.PumpCurveInfo>(); - foreach (var mapping in mappings) - { - var chart = _bllEChart.GetPumpCurveInfoByID(mapping.EChartID); - if (chart != null && chart.CurveInfoModel != null) - { - curveInfoList.Add(chart.CurveInfoModel); - } - } - - if (curveInfoList != null && curveInfoList.Any()) - { - var theConnectCurve = new Curve.ParallelConnectionHelper(); - for (int i = 0; i < curveInfoList.Count; i++) - { - var chart = curveInfoList[i]; - var QH = chart.CurveQH; - var QP = chart.CurveQP; - var QE = Curve.PumpCalculateHelper.CalculateE(QH, QP); - theConnectCurve.AddCurve(QH, QP); - } - var bol = theConnectCurve.CalculateParallel(out List<ISupply.Curve.CurvePoint> ConnectCurveQH, - out List<ISupply.Curve.CurvePoint> ConnectCurveQE, - out List<ISupply.Curve.CurvePoint> ConnectCurveQP); - if (bol) - { - var curveExpressQH = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQH); - var curveExpressQE = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQE); - var curveExpressQP = ISupply.Curve.FitHelper.BuildCurveExpress(ConnectCurveQP); - this.curveExpressChart1.SetBindingData(curveExpressQH, - curveExpressQE, - curveExpressQP); - } - } - } - } - } - else if (obj != null && objType == ISupply.ObjectType.Equipment) - { - var equ = obj as Model.Equipment; - var _equipmentChartMappingEx = _equipmentTypeEChartMappingBLL.GetExByEquipmentTypeID(equ.TypeID); - - SetBindingData(_equipmentChartMappingEx); - } - } + private void SendDownloadData() { - var model = new IBoxControllViewModel(); + var model = new IBoxControllDownloadViewModel(); model.facilities = _facilities; - model.kit = _kit; + model.kit = boxControllViewModel.Package; model.娴侀噺鍘嬮檷涓嬮檺 = _SelectedBuild.娴侀噺鍘嬮檷涓嬮檺.FittedCurve; model.娴侀噺鍘嬮檷涓婇檺 = _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.FittedCurve; model.娴侀噺鍘嬮檷鏇茬嚎 = _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.FittedCurve; @@ -332,20 +271,8 @@ if (!_SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.IsFitted) _SelectedBuild.娴侀噺鍘嬮檷鏇茬嚎.CurveFit(); model.coefficients = _SelectedBuild.娴侀噺鍘嬮檷涓婇檺.coefficients; - //model.IsControll = checkEdit1.Checked; - var equipmentList = _bllEquipment.GetByKitIDAndCatalog(_kit.ID, ISupply.Equipment.Pump); - if (equipmentList != null && equipmentList.Any()) - { - foreach (var item in equipmentList) - { - var _equipmentChartMappingEx = _equipmentTypeEChartMappingBLL.GetExByEquipmentTypeID(item.TypeID); - _equipmentChartMappingEx.EquipmentId = item.ID; - _equipmentChartMappingEx.EquipmentOtherName = item.Name; - _equipmentChartMappingEx.RatedParas = item.RatedParas; - model.equations.Add(_equipmentChartMappingEx); - } - } - //FileHelper.Write("d:\\EboxData.txt", JsonHelper.Object2Json(model)); + model.equations = boxControllViewModel.equations; + Thread.Sleep(500); SendText(startCode + datadownloadCode + paramCode + JsonHelper.Object2Json(model) + endCode); } @@ -358,21 +285,6 @@ //MessageBoxHelper.ShowInfo("鏁版嵁涓嬪彂鎴愬姛!"); } - - - private void SetBindingData(Model.EquipmentTypeEChartMappingEx model) - { - this.curveExpressChart1.InitialChartData(); - var curveInfo = model?.CurveInfo; - var coordParas = model?.CoordParas; - if (curveInfo != null) - { - var coordinateParas = ISupply.Curve.CurveCoordinate.ToModel(coordParas); - this.curveExpressChart1.SetBindingData(curveInfo.CurveQH, - curveInfo.CurveQE, - curveInfo.CurveQP, - coordinateParas); - } - } + } } diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs index 4f4f2b2..0fd55c5 100644 --- a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormEnergyAnalysis.cs @@ -177,7 +177,7 @@ /// <param name="e"></param> private void simpleButton3_Click(object sender, EventArgs e) { - this.dateEditStartDate.Text = DateTime.Now.AddMonths(-30).ToString("yyyy-MM-dd"); + this.dateEditStartDate.Text = DateTime.Now.AddMonths(-3).ToString("yyyy-MM-dd"); this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); Search(); } diff --git a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs index 710df09..e7bf8db 100644 --- a/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs +++ b/WinFrmUI/IBox.WinFrmUI/Form/IBoxFormRule.cs @@ -3,6 +3,7 @@ using NPOI.SS.UserModel; using NPOI.SS.Util; using PBS.Model; +using PBS.Vmo; using System.IO; using Yw; using Yw.WinFrmUI; @@ -20,14 +21,14 @@ private string deletesignalCode = "deletesignal"; private string addMonitorgroupCode = "addmonitorgroup"; private string deletemonitorgroupCode = "deletemonitorgroup"; - Facility _facilities; + FacilityVmo _facilities; - public IBoxFormRule(Facility facilities = null) + public IBoxFormRule(FacilityVmo facilities = null) { this.PageTitle.Caption = "瑙勫垯閰嶇疆"; if (facilities == null) { - facilities = new Facility() + facilities = new FacilityVmo() { ID = 1, Name = "涓存椂璁炬柦" diff --git a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj index 8552b02..7b046b8 100644 --- a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj +++ b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj @@ -38,6 +38,7 @@ <ItemGroup> <ProjectReference Include="..\..\Service\PBS.Service\PBS.Service.csproj" /> + <ProjectReference Include="..\..\Vmo\PBS.Vmo\PBS.Vmo.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> </ItemGroup> diff --git a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user index d6a6f3b..80f0b31 100644 --- a/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user +++ b/WinFrmUI/IBox.WinFrmUI/IBox.WinFrmUI.csproj.user @@ -2,6 +2,9 @@ <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup /> <ItemGroup> + <Compile Update="Form\IBoxFormControll.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="Form\IBoxFormDataFilter.cs"> <SubType>UserControl</SubType> </Compile> diff --git a/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs b/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs index 79bf114..043b033 100644 --- a/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs +++ b/WinFrmUI/IBox.WinFrmUI/IBoxForm.cs @@ -11,12 +11,13 @@ using Yw; using PBS.Model; using DevExpress.XtraEditors; +using PBS.Vmo; namespace IBox.WinFrmUI { public partial class IBoxForm : DocumentPage { - private Facility _facilities; + private FacilityVmo _facilities; private BluetoothRadio radio = null;//钃濈墮閫傞厤鍣� private string sendFileName = null;//鍙戦�佹枃浠跺悕 private BluetoothAddress sendAddress = null;//鍙戦�佺洰鐨勫湴鍧� @@ -137,10 +138,10 @@ IBoxFormMonitor.SendData += SendText; xtraTabPage1.Controls.Add(IBoxFormMonitor); - //IBoxFormControll = new IBoxFormControll(_facilities); - //IBoxFormControll.Dock = DockStyle.Fill; - //IBoxFormControll.SendData += SendText; - //xtraTabPage7.Controls.Add(IBoxFormControll); + IBoxFormControll = new IBoxFormControll(_facilities); + IBoxFormControll.Dock = DockStyle.Fill; + IBoxFormControll.SendData += SendText; + xtraTabPage7.Controls.Add(IBoxFormControll); IBoxFormParams = new IBoxFormParams(); IBoxFormParams.Dock = DockStyle.Fill; @@ -693,13 +694,13 @@ xtraTabControl1.SelectedTabPage = xtraTabPage11; } - public IBoxForm(Facility facilities = null) + public IBoxForm(IBoxControllViewModel ibox = null) { InitializeComponent(); this.PageTitle.Caption = "鏅鸿兘鐩掑瓙"; - if (facilities != null) + if (ibox != null) { - _facilities = facilities; + _facilities = ibox.facilities; } else { diff --git a/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs b/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs index afd06bd..2bea330 100644 --- a/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs +++ b/WinFrmUI/IBox.WinFrmUI/Model/SimuViewModel.cs @@ -1,4 +1,5 @@ 锘縰sing PBS.Model; +using PBS.Vmo; using System; using System.Collections.Generic; using System.Linq; @@ -29,7 +30,7 @@ /// <summary> /// 璁炬柦 /// </summary> - public Facility Facilities { get; set; } + public FacilityVmo Facilities { get; set; } ///// <summary> ///// 妯℃嫙鍊煎垪琛� diff --git a/WinFrmUI/IBox.WinFrmUI/ViewModel/IBoxControllDownloadViewModel.cs b/WinFrmUI/IBox.WinFrmUI/ViewModel/IBoxControllDownloadViewModel.cs new file mode 100644 index 0000000..8ed7ba6 --- /dev/null +++ b/WinFrmUI/IBox.WinFrmUI/ViewModel/IBoxControllDownloadViewModel.cs @@ -0,0 +1,47 @@ +锘縰sing MathNet.Numerics.LinearAlgebra.Double; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace IBox.WinFrmUI +{ + public class IBoxControllDownloadViewModel + { + /// <summary> + /// 浜屼緵璁炬柦 + /// </summary> + public PBS.Vmo.FacilityVmo facilities { get; set; } + + /// <summary> + /// 鎴愬璁惧 + /// </summary> + public HStation.Vmo.AsstesPackageExVmo kit { get; set; } + + /// <summary> + /// 鏈烘车鍨嬪彿瀵硅薄 + /// </summary> + public List<HStation.Vmo.AssetsPumpMainVmo> equations { get; set; } + + /// <summary> + /// 娴侀噺鍘嬮檷鏇茬嚎 + /// </summary> + public List<PointF> 娴侀噺鍘嬮檷鏇茬嚎 { get; set; } + + /// <summary> + /// 娴侀噺鍘嬮檷涓嬮檺 + /// </summary> + public List<PointF> 娴侀噺鍘嬮檷涓嬮檺 { get; set; } + + /// <summary> + /// 娴侀噺鍘嬮檷涓婇檺 + /// </summary> + public List<PointF> 娴侀噺鍘嬮檷涓婇檺 { get; set; } + + /// <summary> + /// 鎻掑�硷紝鎷熷悎 + /// </summary> + public DenseVector coefficients { get; set; } + } +} diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.Designer.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.Designer.cs new file mode 100644 index 0000000..2130c20 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.Designer.cs @@ -0,0 +1,159 @@ +锘縰sing DevExpress.XtraCharts; + +namespace PBS.WinFrmUI.DataAnalysis +{ + partial class EndPressAnalysis + { + /// <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 Windows Form 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EndPressAnalysis)); + XYDiagram xyDiagram1 = new XYDiagram(); + LayoutDefinition layoutDefinition1 = new LayoutDefinition(); + LayoutDefinition layoutDefinition2 = new LayoutDefinition(); + LayoutDefinition layoutDefinition3 = new LayoutDefinition(); + Series series1 = new Series(); + SplineSeriesView splineSeriesView1 = new SplineSeriesView(); + ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); + ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); + ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + chartControl1 = new ChartControl(); + ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)chartControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)xyDiagram1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)series1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)splineSeriesView1).BeginInit(); + SuspendLayout(); + // + // ribbonControl1 + // + ribbonControl1.AllowMinimizeRibbon = false; + ribbonControl1.ExpandCollapseItem.Id = 0; + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barButtonItem1 }); + ribbonControl1.Location = new Point(0, 0); + ribbonControl1.MaxItemId = 2; + ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); + ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; + ribbonControl1.ShowToolbarCustomizeItem = false; + ribbonControl1.Size = new Size(1003, 128); + ribbonControl1.Toolbar.ShowCustomizeItem = false; + ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barButtonItem1 + // + barButtonItem1.Caption = "瀵煎叆鏂囦欢"; + barButtonItem1.Id = 1; + barButtonItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barButtonItem1.ImageOptions.SvgImage"); + barButtonItem1.Name = "barButtonItem1"; + barButtonItem1.ItemClick += barButtonItem1_ItemClick; + // + // ribbonPage1 + // + ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); + ribbonPage1.Name = "ribbonPage1"; + // + // ribbonPageGroup1 + // + ribbonPageGroup1.ItemLinks.Add(barButtonItem1); + ribbonPageGroup1.Name = "ribbonPageGroup1"; + ribbonPageGroup1.Text = "鍩虹鍔熻兘"; + // + // chartControl1 + // + chartControl1.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False; + xyDiagram1.AxisX.Alignment = AxisAlignment.Zero; + xyDiagram1.AxisX.Title.EnableAntialiasing = DevExpress.Utils.DefaultBoolean.True; + xyDiagram1.AxisX.Title.Text = "鏃堕棿"; + xyDiagram1.AxisX.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; + xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram1.AxisY.Color = Color.DodgerBlue; + xyDiagram1.AxisY.Label.TextColor = Color.DodgerBlue; + xyDiagram1.AxisY.Title.Alignment = StringAlignment.Far; + xyDiagram1.AxisY.Title.EnableAntialiasing = DevExpress.Utils.DefaultBoolean.False; + xyDiagram1.AxisY.Title.Text = "鍘嬪姏(MPa)"; + xyDiagram1.AxisY.Title.TextColor = Color.DodgerBlue; + xyDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; + xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + xyDiagram1.DefaultPane.BorderVisible = false; + xyDiagram1.DefaultPane.Title.Text = "鏃犳暟鎹�"; + xyDiagram1.PaneLayout.AutoLayoutMode = PaneAutoLayoutMode.Grid; + xyDiagram1.PaneLayout.RowDefinitions.AddRange(new LayoutDefinition[] { layoutDefinition1, layoutDefinition2, layoutDefinition3 }); + xyDiagram1.RangeControlTimeSpanGridOptions.GridAlignment = TimeSpanGridAlignment.Minute; + xyDiagram1.RangeControlTimeSpanGridOptions.GridMode = ChartRangeControlClientGridMode.Manual; + chartControl1.Diagram = xyDiagram1; + chartControl1.Dock = DockStyle.Fill; + chartControl1.Legend.AlignmentHorizontal = LegendAlignmentHorizontal.Right; + chartControl1.Legend.Border.Visibility = DevExpress.Utils.DefaultBoolean.False; + chartControl1.Legend.Direction = LegendDirection.LeftToRight; + chartControl1.Legend.LegendID = -1; + chartControl1.Legend.MarkerMode = LegendMarkerMode.CheckBoxAndMarker; + chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; + chartControl1.Location = new Point(0, 128); + chartControl1.Margin = new Padding(2); + chartControl1.Name = "chartControl1"; + series1.Name = "SeriesQH"; + series1.SeriesID = 0; + splineSeriesView1.Color = Color.FromArgb(84, 141, 212); + series1.View = splineSeriesView1; + chartControl1.SeriesSerializable = new Series[] + { + series1 + }; + chartControl1.Size = new Size(1003, 561); + chartControl1.TabIndex = 0; + // + // EndPressAnalysis + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(chartControl1); + Controls.Add(ribbonControl1); + Name = "EndPressAnalysis"; + Size = new Size(1003, 689); + ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)xyDiagram1).EndInit(); + ((System.ComponentModel.ISupportInitialize)splineSeriesView1).EndInit(); + ((System.ComponentModel.ISupportInitialize)series1).EndInit(); + ((System.ComponentModel.ISupportInitialize)chartControl1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; + private DevExpress.XtraBars.BarButtonItem barButtonItem1; + private DevExpress.XtraCharts.ChartControl chartControl1; + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.cs new file mode 100644 index 0000000..a34bef7 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.cs @@ -0,0 +1,300 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw.WinFrmUI; + +namespace PBS.WinFrmUI.DataAnalysis +{ + public partial class EndPressAnalysis : DocumentPage + { + public EndPressAnalysis() + { + InitializeComponent(); + InitialChart(); + } + + private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + //瀵煎叆鏂囦欢 + var dlg = new System.Windows.Forms.OpenFileDialog(); + dlg.Filter = "EXCEL 鏂囦欢(*.xls)|*.xls"; + dlg.CheckFileExists = true; + if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) + return; + var datalist = new List<FlowPressChartViewModel>(); + ParseExcel(dlg.FileName, out datalist); + if (datalist.Any()) + { + SetBindingData(datalist); + } + } + #region Private Variable + + private XYDiagram _diagram; + private XYDiagramDefaultPane _default_pane; + + private AxisX _axis_x_flow; + private AxisY _axis_y_head; + //private SecondaryAxisY _axis_y_eff; + + + #endregion + /// <summary> + /// 鍒濆鍖栧浘琛� + /// </summary> + private void InitialChart() + { + + this.chartControl1.RuntimeHitTesting = true; + + this.chartControl1.Legend.Visibility = DefaultBoolean.True; + _diagram = (XYDiagram)this.chartControl1.Diagram; + _diagram.EnableAxisXScrolling = true; + _diagram.EnableAxisYScrolling = true; + _diagram.EnableAxisXZooming = true; + _diagram.EnableAxisYZooming = true; + _default_pane = _diagram.DefaultPane; + + _diagram.AxisX.TimeSpanScaleOptions.MeasureUnit = TimeSpanMeasureUnit.Minute; + _diagram.AxisX.TimeSpanScaleOptions.ScaleMode = ScaleMode.Continuous; + + _axis_x_flow = _diagram.AxisX; + _axis_y_head = _diagram.AxisY; + //_axis_y_eff = _diagram.SecondaryAxesY.GetAxisByName("AxisYEff"); + //_axis_y_eff.Alignment = AxisAlignment.Far; + + + _axis_x_flow.GridLines.Visible = false; + _axis_y_head.GridLines.Visible = false; + //_axis_y_eff.GridLines.Visible = false; + + this.chartControl1.CrosshairEnabled = DefaultBoolean.True; + + } + + /// <summary> + /// 璁剧疆鍥捐〃 + /// </summary> + public void SetBindingData(List<FlowPressChartViewModel> vm_list) + { + + this.chartControl1.BeginInit(); + this.chartControl1.Series.Clear(); + for (int i = this.chartControl1.AnnotationRepository.Count - 1; i > 0; i--) + { + if (i == 0) + break; + this.chartControl1.AnnotationRepository.RemoveAt(i); + } + this.chartControl1.Legend.CustomItems.Clear(); + if (IsInvalidData()) + { + + this.chartControl1.EndInit(); + return; + } + + AxisXBase axis_x = null; + AxisYBase axis_y = null; + XYDiagramPaneBase pane = null; + + + foreach (var vm in vm_list) + { + //if (!vm.Name.Contains("鍘嬪姏")) + //{ + axis_x = _axis_x_flow; + axis_y = _axis_y_head; + pane = _default_pane; + //} + //else + //{ + // axis_x = _axis_x_flow; + // axis_y = _axis_y_eff; + // pane = _default_pane; + + //} + + AddLineSeries(vm.Name, axis_x, axis_y, pane, vm.Datas); + } + + var min_x = vm_list.SelectMany(x => x.Datas).Min(x => TimeSpan.Parse(x.Time)); + var max_x = vm_list.SelectMany(x => x.Datas).Max(x => TimeSpan.Parse(x.Time)); + + + _axis_x_flow.NumericScaleOptions.AutoGrid = false; + _axis_x_flow.WholeRange.SideMarginsValue = 0; + _axis_x_flow.VisualRange.SideMarginsValue = 0; + _axis_x_flow.WholeRange.SetMinMaxValues(min_x, max_x); + _axis_x_flow.VisualRange.SetMinMaxValues(min_x, max_x); + + + this.chartControl1.EndInit(); + + } + + + + //鏄惁鏄棤鏁堟暟鎹� + private bool IsInvalidData() + { + + return false; + } + + + + private void AddLineSeries(string id, AxisXBase axis_x, AxisYBase axis_y, XYDiagramPaneBase pane, List<TimeChartViewModel> pt_list, DevExpress.XtraCharts.DashStyle dash = DevExpress.XtraCharts.DashStyle.Solid) + { + if (pt_list == null || !pt_list.Any()) + return; + + var view = new DevExpress.XtraCharts.LineSeriesView(); + view.LineStyle.DashStyle = dash; + view.LineStyle.LineJoin = System.Drawing.Drawing2D.LineJoin.Round; + view.LineStyle.Thickness = 2; + if (dash != DashStyle.Solid) + { + view.LineStyle.Thickness = 3; + } + + view.EnableAntialiasing = DefaultBoolean.True; + view.MarkerVisibility = DefaultBoolean.False; + view.AxisX = axis_x; + view.AxisY = axis_y; + view.EmptyPointOptions.Color = Color.Transparent; + view.Pane = pane; + + + var series_pt_list = pt_list.Select(x => new SeriesPoint(TimeSpan.Parse(x.Time), x.Y)).ToArray(); + var series = new DevExpress.XtraCharts.Series(); + series.Tag = id; + //series.ShowInLegend = false; + series.Name = id; + series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.TimeSpan; + series.TimeSpanSummaryOptions.MeasureUnit = TimeSpanMeasureUnit.Minute; + series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False; + series.CrosshairEnabled = DefaultBoolean.True; + series.CrosshairLabelPattern = id + ":{V:N2}"; + series.ToolTipEnabled = DefaultBoolean.False; + series.SeriesPointsSorting = SortingMode.None; + series.Visible = true; + series.View = view; + series.Points.AddRange(series_pt_list); + + this.chartControl1.Series.Add(series); + } + public static string ParseExcel(string fileName, out List<FlowPressChartViewModel> datalist) + { + datalist = new List<FlowPressChartViewModel>(); + + if (!File.Exists(fileName)) + return "鏂囦欢涓嶅瓨鍦�"; + int line = 0; + + //鍒濆鍖栨枃浠� + NPOI.HSSF.UserModel.HSSFWorkbook theBook = null; + using (FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.ReadWrite)) + { + theBook = new NPOI.HSSF.UserModel.HSSFWorkbook(file); + } + + //妫�鏌ヨ〃鏍兼槸鍚︾鍚� + NPOI.SS.UserModel.ISheet sheet1 = theBook.GetSheet("Sheet1"); + if (sheet1 == null) + { + sheet1 = theBook.GetSheetAt(0); + if (sheet1 == null) + return ("鏃燬heet鏁版嵁"); + } + + //鏍囬琛� + int title_line_index = 0; + + var row_title = sheet1.GetRow(title_line_index); + if (row_title == null) + { + return ("绗竴琛岀涓�鍒椾笉鑳界┖"); + } + + //寮�濮嬭鍙栫殑琛� + int start_line = title_line_index + 1; + var cell_0 = row_title.GetCell(0); + if (cell_0 == null) + { + return ("鏃犳硶璇诲彇琛ㄥご鏂囦欢"); + } + + var totalcell = row_title.Cells.Count; + for (int i = 0; i < totalcell; i++) + { + if (i > 0) + { + var row_cell = row_title.GetCell(i); + if (row_cell != null) + { + datalist.Add(new FlowPressChartViewModel() + { + Name = row_cell.StringCellValue, + Datas = new List<TimeChartViewModel>() + }); + } + } + } + + NPOI.SS.UserModel.IRow row_temp = null; + NPOI.SS.UserModel.ICell cell; + + for (line = start_line; line < 10000; line++) + { + + row_temp = sheet1.GetRow(line); + if (row_temp == null) + break; + + for (int i = 0; i < totalcell; i++) + { + try + { + if (i > 0) + { + var cell_temp = row_temp.GetCell(i); + if (cell_temp != null && cell_temp.CellType!= NPOI.SS.UserModel.CellType.Blank) + { + double yvalue = cell_temp.NumericCellValue; + var timevalue = row_temp.GetCell(0).NumericCellValue; + //double.TryParse(cell_temp.StringCellValue,out yvalue); + datalist[i - 1].Datas.Add(new TimeChartViewModel() + { + Time = DateTime.FromOADate(timevalue).ToString("HH:mm:ss"), + Y = yvalue, + }); + } + } + } + catch (Exception ex) + { + var a = ex.Message; + } + } + + + } + + return ""; + + + + } + } +} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.resx b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.resx new file mode 100644 index 0000000..ab2112f --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EndPressAnalysis.resx @@ -0,0 +1,140 @@ +锘�<?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> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.Designer.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.Designer.cs new file mode 100644 index 0000000..d16aa43 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.Designer.cs @@ -0,0 +1,619 @@ +锘縩amespace PBS.WinFrmUI.DataAnalysis +{ + partial class EnergyAnalysis + { + /// <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.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram(); + DevExpress.XtraCharts.SecondaryAxisY secondaryAxisY1 = new DevExpress.XtraCharts.SecondaryAxisY(); + DevExpress.XtraCharts.SecondaryAxisY secondaryAxisY2 = new DevExpress.XtraCharts.SecondaryAxisY(); + DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.SideBySideBarSeriesView sideBySideBarSeriesView1 = new DevExpress.XtraCharts.SideBySideBarSeriesView(); + DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.SideBySideBarSeriesView sideBySideBarSeriesView2 = new DevExpress.XtraCharts.SideBySideBarSeriesView(); + DevExpress.XtraCharts.Series series3 = new DevExpress.XtraCharts.Series(); + DevExpress.XtraCharts.LineSeriesView lineSeriesView1 = new DevExpress.XtraCharts.LineSeriesView(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.dataLayoutControl1 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton(); + this.gridControl4 = new DevExpress.XtraGrid.GridControl(); + this.pumpEnergyViewModelBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.gridView4 = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.colDate = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colSupply = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colElectricity = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colEneryOfWater = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); + this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.dateEditEndDate = new DevExpress.XtraEditors.DateEdit(); + this.dateEditStartDate = new DevExpress.XtraEditors.DateEdit(); + this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem(); + this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); + this.dataLayoutControl2 = new DevExpress.XtraDataLayout.DataLayoutControl(); + this.chartControl1 = new DevExpress.XtraCharts.ChartControl(); + this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); + this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).BeginInit(); + this.dataLayoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gridControl4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).BeginInit(); + this.dataLayoutControl2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(series3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + this.SuspendLayout(); + // + // splitContainerControl1 + // + this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainerControl1.Horizontal = false; + this.splitContainerControl1.Location = new System.Drawing.Point(0, 0); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + this.splitContainerControl1.Panel1.Controls.Add(this.dataLayoutControl1); + this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.dataLayoutControl2); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(1033, 802); + this.splitContainerControl1.SplitterPosition = 213; + this.splitContainerControl1.TabIndex = 0; + // + // dataLayoutControl1 + // + this.dataLayoutControl1.Controls.Add(this.simpleButton5); + this.dataLayoutControl1.Controls.Add(this.simpleButton6); + this.dataLayoutControl1.Controls.Add(this.simpleButton4); + this.dataLayoutControl1.Controls.Add(this.simpleButton3); + this.dataLayoutControl1.Controls.Add(this.gridControl4); + this.dataLayoutControl1.Controls.Add(this.simpleButton2); + this.dataLayoutControl1.Controls.Add(this.simpleButton1); + this.dataLayoutControl1.Controls.Add(this.dateEditEndDate); + this.dataLayoutControl1.Controls.Add(this.dateEditStartDate); + this.dataLayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl1.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl1.Name = "dataLayoutControl1"; + this.dataLayoutControl1.Root = this.Root; + this.dataLayoutControl1.Size = new System.Drawing.Size(1033, 213); + this.dataLayoutControl1.TabIndex = 0; + this.dataLayoutControl1.Text = "dataLayoutControl1"; + // + // simpleButton5 + // + this.simpleButton5.Location = new System.Drawing.Point(950, 12); + this.simpleButton5.Name = "simpleButton5"; + this.simpleButton5.Size = new System.Drawing.Size(71, 22); + this.simpleButton5.StyleController = this.dataLayoutControl1; + this.simpleButton5.TabIndex = 13; + this.simpleButton5.Text = "鏍¢獙"; + this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click); + // + // simpleButton6 + // + this.simpleButton6.Location = new System.Drawing.Point(138, 12); + this.simpleButton6.Name = "simpleButton6"; + this.simpleButton6.Size = new System.Drawing.Size(85, 22); + this.simpleButton6.StyleController = this.dataLayoutControl1; + this.simpleButton6.TabIndex = 12; + this.simpleButton6.Text = "鍓嶅崐涓湀"; + this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click); + // + // simpleButton4 + // + this.simpleButton4.Location = new System.Drawing.Point(79, 12); + this.simpleButton4.Name = "simpleButton4"; + this.simpleButton4.Size = new System.Drawing.Size(55, 22); + this.simpleButton4.StyleController = this.dataLayoutControl1; + this.simpleButton4.TabIndex = 10; + this.simpleButton4.Text = "鍓嶄竴涓湀"; + this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click); + // + // simpleButton3 + // + this.simpleButton3.Location = new System.Drawing.Point(12, 12); + this.simpleButton3.Name = "simpleButton3"; + this.simpleButton3.Size = new System.Drawing.Size(63, 22); + this.simpleButton3.StyleController = this.dataLayoutControl1; + this.simpleButton3.TabIndex = 9; + this.simpleButton3.Text = "鍓嶄笁涓湀"; + this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click); + // + // gridControl4 + // + this.gridControl4.DataSource = this.pumpEnergyViewModelBindingSource; + this.gridControl4.Location = new System.Drawing.Point(12, 38); + this.gridControl4.MainView = this.gridView4; + this.gridControl4.Name = "gridControl4"; + this.gridControl4.Size = new System.Drawing.Size(1009, 163); + this.gridControl4.TabIndex = 8; + this.gridControl4.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gridView4}); + // + // pumpEnergyViewModelBindingSource + // + //this.pumpEnergyViewModelBindingSource.DataSource = typeof(ISupply.WinFrmUI.Epanet.PumpEnergyViewModel); + // + // gridView4 + // + this.gridView4.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colDate, + this.colSupply, + this.colElectricity, + this.colEneryOfWater, + this.gridColumn1}); + this.gridView4.GridControl = this.gridControl4; + this.gridView4.Name = "gridView4"; + this.gridView4.OptionsBehavior.Editable = false; + this.gridView4.OptionsView.ShowGroupPanel = false; + this.gridView4.CustomColumnDisplayText += new DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventHandler(this.gridView4_CustomColumnDisplayText); + // + // colDate + // + this.colDate.AppearanceCell.Options.UseTextOptions = true; + this.colDate.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colDate.AppearanceHeader.Options.UseTextOptions = true; + this.colDate.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colDate.Caption = "鏃ユ湡"; + this.colDate.FieldName = "Day"; + this.colDate.MaxWidth = 150; + this.colDate.Name = "colDate"; + this.colDate.Visible = true; + this.colDate.VisibleIndex = 0; + this.colDate.Width = 150; + // + // colSupply + // + this.colSupply.AppearanceCell.Options.UseTextOptions = true; + this.colSupply.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colSupply.AppearanceHeader.Options.UseTextOptions = true; + this.colSupply.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colSupply.Caption = "鐢ㄦ按閲�(m鲁)"; + this.colSupply.FieldName = "Supply"; + this.colSupply.MaxWidth = 250; + this.colSupply.Name = "colSupply"; + this.colSupply.Visible = true; + this.colSupply.VisibleIndex = 1; + this.colSupply.Width = 250; + // + // colElectricity + // + this.colElectricity.AppearanceCell.Options.UseTextOptions = true; + this.colElectricity.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colElectricity.AppearanceHeader.Options.UseTextOptions = true; + this.colElectricity.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colElectricity.Caption = "鐢ㄧ數閲�(kW路h)"; + this.colElectricity.FieldName = "Electricity"; + this.colElectricity.MaxWidth = 250; + this.colElectricity.Name = "colElectricity"; + this.colElectricity.Visible = true; + this.colElectricity.VisibleIndex = 2; + this.colElectricity.Width = 250; + // + // colEneryOfWater + // + this.colEneryOfWater.AppearanceCell.Options.UseTextOptions = true; + this.colEneryOfWater.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colEneryOfWater.AppearanceHeader.Options.UseTextOptions = true; + this.colEneryOfWater.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.colEneryOfWater.Caption = "鍗冨惃姘磋兘鑰�(kW路h/km鲁)"; + this.colEneryOfWater.FieldName = "EnergyOfWater"; + this.colEneryOfWater.MaxWidth = 250; + this.colEneryOfWater.Name = "colEneryOfWater"; + this.colEneryOfWater.Visible = true; + this.colEneryOfWater.VisibleIndex = 3; + this.colEneryOfWater.Width = 250; + // + // gridColumn1 + // + this.gridColumn1.AppearanceCell.Options.UseTextOptions = true; + this.gridColumn1.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.gridColumn1.AppearanceHeader.Options.UseTextOptions = true; + this.gridColumn1.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + this.gridColumn1.Caption = "璇存槑"; + this.gridColumn1.Name = "gridColumn1"; + this.gridColumn1.Visible = true; + this.gridColumn1.VisibleIndex = 4; + this.gridColumn1.Width = 84; + // + // simpleButton2 + // + this.simpleButton2.Location = new System.Drawing.Point(875, 12); + this.simpleButton2.Name = "simpleButton2"; + this.simpleButton2.Size = new System.Drawing.Size(71, 22); + this.simpleButton2.StyleController = this.dataLayoutControl1; + this.simpleButton2.TabIndex = 7; + this.simpleButton2.Text = "瀵煎嚭"; + this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); + // + // simpleButton1 + // + this.simpleButton1.Location = new System.Drawing.Point(790, 12); + this.simpleButton1.Name = "simpleButton1"; + this.simpleButton1.Size = new System.Drawing.Size(81, 22); + this.simpleButton1.StyleController = this.dataLayoutControl1; + this.simpleButton1.TabIndex = 6; + this.simpleButton1.Text = "鏌ヨ"; + this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); + // + // dateEditEndDate + // + this.dateEditEndDate.EditValue = null; + this.dateEditEndDate.Location = new System.Drawing.Point(490, 12); + this.dateEditEndDate.Name = "dateEditEndDate"; + this.dateEditEndDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditEndDate.Size = new System.Drawing.Size(145, 20); + this.dateEditEndDate.StyleController = this.dataLayoutControl1; + this.dateEditEndDate.TabIndex = 5; + // + // dateEditStartDate + // + this.dateEditStartDate.EditValue = null; + this.dateEditStartDate.Location = new System.Drawing.Point(287, 12); + this.dateEditStartDate.Name = "dateEditStartDate"; + this.dateEditStartDate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.dateEditStartDate.Size = new System.Drawing.Size(139, 20); + this.dateEditStartDate.StyleController = this.dataLayoutControl1; + this.dateEditStartDate.TabIndex = 4; + // + // 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.layoutControlItem3, + this.layoutControlItem4, + this.emptySpaceItem2, + this.layoutControlItem5, + this.layoutControlItem6, + this.layoutControlItem7, + this.layoutControlItem9, + this.layoutControlItem10}); + this.Root.Name = "Root"; + this.Root.Size = new System.Drawing.Size(1033, 213); + this.Root.TextVisible = false; + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.dateEditStartDate; + this.layoutControlItem1.Location = new System.Drawing.Point(215, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.Size = new System.Drawing.Size(203, 26); + this.layoutControlItem1.Text = "寮�濮嬫棩鏈�"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem2 + // + this.layoutControlItem2.Control = this.dateEditEndDate; + this.layoutControlItem2.Location = new System.Drawing.Point(418, 0); + this.layoutControlItem2.Name = "layoutControlItem2"; + this.layoutControlItem2.Size = new System.Drawing.Size(209, 26); + this.layoutControlItem2.Text = "缁撴潫鏃ユ湡"; + this.layoutControlItem2.TextSize = new System.Drawing.Size(48, 14); + // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.simpleButton1; + this.layoutControlItem3.Location = new System.Drawing.Point(778, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(85, 26); + this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem3.TextVisible = false; + // + // layoutControlItem4 + // + this.layoutControlItem4.Control = this.simpleButton2; + this.layoutControlItem4.Location = new System.Drawing.Point(863, 0); + this.layoutControlItem4.Name = "layoutControlItem4"; + this.layoutControlItem4.Size = new System.Drawing.Size(75, 26); + this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem4.TextVisible = false; + // + // emptySpaceItem2 + // + this.emptySpaceItem2.AllowHotTrack = false; + this.emptySpaceItem2.Location = new System.Drawing.Point(627, 0); + this.emptySpaceItem2.Name = "emptySpaceItem2"; + this.emptySpaceItem2.Size = new System.Drawing.Size(151, 26); + this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0); + // + // layoutControlItem5 + // + this.layoutControlItem5.Control = this.gridControl4; + this.layoutControlItem5.Location = new System.Drawing.Point(0, 26); + this.layoutControlItem5.Name = "layoutControlItem5"; + this.layoutControlItem5.Size = new System.Drawing.Size(1013, 167); + this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem5.TextVisible = false; + // + // layoutControlItem6 + // + this.layoutControlItem6.Control = this.simpleButton3; + this.layoutControlItem6.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem6.Name = "layoutControlItem6"; + this.layoutControlItem6.Size = new System.Drawing.Size(67, 26); + this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem6.TextVisible = false; + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.simpleButton4; + this.layoutControlItem7.Location = new System.Drawing.Point(67, 0); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.Size = new System.Drawing.Size(59, 26); + this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem7.TextVisible = false; + // + // layoutControlItem9 + // + this.layoutControlItem9.Control = this.simpleButton6; + this.layoutControlItem9.Location = new System.Drawing.Point(126, 0); + this.layoutControlItem9.Name = "layoutControlItem9"; + this.layoutControlItem9.Size = new System.Drawing.Size(89, 26); + this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem9.TextVisible = false; + // + // layoutControlItem10 + // + this.layoutControlItem10.Control = this.simpleButton5; + this.layoutControlItem10.Location = new System.Drawing.Point(938, 0); + this.layoutControlItem10.Name = "layoutControlItem10"; + this.layoutControlItem10.Size = new System.Drawing.Size(75, 26); + this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem10.TextVisible = false; + // + // dataLayoutControl2 + // + this.dataLayoutControl2.Controls.Add(this.chartControl1); + this.dataLayoutControl2.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataLayoutControl2.Location = new System.Drawing.Point(0, 0); + this.dataLayoutControl2.Name = "dataLayoutControl2"; + this.dataLayoutControl2.Root = this.layoutControlGroup1; + this.dataLayoutControl2.Size = new System.Drawing.Size(1033, 579); + this.dataLayoutControl2.TabIndex = 0; + this.dataLayoutControl2.Text = "dataLayoutControl2"; + // + // chartControl1 + // + xyDiagram1.AxisX.Title.Text = ""; + xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; + xyDiagram1.AxisY.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + xyDiagram1.AxisY.Title.Text = "鐢ㄦ按閲�"; + xyDiagram1.AxisY.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + xyDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; + xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; + secondaryAxisY1.AxisID = 0; + secondaryAxisY1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + secondaryAxisY1.Name = "axisYQds"; + secondaryAxisY1.Title.Text = "鍗冨惃姘磋兘鑰�"; + secondaryAxisY1.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + secondaryAxisY1.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; + secondaryAxisY1.VisibleInPanesSerializable = "-1"; + secondaryAxisY2.Alignment = DevExpress.XtraCharts.AxisAlignment.Near; + secondaryAxisY2.AxisID = 1; + secondaryAxisY2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + secondaryAxisY2.Name = "axisYYdl"; + secondaryAxisY2.Title.Text = "鐢ㄧ數閲�"; + secondaryAxisY2.Title.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + secondaryAxisY2.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; + secondaryAxisY2.VisibleInPanesSerializable = "-1"; + xyDiagram1.SecondaryAxesY.AddRange(new DevExpress.XtraCharts.SecondaryAxisY[] { + secondaryAxisY1, + secondaryAxisY2}); + this.chartControl1.Diagram = xyDiagram1; + this.chartControl1.Legend.Margins.Bottom = 20; + this.chartControl1.Legend.Margins.Left = 20; + this.chartControl1.Legend.Margins.Right = 20; + this.chartControl1.Legend.Margins.Top = 20; + this.chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; + this.chartControl1.Location = new System.Drawing.Point(12, 12); + this.chartControl1.Name = "chartControl1"; + series1.Name = "SeriesYdl"; + sideBySideBarSeriesView1.AxisYName = "axisYYdl"; + sideBySideBarSeriesView1.Border.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + sideBySideBarSeriesView1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(149)))), ((int)(((byte)(55)))), ((int)(((byte)(52))))); + series1.View = sideBySideBarSeriesView1; + series2.Name = "SeriesYsl"; + sideBySideBarSeriesView2.Border.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + sideBySideBarSeriesView2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(73)))), ((int)(((byte)(125))))); + series2.View = sideBySideBarSeriesView2; + series3.Name = "SeriesQds"; + lineSeriesView1.AxisYName = "axisYQds"; + lineSeriesView1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(146)))), ((int)(((byte)(60))))); + series3.View = lineSeriesView1; + this.chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] { + series1, + series2, + series3}; + this.chartControl1.Size = new System.Drawing.Size(1009, 555); + this.chartControl1.TabIndex = 4; + // + // layoutControlGroup1 + // + this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + this.layoutControlGroup1.GroupBordersVisible = false; + this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { + this.layoutControlItem8}); + this.layoutControlGroup1.Name = "layoutControlGroup1"; + this.layoutControlGroup1.Size = new System.Drawing.Size(1033, 579); + this.layoutControlGroup1.TextVisible = false; + // + // layoutControlItem8 + // + this.layoutControlItem8.Control = this.chartControl1; + this.layoutControlItem8.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem8.Name = "layoutControlItem8"; + this.layoutControlItem8.Size = new System.Drawing.Size(1013, 559); + this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); + this.layoutControlItem8.TextVisible = false; + // + // EboxFormEnergyAnalysis + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainerControl1); + this.Name = "EboxFormEnergyAnalysis"; + this.Size = new System.Drawing.Size(1033, 802); + this.Load += new System.EventHandler(this.EboxFormEnergyAnalysis_Load); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl1)).EndInit(); + this.dataLayoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gridControl4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pumpEnergyViewModelBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gridView4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditEndDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties.CalendarTimeProperties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dateEditStartDate.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataLayoutControl2)).EndInit(); + this.dataLayoutControl2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(secondaryAxisY2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(series3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.chartControl1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl1; + private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraEditors.DateEdit dateEditEndDate; + private DevExpress.XtraEditors.DateEdit dateEditStartDate; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2; + private DevExpress.XtraGrid.GridControl gridControl4; + private DevExpress.XtraGrid.Views.Grid.GridView gridView4; + private DevExpress.XtraGrid.Columns.GridColumn colDate; + private DevExpress.XtraGrid.Columns.GridColumn colSupply; + private DevExpress.XtraGrid.Columns.GridColumn colElectricity; + private DevExpress.XtraGrid.Columns.GridColumn colEneryOfWater; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton simpleButton6; + private DevExpress.XtraEditors.SimpleButton simpleButton4; + private DevExpress.XtraEditors.SimpleButton simpleButton3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private System.Windows.Forms.BindingSource pumpEnergyViewModelBindingSource; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraDataLayout.DataLayoutControl dataLayoutControl2; + private DevExpress.XtraCharts.ChartControl chartControl1; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraEditors.SimpleButton simpleButton5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; + } +} diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.cs new file mode 100644 index 0000000..1c560bc --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.cs @@ -0,0 +1,286 @@ +锘縰sing DevExpress.XtraCharts; +using DevExpress.XtraEditors; +using NPOI.HSSF.UserModel; +using NPOI.SS.Formula.Functions; +using NPOI.SS.UserModel; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Yw.WinFrmUI; + +namespace PBS.WinFrmUI.DataAnalysis +{ + public partial class EnergyAnalysis : DocumentPage + { + private string startCode = "[&start&]"; + private string endCode = "[&end&]"; + private string paramCode = "[¶m&]"; + private string getenergyanalyCode = "getenergyanaly";//鑾峰彇鑳借�楀垎鏋愭暟鎹� + private string analydayCode = "analyday";//鏍¢獙鑳借�楀垎鏋� + + public EnergyAnalysis() + { + this.PageTitle.Caption = "鑳借�楀垎鏋�"; + InitializeComponent(); + + _series_ysl.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + _series_ydl.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + _series_qds.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + + ((SideBySideBarSeriesLabel)_series_ysl.Label).Position = BarSeriesLabelPosition.Top; + ((SideBySideBarSeriesLabel)_series_ydl.Label).Position = BarSeriesLabelPosition.Top; + + _series_ysl.CrosshairLabelPattern = "鐢ㄦ按閲�:{V:N2} m鲁"; + _series_ydl.CrosshairLabelPattern = "鐢ㄧ數閲�:{V:N2} kW路h"; + _series_qds.CrosshairLabelPattern = "鍗冨惃姘磋兘鑰�:{V:N2} kW路h/km鲁"; + } + + private void InitDate() + { + this.dateEditStartDate.Text = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + } + + List<PumpEnergyViewModel> _models; + public void BindData(List<PumpEnergyViewModel> models) + { + _models = models; + this.pumpEnergyViewModelBindingSource.DataSource = models; + this.gridView4.RefreshData(); + SetChart(models); + } + + // private XYDiagram _diagram_xy { get { return this.chartControl1.Diagram as XYDiagram; } } + private Series _series_ysl { get { return this.chartControl1.Series[1]; } } + private Series _series_ydl { get { return this.chartControl1.Series[0]; } } + private Series _series_qds { get { return this.chartControl1.Series[2]; } } + + private void SetChart(List<PumpEnergyViewModel> models) + { + this.chartControl1.BeginInit(); + + _series_ysl.Points.Clear(); + _series_ydl.Points.Clear(); + _series_qds.Points.Clear(); + foreach (var item in models) + { + _series_ysl.Points.Add(new SeriesPoint(item.Day, item.Supply)); + _series_ydl.Points.Add(new SeriesPoint(item.Day, item.Electricity)); + _series_qds.Points.Add(new SeriesPoint(item.Day, item.EnergyOfWater)); + } + + + //chartControl1.Series.Clear(); + //var seriesSupply = new Series("鐢ㄦ按閲�", ViewType.Bar); + //seriesSupply.DataSource = models; + //seriesSupply.ArgumentScaleType = ScaleType.Qualitative; + //seriesSupply.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + //var labelSupply = (SideBySideBarSeriesLabel)seriesSupply.Label; + //labelSupply.Position = BarSeriesLabelPosition.Top; + //seriesSupply.ArgumentDataMember = "Day"; + //seriesSupply.ValueScaleType = ScaleType.Numerical; + //seriesSupply.ValueDataMembers.AddRange(new string[] { "Supply" }); + + //var seriesElectricity = new Series("鐢ㄧ數閲�", ViewType.Bar); + //seriesElectricity.DataSource = models; + //seriesElectricity.ArgumentScaleType = ScaleType.Qualitative; + //seriesElectricity.ArgumentDataMember = "Day"; + //seriesElectricity.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + //var labelElectricity = (SideBySideBarSeriesLabel)seriesElectricity.Label; + //labelElectricity.Position = BarSeriesLabelPosition.Top; + //seriesElectricity.ValueScaleType = ScaleType.Numerical; + //seriesElectricity.ValueDataMembers.AddRange(new string[] { "Electricity" }); + + + //var xy_diagram = this.chartControl1.Diagram as XYDiagram; + //var axis_y = new SecondaryAxisY(); + //axis_y.Title.Text = "%"; + //axis_y.Alignment = AxisAlignment.Far; + //axis_y.Visibility = DevExpress.Utils.DefaultBoolean.True; + //xy_diagram.SecondaryAxesY.Add(axis_y); + + + //var lineEnergyOfWater = new Series("鍚ㄦ按鑳借��", ViewType.Line); + //lineEnergyOfWater.DataSource = models; + //lineEnergyOfWater.ArgumentScaleType = ScaleType.Qualitative; + //lineEnergyOfWater.ArgumentDataMember = "Day"; + //lineEnergyOfWater.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True; + //lineEnergyOfWater.ValueScaleType = ScaleType.Numerical; + ////var labelEnergyOfWater = (SideBySideBarSeriesLabel)lineEnergyOfWater.Label; + ////labelEnergyOfWater.Position = BarSeriesLabelPosition.Top; + //lineEnergyOfWater.ValueDataMembers.AddRange(new string[] { "EnergyOfWater" }); + //((LineSeriesView)lineEnergyOfWater.View).AxisY = axis_y; + + //chartControl1.Series.Add(seriesSupply); + //chartControl1.Series.Add(seriesElectricity); + //chartControl1.Series.Add(lineEnergyOfWater); + + + this.chartControl1.EndInit(); + } + + private void EboxFormEnergyAnalysis_Load(object sender, EventArgs e) + { + InitDate(); + Search(); + } + + private void Search() + { + var m = new GetCalcValueModel() + { + StartDate = DateTime.Parse(this.dateEditStartDate.EditValue.ToString()), + EndDate = DateTime.Parse(this.dateEditEndDate.EditValue.ToString()), + }; + + SendText(startCode + getenergyanalyCode + paramCode + JsonHelper.Object2Json(m) + endCode); + } + + public event EventHandler<string> SendData; + private void SendText(string content) + { + //BluetoothHelper.GetInstance().SendData(content); + SendData?.Invoke(null, content); + } + /// <summary> + /// 鏌ヨ + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton1_Click(object sender, EventArgs e) + { + Search(); + } + + /// <summary> + /// 瀵煎嚭 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton2_Click(object sender, EventArgs e) + { + ExportXLS(); + } + + public void ExportXLS() + { + try + { + if (_models == null || _models.Count == 0) + { + XtraMessageBox.Show("娌℃湁鍙鍑虹殑鏁版嵁!"); + return; + } + + var dlg = new SaveFileDialog(); + dlg.Filter = "EXCEL 鏂囦欢(*.xls)|*.xls"; + if (dlg.ShowDialog() != DialogResult.OK) + return; + + HSSFWorkbook theBook = new HSSFWorkbook(); + var theSheet1 = theBook.CreateSheet("Sheet1"); + + IRow rowTile = theSheet1.CreateRow(0); + rowTile.CreateCell(0).SetCellValue("鏃ユ湡"); + rowTile.CreateCell(1).SetCellValue("鐢ㄦ按閲�(m鲁)"); + rowTile.CreateCell(2).SetCellValue("鐢ㄧ數閲�(kW路h)"); + rowTile.CreateCell(3).SetCellValue("鍗冨惃姘磋兘鑰�(kW路h/km鲁)"); + + + for (int rowIndex = 1; rowIndex <= _models.Count; rowIndex++) + { + int col = 0; + IRow row = theSheet1.CreateRow(rowIndex); + var celValue = _models[rowIndex - 1].Day; + var dt = DateTime.Parse(celValue); + row.CreateCell(col).SetCellValue(celValue + " " + dt.ToString("dddd")); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].Supply); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].Electricity); + col++; + row.CreateCell(col).SetCellValue((double)_models[rowIndex - 1].EnergyOfWater); + col++; + } + + //寮哄埗Excel鍦ㄦ墦寮�鏃堕噸鏂拌绠楁墍鏈夊叕寮� + theSheet1.ForceFormulaRecalculation = true; + using (FileStream fs = File.OpenWrite(dlg.FileName)) + { + theBook.Write(fs); + } + XtraMessageBox.Show("瀵煎嚭鎴愬姛"); + + } + catch (Exception ex) + { + XtraMessageBox.Show(ex.ToString()); + } + } + + /// <summary> + /// 鍓嶄笁涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton3_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddMonths(-3).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + /// <summary> + /// 鍓嶄竴涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton4_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + /// <summary> + /// 鍓嶅崐涓湀 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void simpleButton6_Click(object sender, EventArgs e) + { + this.dateEditStartDate.Text = DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd"); + this.dateEditEndDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); + Search(); + } + + private void simpleButton5_Click(object sender, EventArgs e) + { + var dlg = new AnalyDayForm(); + if (dlg.ShowDialog() == DialogResult.OK) + { + var dt = dlg.CurrDateTime; + SendText(startCode + analydayCode + paramCode + dt + endCode); + MessageBoxHelper.ShowInfo("鎿嶄綔鎴愬姛"); + } + } + + private void gridView4_CustomColumnDisplayText(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) + { + if (e.Column.FieldName == "Day") + { + var celValue = e.Value.ToString(); + var dt = DateTime.Parse(celValue); + e.DisplayText = celValue + " " + dt.ToString("dddd"); + } + } + } + +} diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.resx b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.resx new file mode 100644 index 0000000..e837ff8 --- /dev/null +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/EnergyAnalysis.resx @@ -0,0 +1,126 @@ +锘�<?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="pumpEnergyViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>25</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.Designer.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.Designer.cs index 390701e..df1ee6d 100644 --- a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.Designer.cs +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.Designer.cs @@ -30,26 +30,22 @@ /// </summary> private void InitializeComponent() { - DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlowPressAnalysis)); + XYDiagram xyDiagram1 = new XYDiagram(); + LayoutDefinition layoutDefinition1 = new LayoutDefinition(); + LayoutDefinition layoutDefinition2 = new LayoutDefinition(); + LayoutDefinition layoutDefinition3 = new LayoutDefinition(); + SecondaryAxisY secondaryAxisy1 = new SecondaryAxisY(); + Series series1 = new Series(); + SplineSeriesView splineSeriesView1 = new SplineSeriesView(); + Series series2 = new Series(); + SplineSeriesView splineSeriesView2 = new SplineSeriesView(); ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); - chartControl1 = new DevExpress.XtraCharts.ChartControl(); + chartControl1 = new ChartControl(); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)chartControl1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)xyDiagram1).BeginInit(); - - DevExpress.XtraCharts.LayoutDefinition layoutDefinition1 = new DevExpress.XtraCharts.LayoutDefinition(); - DevExpress.XtraCharts.LayoutDefinition layoutDefinition2 = new DevExpress.XtraCharts.LayoutDefinition(); - DevExpress.XtraCharts.LayoutDefinition layoutDefinition3 = new DevExpress.XtraCharts.LayoutDefinition(); - DevExpress.XtraCharts.SecondaryAxisY secondaryAxisy1 = new DevExpress.XtraCharts.SecondaryAxisY(); - DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series(); - DevExpress.XtraCharts.SplineSeriesView splineSeriesView1 = new DevExpress.XtraCharts.SplineSeriesView(); - DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series(); - DevExpress.XtraCharts.SplineSeriesView splineSeriesView2 = new DevExpress.XtraCharts.SplineSeriesView(); - chartControl1 = new DevExpress.XtraCharts.ChartControl(); ((System.ComponentModel.ISupportInitialize)chartControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)xyDiagram1).BeginInit(); ((System.ComponentModel.ISupportInitialize)secondaryAxisy1).BeginInit(); @@ -98,6 +94,8 @@ // chartControl1 // chartControl1.BorderOptions.Visibility = DevExpress.Utils.DefaultBoolean.False; + xyDiagram1.AxisX.Alignment = AxisAlignment.Zero; + xyDiagram1.AxisX.Title.EnableAntialiasing = DevExpress.Utils.DefaultBoolean.True; xyDiagram1.AxisX.Title.Text = "鏃堕棿"; xyDiagram1.AxisX.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; xyDiagram1.AxisX.VisibleInPanesSerializable = "-1"; @@ -105,34 +103,36 @@ xyDiagram1.AxisY.Label.TextColor = Color.DodgerBlue; xyDiagram1.AxisY.Title.Alignment = StringAlignment.Far; xyDiagram1.AxisY.Title.EnableAntialiasing = DevExpress.Utils.DefaultBoolean.False; - xyDiagram1.AxisY.Title.Text = "娴侀噺"; + xyDiagram1.AxisY.Title.Text = "娴侀噺(m鲁/h)"; xyDiagram1.AxisY.Title.TextColor = Color.DodgerBlue; xyDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.True; xyDiagram1.AxisY.VisibleInPanesSerializable = "-1"; xyDiagram1.DefaultPane.BorderVisible = false; xyDiagram1.DefaultPane.Title.Text = "鏃犳暟鎹�"; - xyDiagram1.PaneLayout.AutoLayoutMode = DevExpress.XtraCharts.PaneAutoLayoutMode.Grid; - xyDiagram1.PaneLayout.RowDefinitions.AddRange(new DevExpress.XtraCharts.LayoutDefinition[] { layoutDefinition1, layoutDefinition2, layoutDefinition3 }); + xyDiagram1.PaneLayout.AutoLayoutMode = PaneAutoLayoutMode.Grid; + xyDiagram1.PaneLayout.RowDefinitions.AddRange(new LayoutDefinition[] { layoutDefinition1, layoutDefinition2, layoutDefinition3 }); + xyDiagram1.RangeControlTimeSpanGridOptions.GridAlignment = TimeSpanGridAlignment.Minute; + xyDiagram1.RangeControlTimeSpanGridOptions.GridMode = ChartRangeControlClientGridMode.Manual; secondaryAxisy1.AxisID = 0; secondaryAxisy1.Color = Color.Green; secondaryAxisy1.Label.Border.Visibility = DevExpress.Utils.DefaultBoolean.False; secondaryAxisy1.Label.TextColor = Color.Green; secondaryAxisy1.Name = "AxisYEff"; - secondaryAxisy1.Title.Text = "鍘嬪姏"; + secondaryAxisy1.Title.Text = "鍘嬪姏(MPa)"; secondaryAxisy1.Title.TextColor = Color.Green; secondaryAxisy1.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default; secondaryAxisy1.VisibleInPanesSerializable = "-1"; - xyDiagram1.SecondaryAxesY.AddRange(new DevExpress.XtraCharts.SecondaryAxisY[] { secondaryAxisy1 }); + xyDiagram1.SecondaryAxesY.AddRange(new SecondaryAxisY[] { secondaryAxisy1 }); chartControl1.Diagram = xyDiagram1; chartControl1.Dock = DockStyle.Fill; - chartControl1.Legend.AlignmentHorizontal = DevExpress.XtraCharts.LegendAlignmentHorizontal.Right; + chartControl1.Legend.AlignmentHorizontal = LegendAlignmentHorizontal.Right; chartControl1.Legend.Border.Visibility = DevExpress.Utils.DefaultBoolean.False; - chartControl1.Legend.Direction = DevExpress.XtraCharts.LegendDirection.LeftToRight; + chartControl1.Legend.Direction = LegendDirection.LeftToRight; chartControl1.Legend.LegendID = -1; - chartControl1.Legend.MarkerMode = DevExpress.XtraCharts.LegendMarkerMode.CheckBoxAndMarker; + chartControl1.Legend.MarkerMode = LegendMarkerMode.CheckBoxAndMarker; chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; - chartControl1.Location = new Point(0, 0); - chartControl1.Margin = new Padding(2, 2, 2, 2); + chartControl1.Location = new Point(0, 128); + chartControl1.Margin = new Padding(2); chartControl1.Name = "chartControl1"; series1.Name = "SeriesQH"; series1.SeriesID = 0; @@ -143,12 +143,12 @@ splineSeriesView2.AxisYName = "AxisYEff"; splineSeriesView2.Color = Color.FromArgb(155, 187, 89); series2.View = splineSeriesView2; - chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[] + chartControl1.SeriesSerializable = new Series[] { series1, series2 }; - chartControl1.Size = new Size(716, 545); + chartControl1.Size = new Size(1003, 561); chartControl1.TabIndex = 0; // // FlowPressAnalysis @@ -162,6 +162,12 @@ Name = "FlowPressAnalysis"; Size = new Size(1003, 689); ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)secondaryAxisy1).EndInit(); + ((System.ComponentModel.ISupportInitialize)xyDiagram1).EndInit(); + ((System.ComponentModel.ISupportInitialize)splineSeriesView1).EndInit(); + ((System.ComponentModel.ISupportInitialize)series1).EndInit(); + ((System.ComponentModel.ISupportInitialize)splineSeriesView2).EndInit(); + ((System.ComponentModel.ISupportInitialize)series2).EndInit(); ((System.ComponentModel.ISupportInitialize)chartControl1).EndInit(); ResumeLayout(false); PerformLayout(); diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.cs b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.cs index 9072a0b..3886f99 100644 --- a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.cs +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/FlowPressAnalysis.cs @@ -41,8 +41,7 @@ #region Private Variable private XYDiagram _diagram; - private XYDiagramDefaultPane _default_pane; - private XYDiagramPane _bottom_pane; + private XYDiagramDefaultPane _default_pane; private AxisX _axis_x_flow; private AxisY _axis_y_head; @@ -58,24 +57,28 @@ this.chartControl1.RuntimeHitTesting = true; - - + this.chartControl1.Legend.Visibility = DefaultBoolean.True; _diagram = (XYDiagram)this.chartControl1.Diagram; + _diagram.EnableAxisXScrolling = true; + _diagram.EnableAxisYScrolling = true; + _diagram.EnableAxisXZooming = true; + _diagram.EnableAxisYZooming = true; _default_pane = _diagram.DefaultPane; - _bottom_pane = (XYDiagramPane)_diagram.FindPaneByName("BottomPanel"); - _axis_x_flow = _diagram.AxisX; + _diagram.AxisX.TimeSpanScaleOptions.MeasureUnit = TimeSpanMeasureUnit.Minute; + _diagram.AxisX.TimeSpanScaleOptions.ScaleMode = ScaleMode.Continuous; + + _axis_x_flow = _diagram.AxisX; _axis_y_head = _diagram.AxisY; _axis_y_eff = _diagram.SecondaryAxesY.GetAxisByName("AxisYEff"); _axis_y_eff.Alignment = AxisAlignment.Far; - - _axis_x_flow.Visibility = DefaultBoolean.False; - _axis_x_flow.GridLines.Visible = false; - _axis_y_head.Visibility = DefaultBoolean.False; - _axis_y_head.GridLines.Visible = false; - _axis_y_eff.Visibility = DefaultBoolean.False; + + _axis_x_flow.GridLines.Visible = false; + _axis_y_head.GridLines.Visible = false; _axis_y_eff.GridLines.Visible = false; + + this.chartControl1.CrosshairEnabled = DefaultBoolean.True; } @@ -108,7 +111,7 @@ foreach (var vm in vm_list) { - if (vm.Name.Contains("鍘嬪姏")) + if (!vm.Name.Contains("鍘嬪姏")) { axis_x = _axis_x_flow; axis_y = _axis_y_head; @@ -124,6 +127,16 @@ AddLineSeries(vm.Name, axis_x, axis_y, pane, vm.Datas); } + + var min_x = vm_list.SelectMany(x => x.Datas).Min(x => TimeSpan.Parse(x.Time)); + var max_x = vm_list.SelectMany(x => x.Datas).Max(x => TimeSpan.Parse(x.Time)); + + + _axis_x_flow.NumericScaleOptions.AutoGrid = false; + _axis_x_flow.WholeRange.SideMarginsValue = 0; + _axis_x_flow.VisualRange.SideMarginsValue = 0; + _axis_x_flow.WholeRange.SetMinMaxValues(min_x,max_x); + _axis_x_flow.VisualRange.SetMinMaxValues(min_x,max_x); this.chartControl1.EndInit(); @@ -162,13 +175,17 @@ view.EmptyPointOptions.Color = Color.Transparent; view.Pane = pane; - var series_pt_list = pt_list.Select(x => new SeriesPoint(x.Time, x.Y)).ToArray(); + + var series_pt_list = pt_list.Select(x => new SeriesPoint(TimeSpan.Parse(x.Time), x.Y)).ToArray(); var series = new DevExpress.XtraCharts.Series(); series.Tag = id; - series.ShowInLegend = false; - series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.DateTime; + //series.ShowInLegend = false; + series.Name = id; + series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.TimeSpan; + series.TimeSpanSummaryOptions.MeasureUnit = TimeSpanMeasureUnit.Minute; series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False; - series.CrosshairEnabled = DefaultBoolean.False; + series.CrosshairEnabled = DefaultBoolean.True; + series.CrosshairLabelPattern = id + ":{V:N2}"; series.ToolTipEnabled = DefaultBoolean.False; series.SeriesPointsSorting = SortingMode.None; series.Visible = true; @@ -180,95 +197,101 @@ public static string ParseExcel(string fileName, out List<FlowPressChartViewModel> datalist) { datalist = new List<FlowPressChartViewModel>(); - try + + if (!File.Exists(fileName)) + return "鏂囦欢涓嶅瓨鍦�"; + int line = 0; + + //鍒濆鍖栨枃浠� + NPOI.HSSF.UserModel.HSSFWorkbook theBook = null; + using (FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.ReadWrite)) { - if (!File.Exists(fileName)) - return "鏂囦欢涓嶅瓨鍦�"; - int line = 0; + theBook = new NPOI.HSSF.UserModel.HSSFWorkbook(file); + } - //鍒濆鍖栨枃浠� - NPOI.HSSF.UserModel.HSSFWorkbook theBook = null; - using (FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.ReadWrite)) - { - theBook = new NPOI.HSSF.UserModel.HSSFWorkbook(file); - } - - //妫�鏌ヨ〃鏍兼槸鍚︾鍚� - NPOI.SS.UserModel.ISheet sheet1 = theBook.GetSheet("Sheet1"); + //妫�鏌ヨ〃鏍兼槸鍚︾鍚� + NPOI.SS.UserModel.ISheet sheet1 = theBook.GetSheet("Sheet1"); + if (sheet1 == null) + { + sheet1 = theBook.GetSheetAt(0); if (sheet1 == null) - { - sheet1 = theBook.GetSheetAt(0); - if (sheet1 == null) - return ("鏃燬heet鏁版嵁"); - } + return ("鏃燬heet鏁版嵁"); + } - //鏍囬琛� - int title_line_index = 0; + //鏍囬琛� + int title_line_index = 0; - var row_title = sheet1.GetRow(title_line_index); - if (row_title == null) - { - return ("绗竴琛岀涓�鍒椾笉鑳界┖"); - } + var row_title = sheet1.GetRow(title_line_index); + if (row_title == null) + { + return ("绗竴琛岀涓�鍒椾笉鑳界┖"); + } - //寮�濮嬭鍙栫殑琛� - int start_line = title_line_index + 1; - var cell_0 = row_title.GetCell(0); - if (cell_0 == null) - { - return ("鏃犳硶璇诲彇琛ㄥご鏂囦欢"); - } + //寮�濮嬭鍙栫殑琛� + int start_line = title_line_index + 1; + var cell_0 = row_title.GetCell(0); + if (cell_0 == null) + { + return ("鏃犳硶璇诲彇琛ㄥご鏂囦欢"); + } - var totalcell = row_title.Cells.Count; - for (int i = 0; i < totalcell; i++) + var totalcell = row_title.Cells.Count; + for (int i = 0; i < totalcell; i++) + { + if (i > 0) { - if (i > 0) + var row_cell = row_title.GetCell(i); + if (row_cell != null) { - var row_cell = row_title.GetCell(i); - if (row_cell != null) + datalist.Add(new FlowPressChartViewModel() { - datalist.Add(new FlowPressChartViewModel() - { - Name = row_cell.StringCellValue, - Datas = new List<TimeChartViewModel>() - }); - } + Name = row_cell.StringCellValue, + Datas = new List<TimeChartViewModel>() + }); } } + } - NPOI.SS.UserModel.IRow row_temp = null; - NPOI.SS.UserModel.ICell cell; + NPOI.SS.UserModel.IRow row_temp = null; + NPOI.SS.UserModel.ICell cell; - for (line = start_line; line < 10000; line++) + for (line = start_line; line < 10000; line++) + { + + row_temp = sheet1.GetRow(line); + if (row_temp == null) + break; + + for (int i = 0; i < totalcell; i++) { - - row_temp = sheet1.GetRow(line); - if (row_temp == null) - break; - - for (int i = 0; i < totalcell; i++) + try { if (i > 0) { var cell_temp = row_temp.GetCell(i); - datalist[i].Datas.Add(new TimeChartViewModel() + double yvalue = cell_temp.NumericCellValue; + var timevalue = row_temp.GetCell(0).NumericCellValue; + //double.TryParse(cell_temp.StringCellValue,out yvalue); + datalist[i - 1].Datas.Add(new TimeChartViewModel() { - Time = row_temp.GetCell(0).StringCellValue, - Y = row_temp.GetCell(i).NumericCellValue, + Time = DateTime.FromOADate(timevalue).ToString("HH:mm:ss"), + Y = yvalue, }); } } - - + catch (Exception ex) + { + var a = ex.Message; + } } - return ""; } - catch (Exception ex) - { - return "鏂囦欢寮傚父!"; - } + + return ""; + + + } } } \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/PBS.WinFrmUI.DataAnalysis.csproj b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/PBS.WinFrmUI.DataAnalysis.csproj index 7e543ce..2bcd2cf 100644 --- a/WinFrmUI/PBS.WinFrmUI.DataAnalysis/PBS.WinFrmUI.DataAnalysis.csproj +++ b/WinFrmUI/PBS.WinFrmUI.DataAnalysis/PBS.WinFrmUI.DataAnalysis.csproj @@ -19,11 +19,14 @@ </ItemGroup> <ItemGroup> + <Compile Remove="EnergyAnalysis.cs" /> + <Compile Remove="EnergyAnalysis.Designer.cs" /> <Compile Remove="PumpViewChart.cs" /> <Compile Remove="PumpViewChart.Designer.cs" /> </ItemGroup> <ItemGroup> + <EmbeddedResource Remove="EnergyAnalysis.resx" /> <EmbeddedResource Remove="PumpViewChart.resx" /> </ItemGroup> @@ -37,6 +40,9 @@ </ItemGroup> <ItemGroup> + <Compile Update="EndPressAnalysis.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> diff --git a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Facilities.cs b/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Facilities.cs deleted file mode 100644 index 3188d17..0000000 --- a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Facilities.cs +++ /dev/null @@ -1,249 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Linq; - -namespace ISupply.Model -{ - /// <summary> - /// 璁炬柦 - /// </summary> - public class Facilities : Model.BaseTraceModel, System.ICloneable - { - public Facilities() { } - public Facilities(Facilities rhs) : base(rhs) - { - this.TemplateID = rhs.TemplateID; - this.Name = rhs.Name; - this.BuildingID = rhs.BuildingID; - this.SupplyMode = rhs.SupplyMode; - this.Floor = rhs.Floor; - this.FloorHouseHolds = rhs.FloorHouseHolds; - this.FloorHeight = rhs.FloorHeight; - this.Flags = rhs.Flags?.ToList(); - this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; - this.SortCode = rhs.SortCode; - this.Description = rhs.Description; - this.HouseLength = rhs.HouseLength; - this.FID = rhs.FID; - this.ModelConfig = rhs.ModelConfig; - this.Model3dID = rhs.Model3dID; - this.ChangeCoefficient = rhs.ChangeCoefficient; - this.WaterAmount = rhs.WaterAmount; - this.WaterHeight = rhs.WaterHeight; - this.WaterPressure = rhs.WaterPressure; - this.CompletePlant = rhs.CompletePlant; - this.WaterSupply = rhs.WaterSupply; - this.ColorGrade = rhs.ColorGrade; - this.ModelType = rhs.ModelType; - this.MaxHeight = rhs.MaxHeight; - this.ViewParams = rhs.ViewParams; - this.ConstantP = rhs.ConstantP; - } - - public void Reset(Facilities rhs) - { - base.Reset(rhs); - this.ID = rhs.ID; - this.TemplateID = rhs.TemplateID; - this.Name = rhs.Name; - this.BuildingID = rhs.BuildingID; - this.SupplyMode = rhs.SupplyMode; - this.Floor = rhs.Floor; - this.FloorHouseHolds = rhs.FloorHouseHolds; - this.FloorHeight = rhs.FloorHeight; - this.Flags = rhs.Flags?.ToList(); - this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; - this.SortCode = rhs.SortCode; - this.Description = rhs.Description; - this.HouseLength = rhs.HouseLength; - this.ModelConfig = rhs.ModelConfig; - this.Model3dID = rhs.Model3dID; - this.FID = rhs.FID; - this.ChangeCoefficient = rhs.ChangeCoefficient; - this.WaterAmount = rhs.WaterAmount; - this.WaterHeight = rhs.WaterHeight; - this.WaterPressure = rhs.WaterPressure; - this.CompletePlant = rhs.CompletePlant; - this.WaterSupply = rhs.WaterSupply; - this.UpdateTime = DateTime.Now; - this.ModelType = rhs.ModelType; - this.ColorGrade = rhs.ColorGrade; - this.MaxHeight = rhs.MaxHeight; - this.ViewParams = rhs.ViewParams; - this.ConstantP=rhs.ConstantP; - } - /// <summary> - /// 棰滆壊鍒嗙骇 - /// </summary> - [Display(Name = "棰滆壊鍒嗙骇")] - public string ColorGrade { get; set; } - - /// <summary> - /// 妯″瀷鏄剧ず鍙傛暟 - /// </summary> - [Browsable(false)] - [Display(Name = "妯″瀷鏄剧ず鍙傛暟")] - public string ViewParams { get; set; } - /// <summary> - /// 妯″瀷绫诲瀷锛宖ire:娑堥槻,supply:浜屼緵 - /// </summary> - [Display(Name = "妯″瀷绫诲瀷")] - public string ModelType { get; set; } - /// <summary> - /// 鍚嶇О - /// </summary> - [Display(Name = "鍚嶇О")] - public string Name { get; set; } - - /// <summary> - /// 妯℃澘鏍囪瘑 - /// </summary> - [Display(Name = "妯℃澘鏍囪瘑")] - public long TemplateID { get; set; } - - /// <summary> - /// 寤虹瓚鐗㊣D - /// </summary> - [Display(Name = "寤虹瓚鐗㊣D")] - public long BuildingID { get; set; } - - /// <summary> - /// 渚涙按妯″紡 - /// </summary> - [Display(Name = "渚涙按妯″紡")] - public Model.eSupplyMode SupplyMode { get; set; } - - /// <summary> - /// 妤煎眰 - /// </summary> - [Display(Name = "妤煎眰")] - public int? Floor { get; set; } - - /// <summary> - /// 鎴锋暟 - /// </summary> - [Display(Name = "鎴锋暟")] - public int? FloorHouseHolds { get; set; } - - /// <summary> - /// 灞傞珮 - /// </summary> - [Display(Name = "灞傞珮")] - public decimal? FloorHeight { get; set; } - - /// <summary> - /// 鍏ユ埛绠¢暱 - /// </summary> - [Display(Name = "鍏ユ埛绠¢暱")] - public decimal? HouseLength { get; set; } - - /// <summary> - /// 鎭掑畾鍘嬪姏 - /// </summary> - [Display(Name = "鎭掑畾鍘嬪姏")] - public decimal? ConstantP { get; set; } - - /// <summary> - /// 妯″瀷閰嶇疆 - /// </summary> - [Display(Name = "妯″瀷閰嶇疆")] - public string ModelConfig { get; set; } - - /// <summary> - /// 涓夌淮妯″瀷ID - /// </summary> - [Display(Name = "涓夌淮妯″瀷ID")] - public string Model3dID { get; set; } - - /// <summary> - /// 鏍囩鍒楄〃 - /// </summary> - [Display(Name = "鏍囩鍒楄〃")] - public List<string> Flags { get; set; } - - /// <summary> - /// 鏍囩鍚嶇О - /// </summary> - [Display(Name = "鏍囩鍚嶇О")] - public string TagName { get; set; } - - /// <summary> - /// 浣跨敤鐘舵�� - /// </summary> - [Display(Name = "浣跨敤鐘舵��")] - public Model.eUseStatus UseStatus { get; set; } - - /// <summary> - /// 鎺掑簭鐮� - /// </summary> - [Display(Name = "鎺掑簭鐮�")] - public int SortCode { get; set; } - - /// <summary> - /// 璇存槑 - /// </summary> - [Display(Name = "璇存槑")] - public string Description { get; set; } - - /// <summary> - /// 灏忔椂鍙樺寲绯绘暟 - /// </summary> - [Display(Name = "灏忔椂鍙樺寲绯绘暟")] - public double ChangeCoefficient { get; set; } - - /// <summary> - /// 鍗敓鍣ㄥ叿缁欐按褰撻噺 - /// </summary> - [Display(Name = "鍗敓鍣ㄥ叿缁欐按褰撻噺")] - public double WaterAmount { get; set; } - - /// <summary> - /// 鏈�澶х敤姘撮噺 - /// </summary> - [Display(Name = "鏈�澶х敤姘撮噺")] - public double WaterHeight { get; set; } - - /// <summary> - /// 鐢ㄦ埛鍘嬪姏闇�姹� - /// </summary> - [Display(Name = "鐢ㄦ埛鍘嬪姏闇�姹�")] - public double WaterPressure { get; set; } - - /// <summary> - /// 鎴愬璁惧 - /// </summary> - [Display(Name = "鎴愬璁惧")] - public string CompletePlant { get; set; } - - /// <summary> - /// 鏈�楂樻ゼ灞傛爣楂� - /// </summary> - [Display(Name = "鏈�楂樻ゼ灞傛爣楂�")] - public double MaxHeight { get; set; } - /// <summary> - /// 渚涙按鍗曞厓 - /// </summary> - [Display(Name = "渚涙按鍗曞厓")] - public string WaterSupply { get; set; } - - /// <summary> - /// FID - /// </summary> - [Display(Name = "FID")] - public string FID { get; set; } - - public Facilities Clone() - { - return (Facilities)this.MemberwiseClone(); - } - - object ICloneable.Clone() - { - return this.MemberwiseClone(); - } - } -} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Kit.cs b/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Kit.cs deleted file mode 100644 index 2c83b5d..0000000 --- a/WinFrmUI/PBS.WinFrmUI/IBoxViewModel/Kit.cs +++ /dev/null @@ -1,374 +0,0 @@ -锘縰sing System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; - -namespace ISupply.Model -{ - /// <summary> - /// 鎴愬璁惧妯℃澘 - /// </summary> - public class Kit : Model.BaseModel, System.ICloneable - { - public Kit() - { } - - public Kit(Kit rhs) : base(rhs) - { - this.Name = rhs.Name; - this.NO = rhs.NO; - this.Specification = rhs.Specification; - this.EquipmentCount = rhs.EquipmentCount; - //this.RunningMode = rhs.RunningMode; - //this.RunningCount = rhs.RunningCount; - //this.Qr = rhs.Qr; - //this.Hr = rhs.Hr; - //this.Pr = rhs.Pr; - //this.Vr = rhs.Vr; - //this.CoolingMethod = rhs.CoolingMethod; - //this.SafetyFeature = rhs.SafetyFeature; - this.Wattage = rhs.Wattage; - this.Flags = rhs.Flags; - this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; - this.FluidTempMax = rhs.FluidTempMax; - this.MaximumOperatingPressure = rhs.MaximumOperatingPressure; - this.MaximumOperatingTemperature = rhs.MaximumOperatingTemperature; - this.MotorIPRating = rhs.MotorIPRating; - this.NetWeight = rhs.NetWeight; - this.NumberofMotorPoles = rhs.NumberofMotorPoles; - this.OverallHeight = rhs.OverallHeight; - this.OverallLength = rhs.OverallLength; - this.PanelStandHeight = rhs.PanelStandHeight; - this.Phase = rhs.Phase; - this.Flow = rhs.Flow; - this.SpeedType = rhs.SpeedType; - this.OverallWidth = rhs.OverallWidth; - this.Suctiondiameter = rhs.Suctiondiameter; - this.SuctionConnectiondiameter = rhs.SuctionConnectiondiameter; - this.DischargeConnectiondiameter = rhs.DischargeConnectiondiameter; - this.ProductRange = rhs.ProductRange; - this.PumpModel = rhs.PumpModel; - this.Frequency = rhs.Frequency; - this.FluidTempMin = rhs.FluidTempMin; - this.ConnectionType = rhs.ConnectionType; - this.Dischargediameter = rhs.Dischargediameter; - this.Approvals = rhs.Approvals; - this.Head = rhs.Head; - this.Voltage = rhs.Voltage; - this.FullLoadAmperes = rhs.FullLoadAmperes; - this.SortCode = rhs.SortCode; - this.Description = rhs.Description; - this.UseCount = rhs.UseCount; - this.SupplierID = rhs.SupplierID; - } - - public void Reset(Kit rhs) - { - this.ID = rhs.ID; - this.OverallWidth = rhs.OverallWidth; - this.FullLoadAmperes = rhs.FullLoadAmperes; - this.Name = rhs.Name; - this.NO = rhs.NO; - this.Wattage = rhs.Wattage; - this.Specification = rhs.Specification; - this.EquipmentCount = rhs.EquipmentCount; - this.Flags = rhs.Flags; - this.TagName = rhs.TagName; - this.UseStatus = rhs.UseStatus; - this.MaximumOperatingPressure = rhs.MaximumOperatingPressure; - this.MaximumOperatingTemperature = rhs.MaximumOperatingTemperature; - this.MotorIPRating = rhs.MotorIPRating; - this.NetWeight = rhs.NetWeight; - this.FluidTempMax = rhs.FluidTempMax; - this.NumberofMotorPoles = rhs.NumberofMotorPoles; - this.OverallHeight = rhs.OverallHeight; - this.OverallLength = rhs.OverallLength; - this.PanelStandHeight = rhs.PanelStandHeight; - this.Phase = rhs.Phase; - this.SpeedType = rhs.SpeedType; - this.Flow = rhs.Flow; - this.Voltage = rhs.Voltage; - this.DischargeConnectiondiameter = rhs.DischargeConnectiondiameter; - this.Suctiondiameter = rhs.Suctiondiameter; - this.SuctionConnectiondiameter = rhs.SuctionConnectiondiameter; - this.ProductRange = rhs.ProductRange; - this.PumpModel = rhs.PumpModel; - this.FluidTempMin = rhs.FluidTempMin; - this.Frequency = rhs.Frequency; - this.ConnectionType = rhs.ConnectionType; - this.Dischargediameter = rhs.Dischargediameter; - this.Approvals = rhs.Approvals; - this.Head = rhs.Head; - this.SortCode = rhs.SortCode; - this.Description = rhs.Description; - this.UseCount = rhs.UseCount; - this.SupplierID = rhs.SupplierID; - } - - /// <summary> - /// 鍚嶇О - /// </summary> - [Display(Name = "鍚嶇О")] - public string Name { get; set; } - - /// <summary> - /// 缂栧彿 - /// </summary> - [Display(Name = "缂栧彿")] - public string NO { get; set; } - - /// <summary> - /// 瑙勬牸 - /// </summary> - [Display(Name = "瑙勬牸")] - public string Specification { get; set; } - - /// <summary> - /// 璁惧鏁伴噺 - /// </summary> - [Display(Name = "璁惧鏁伴噺")] - public int EquipmentCount { get; set; } - - /// <summary> - /// 浣跨敤鏁伴噺 - /// </summary> - [Display(Name = "浣跨敤鏁伴噺")] - public int UseCount { get; set; } - - [Display(Name = "鍘傚晢")] - public long SupplierID { get; set; } - - ///// <summary> - ///// 杩愯鏂瑰紡 - ///// </summary> - //[Display(Name = "杩愯鏂瑰紡")] - //public string RunningMode { get; set; } - - ///// <summary> - ///// 杩愯鏁伴噺 - ///// </summary> - //[Display(Name = "杩愯鏁伴噺")] - //public int RunningCount { get; set; } - - ///// <summary> - ///// 娴侀噺(m鲁/h) - ///// </summary> - //[Display(Name = "娴侀噺(m鲁/h)")] - //public double Qr { get; set; } - - ///// <summary> - ///// 鎵▼(m) - ///// </summary> - //[Display(Name = "鎵▼(m)")] - //public double Hr { get; set; } - - ///// <summary> - ///// 鍔熺巼(kw) - ///// </summary> - //[Display(Name = "鍔熺巼(kw)")] - //public double Pr { get; set; } - - ///// <summary> - ///// 鐢靛帇(V) - ///// </summary> - //[Display(Name = "鐢靛帇(V)")] - //public double Vr { get; set; } - - ///// <summary> - ///// 鍐峰嵈鏂瑰紡 - ///// </summary> - //[Display(Name = "鍐峰嵈鏂瑰紡")] - //public string CoolingMethod { get; set; } - - ///// <summary> - ///// 淇濇姢鍔熻兘 - ///// </summary> - //[Display(Name = "淇濇姢鍔熻兘")] - //public string SafetyFeature { get; set; } - - /// <summary> - /// 鏍囩鍒楄〃 - /// </summary> - [Display(Name = "鏍囩鍒楄〃")] - public List<string> Flags { get; set; } - - /// <summary> - /// 鏍囩鍚嶇О - /// </summary> - [Display(Name = "鏍囩鍚嶇О")] - public string TagName { get; set; } - - /// <summary> - /// 浣跨敤鐘舵�� - /// </summary> - [Display(Name = "浣跨敤鐘舵��")] - public Model.eUseStatus UseStatus { get; set; } - - /// <summary> - /// 杩涘彛鍙e緞锛圖N) - /// </summary> - public double Suctiondiameter { get; set; } - - /// <summary> - /// 鍑哄彛鍙e緞(DN) - /// </summary> - public double Dischargediameter { get; set; } - - /// <summary> - /// 杩炴帴鏂瑰紡 - /// </summary> - public string ConnectionType { get; set; } - - /// <summary> - /// 杩涘彛杩炴帴绠″昂瀵�(DN) - /// </summary> - public double SuctionConnectiondiameter { get; set; } - - /// <summary> - /// 鍑哄彛杩炴帴绠″昂瀵�(DN) - /// </summary> - public double DischargeConnectiondiameter { get; set; } - - /// <summary> - /// 婊¤浇鐢垫祦锛圓锛� - /// </summary> - public double FullLoadAmperes { get; set; } - - /// <summary> - /// 鐡︽暟 - /// </summary> - public double Wattage { get; set; } - - /// <summary> - /// 鐢靛帇 - /// </summary> - public double Voltage { get; set; } - - /// <summary> - /// 棰戠巼 (Hz) - /// </summary> - public double Frequency { get; set; } - - /// <summary> - /// 鐩告暟 - /// </summary> - public double Phase { get; set; } - - /// <summary> - /// 鏈�澶ч瀹氬帇鍔�(PSI) - /// </summary> - public double MaximumOperatingPressure { get; set; } - - /// <summary> - /// 鏈�灏忎粙璐ㄦ俯搴�(F) - /// </summary> - public double FluidTempMin { get; set; } - - /// <summary> - /// 鏈�澶т粙璐ㄦ俯搴�(F) - /// </summary> - public double FluidTempMax { get; set; } - - /// <summary> - /// 鏈�澶х幆澧冩俯搴�(F) - /// </summary> - public double MaximumOperatingTemperature { get; set; } - - /// <summary> - /// 鍑�閲�(lbs) - /// </summary> - public double NetWeight { get; set; } - - /// <summary> - /// 娴侀噺(GPM) - /// </summary> - public double Flow { get; set; } - - /// <summary> - /// 鎵▼(ft) - /// </summary> - public double Head { get; set; } - - /// <summary> - /// 鎬婚珮(in) - /// </summary> - public double OverallHeight { get; set; } - - /// <summary> - /// 鎬诲(in) - /// </summary> - public double OverallWidth { get; set; } - - /// <summary> - ///鎬婚暱(in) - /// </summary> - public double OverallLength { get; set; } - - /// <summary> - /// 璁よ瘉 - /// </summary> - public string Approvals { get; set; } - - /// <summary> - /// 鍚姩鏂瑰紡 - /// </summary> - public string ProductRange { get; set; } - - /// <summary> - /// 鐢垫満闃叉姢绛夌骇 - /// </summary> - public string MotorIPRating { get; set; } - - /// <summary> - /// 鐢垫満绾ф暟 - /// </summary> - public int NumberofMotorPoles { get; set; } - - /// <summary> - /// 娉电被鍨� - /// </summary> - public string PumpType { get; set; } - - /// <summary> - /// 娉靛瀷鍙� - /// </summary> - public string PumpModel { get; set; } - - /// <summary> - /// 鎺у埗鏌滈珮搴�(in) - /// </summary> - public double PanelStandHeight { get; set; } - - /// <summary> - /// 璋冮�熸柟寮� - /// </summary> - public string SpeedType { get; set; } - - /// <summary> - /// 鎺掑簭鐮� - /// </summary> - [Display(Name = "鎺掑簭鐮�")] - public int SortCode { get; set; } - - /// <summary> - /// 璇存槑 - /// </summary> - [Display(Name = "璇存槑")] - public string Description { get; set; } - - /// <summary> - /// - /// </summary> - public Kit Clone() - { - return (Kit)this.MemberwiseClone(); - } - - object ICloneable.Clone() - { - return this.MemberwiseClone(); - } - } -} \ No newline at end of file diff --git a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj index 5e73f53..2131062 100644 --- a/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj +++ b/WinFrmUI/PBS.WinFrmUI/PBS.WinFrmUI.csproj @@ -24,11 +24,6 @@ </ItemGroup> <ItemGroup> - <Compile Remove="IBoxViewModel\Facilities.cs" /> - <Compile Remove="IBoxViewModel\Kit.cs" /> - </ItemGroup> - - <ItemGroup> <None Include="Resources\Cancel.svg" /> <None Include="Resources\Close32.png" /> <None Include="Resources\Folder.svg" /> -- Gitblit v1.9.3