已删除1个文件
已重命名5个文件
已复制2个文件
已修改13个文件
已添加10个文件
| | |
| | | public SimulationCalcuResultHelper(SimulationWorkingHelper workingHelper) |
| | | { |
| | | _workingHelper = workingHelper; |
| | | workingHelper.InitialEvent += () => Initial(); |
| | | Initial(); |
| | | } |
| | | |
| | | private SimulationWorkingHelper _workingHelper = null;//å·¥åµè¾
å©ç±» |
| | | private Dictionary<string, HydroCalcuVisualResult> _dict;//计ç®ç»æå¯è§åå
¸ |
| | | |
| | | |
| | | //åå§å |
| | | private void Initial() |
| | | { |
| | | _dict = _workingHelper.CalcuResult?.GetVisualDict(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå§å |
| | | /// </summary> |
| | | public bool Initialized |
| | | { |
| | | get { return _workingHelper.Initialized; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ°´åä¿¡æ¯ |
| | | /// </summary> |
| | | public Yw.Model.HydroModelInfo HydroInfo |
| | | { |
| | | get { return _workingHelper.HydroInfo; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å·¥åµ |
| | |
| | | public HydroCalcuResult CalcuResult |
| | | { |
| | | get { return _workingHelper.CalcuResult; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§åæ°æ® |
| | | /// </summary> |
| | | public void InitialData() |
| | | { |
| | | _dict = _workingHelper.CalcuResult?.GetVisualDict(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public SimulationCalcuResultLabelHelper |
| | | ( |
| | | SimulationVisualListHelper visualListHelper, |
| | | SimulationCalcuResultHelper calcuResultHelper, |
| | | ISimulationCalcuResultLabelView view |
| | | ) |
| | | { |
| | | _visualListHelper = visualListHelper; |
| | | _calcuResultHelper = calcuResultHelper; |
| | | _views = new List<ISimulationCalcuResultLabelView>() { view }; |
| | | } |
| | | |
| | | private SimulationVisualListHelper _visualListHelper = null;//å¯è§å表è¾
å©ç±» |
| | | private SimulationCalcuResultHelper _calcuResultHelper = null;//计ç®ç»æè¾
å©ç±» |
| | | private List<ISimulationCalcuResultLabelView> _views = null;//è§å¾å表 |
| | | |
| | |
| | | if (this.Visible) |
| | | { |
| | | var labels = GetLabels(); |
| | | _views.ForEach(x => x.SetLogicCalcuCustomLabels(labels)); |
| | | if (labels != null && labels.Count > 0) |
| | | { |
| | | _views.ForEach(x => x.SetLogicCalcuCustomLabels(labels)); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _views.ForEach(x => x.ClearLogicCalcuCustomLabels()); |
| | | } |
| | | _views.ForEach(x => x.ClearLogicCalcuCustomLabels()); |
| | | } |
| | | |
| | | //è·åè®¡ç®æ ç¾ |
| | | private List<LogicCalcuCustomLabel> GetLabels() |
| | | { |
| | | var hydroInfo = _visualListHelper.HydroInfo; |
| | | if (hydroInfo == null) |
| | | if (!_calcuResultHelper.Initialized) |
| | | { |
| | | return default; |
| | | } |
| | | var workingInfo = JsonHelper.Json2Object<HydroWorkingInfoViewModel>(_calcuResultHelper.Working.WorkingInfo); |
| | | var allCalcuResultVisualDict = _calcuResultHelper.GetVisualDict(); |
| | | var allCalcuLabels = new List<LogicCalcuCustomLabel>(); |
| | | hydroInfo.Pumps?.ForEach(x => |
| | | _calcuResultHelper.HydroInfo.Pumps?.ForEach(x => |
| | | { |
| | | var workingPump = workingInfo?.Pumps?.Find(t => t.Code == x.Code); |
| | | if (workingPump != null) |
| | | var hz = Math.Round(x.RatedHz * x.SpeedRatio); |
| | | var calcuPumpResult = allCalcuResultVisualDict.GetValue(x.Code) as HydroCalcuLinkResult; |
| | | if (calcuPumpResult != null) |
| | | { |
| | | var hz = Math.Round(x.RatedHz * x.SpeedRatio); |
| | | var calcuPumpResult = allCalcuResultVisualDict.GetValue(x.Code) as HydroCalcuLinkResult; |
| | | if (calcuPumpResult != null) |
| | | { |
| | | var calcuPumpStartResult = allCalcuResultVisualDict.GetValue(x.StartCode) as HydroCalcuNodeResult; |
| | | var calcuPumpEndResult = allCalcuResultVisualDict.GetValue(x.EndCode) as HydroCalcuNodeResult; |
| | | var pumpCustomLabel = new LogicCalcuCustomLabel(); |
| | | pumpCustomLabel.Id = x.Code; |
| | | pumpCustomLabel.Distance = 20000; |
| | | pumpCustomLabel.Data = new List<LogicCalcuCustomLabelItem>() |
| | | var calcuPumpStartResult = allCalcuResultVisualDict.GetValue(x.StartCode) as HydroCalcuNodeResult; |
| | | var calcuPumpEndResult = allCalcuResultVisualDict.GetValue(x.EndCode) as HydroCalcuNodeResult; |
| | | var pumpCustomLabel = new LogicCalcuCustomLabel(); |
| | | pumpCustomLabel.Id = x.Code; |
| | | pumpCustomLabel.Distance = 20000; |
| | | pumpCustomLabel.Data = new List<LogicCalcuCustomLabelItem>() |
| | | { |
| | | new LogicCalcuCustomLabelItem(){ Name="ç¶æ",Value=HydroLinkStatusHelper.GetStatusName(workingPump.LinkStatus),Unit=string.Empty}, |
| | | new LogicCalcuCustomLabelItem(){ Name="é¢ç",Value=workingPump.CurrentHz.ToString(),Unit=string.Empty}, |
| | | new LogicCalcuCustomLabelItem(){ Name="ç¶æ",Value=HydroLinkStatusHelper.GetStatusName(x.LinkStatus),Unit=string.Empty}, |
| | | new LogicCalcuCustomLabelItem(){ Name="é¢ç",Value=x.LinkStatus==Yw.Hydro.PumpStatus.Open?hz.ToString():"0",Unit="hz"}, |
| | | new LogicCalcuCustomLabelItem(){ Name="æµé",Value=Math.Round(calcuPumpResult.CalcuFlow.Value,1).ToString(),Unit="m³/h"}, |
| | | new LogicCalcuCustomLabelItem(){ Name="è¿å£åå",Value=Math.Round(calcuPumpStartResult.CalcuHead.Value,4).ToString(),Unit="m"}, |
| | | new LogicCalcuCustomLabelItem(){ Name="åºå£åå",Value=Math.Round(calcuPumpEndResult.CalcuHead.Value,4).ToString(),Unit="m"}, |
| | | }; |
| | | allCalcuLabels.Add(pumpCustomLabel); |
| | | } |
| | | allCalcuLabels.Add(pumpCustomLabel); |
| | | } |
| | | |
| | | }); |
| | | |
| | | hydroInfo.GetAllEmitters()?.ForEach(x => |
| | | _calcuResultHelper.HydroInfo.GetAllEmitters()?.ForEach(x => |
| | | { |
| | | var calcuEmitter = allCalcuResultVisualDict.GetValue(x.Code) as HydroCalcuNodeResult; |
| | | var emitterCustomLabel = new LogicCalcuCustomLabel(); |
| | |
| | | public SimulationWorkingHelper() { } |
| | | |
| | | /// <summary> |
| | | /// åå§åäºä»¶ |
| | | /// </summary> |
| | | public event Action InitialEvent; |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åå§å |
| | | /// </summary> |
| | | public bool Initialized |
| | | { |
| | | get { return this.Working != null; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ°´åä¿¡æ¯ |
| | | /// </summary> |
| | | public Yw.Model.HydroModelInfo HydroInfo |
| | |
| | | /// <summary> |
| | | /// åå§åæ°æ® |
| | | /// </summary> |
| | | public void InitialData |
| | | ( |
| | | Yw.Model.HydroModelInfo hydroInfo, |
| | | HydroWorkingVmo working, |
| | | HydroCheckResult checkResult, |
| | | HydroCalcuResult calcuResult |
| | | ) |
| | | public void InitialData(Yw.Model.HydroModelInfo hydroInfo, HydroWorkingVmo working, HydroCheckResult checkResult, HydroCalcuResult calcuResult) |
| | | { |
| | | this.HydroInfo = hydroInfo; |
| | | this.Working = working; |
| | | this.CheckResult = checkResult; |
| | | this.CalcuResult = calcuResult; |
| | | this.InitialEvent?.Invoke(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | barCkGrading = new DevExpress.XtraBars.BarCheckItem(); |
| | | barCkCalcu = new DevExpress.XtraBars.BarCheckItem(); |
| | | barBtnWorkingLossCurve = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnWorkingLossScale = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnWorkingLossStatistics = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnWorkingPower = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnWorkingAnaly = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnParallel = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnPumpParallel = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnRepair = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnWorkingEvaluation = new DevExpress.XtraBars.BarButtonItem(); |
| | | barBtnSetVisualVisible = new DevExpress.XtraBars.BarButtonItem(); |
| | |
| | | ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | ribbonPageGroup9 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | ribbonPageGroup3 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | repositoryItemImageComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); |
| | | ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | tabPane1 = new DevExpress.XtraBars.Navigation.TabPane(); |
| | | tabPageBimface = new DevExpress.XtraBars.Navigation.TabNavigationPage(); |
| | |
| | | svgImg32 = new DevExpress.Utils.SvgImageCollection(components); |
| | | rmSet = new DevExpress.XtraBars.Ribbon.RadialMenu(components); |
| | | ((ISupportInitialize)ribbonControl1).BeginInit(); |
| | | ((ISupportInitialize)repositoryItemImageComboBox1).BeginInit(); |
| | | ((ISupportInitialize)tabPane1).BeginInit(); |
| | | tabPane1.SuspendLayout(); |
| | | ((ISupportInitialize)dockManager1).BeginInit(); |
| | |
| | | // |
| | | ribbonControl1.ExpandCollapseItem.Id = 0; |
| | | ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; |
| | | ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnCheck, barBtnCalcu, barBtnExportInp, barBtnSave, barBtnVisualList, barBtnMatchingList, barBtnUnMatchingList, barBtnSetList, barBtnSetPumpList, barBtnSetValveList, barBtnSetPipeList, barBtnSetElbowsList, barBtnSetThreelinkList, barBtnSetFourlinkList, barBtnSetTranslationList, barBtnSetExchangerList, barBtnSetJunctionList, barBtnWorkingParallel, barBtnSearch, barBtnSetGradingList, barBtnApplyGradingList, barBtnRefresh, barBtnSetMark, barBtnSetReservoirList, barBtnSetTankList, barBtnSetWaterboxList, barBtnSetBluntheadList, barBtnSetNozzleList, barBtnSetHydrantList, barBtnSetMeterList, barBtnSetCompressorList, barBtnSetFlowmeterList, barBtnSetPressmeterList, barBtnSetMonitor, barBtnSetMonitorValue, barCkMonitor, barCkMark, barCkFlowEffect, barCkGrading, barCkCalcu, barBtnWorkingLossCurve, barBtnWorkingLossScale, barBtnWorkingPower, barBtnWorkingAnaly, barBtnParallel, barBtnRepair, barBtnWorkingEvaluation, barBtnSetVisualVisible, barCkDecorator, barBtnAddWorking }); |
| | | ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnCheck, barBtnCalcu, barBtnExportInp, barBtnSave, barBtnVisualList, barBtnMatchingList, barBtnUnMatchingList, barBtnSetList, barBtnSetPumpList, barBtnSetValveList, barBtnSetPipeList, barBtnSetElbowsList, barBtnSetThreelinkList, barBtnSetFourlinkList, barBtnSetTranslationList, barBtnSetExchangerList, barBtnSetJunctionList, barBtnWorkingParallel, barBtnSearch, barBtnSetGradingList, barBtnApplyGradingList, barBtnRefresh, barBtnSetMark, barBtnSetReservoirList, barBtnSetTankList, barBtnSetWaterboxList, barBtnSetBluntheadList, barBtnSetNozzleList, barBtnSetHydrantList, barBtnSetMeterList, barBtnSetCompressorList, barBtnSetFlowmeterList, barBtnSetPressmeterList, barBtnSetMonitor, barBtnSetMonitorValue, barCkMonitor, barCkMark, barCkFlowEffect, barCkGrading, barCkCalcu, barBtnWorkingLossCurve, barBtnWorkingLossStatistics, barBtnWorkingPower, barBtnWorkingAnaly, barBtnPumpParallel, barBtnRepair, barBtnWorkingEvaluation, barBtnSetVisualVisible, barCkDecorator, barBtnAddWorking }); |
| | | ribbonControl1.Location = new Point(0, 0); |
| | | ribbonControl1.MaxItemId = 80; |
| | | ribbonControl1.MaxItemId = 81; |
| | | ribbonControl1.Name = "ribbonControl1"; |
| | | ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); |
| | | ribbonControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemImageComboBox1 }); |
| | | ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages; |
| | | ribbonControl1.ShowQatLocationSelector = false; |
| | |
| | | barBtnWorkingLossCurve.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; |
| | | barBtnWorkingLossCurve.ItemClick += barBtnWorkingLossCurve_ItemClick; |
| | | // |
| | | // barBtnWorkingLossScale |
| | | // barBtnWorkingLossStatistics |
| | | // |
| | | barBtnWorkingLossScale.Caption = "æå¤±æ¯ä¾"; |
| | | barBtnWorkingLossScale.Id = 70; |
| | | barBtnWorkingLossScale.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnWorkingLossScale.ImageOptions.SvgImage"); |
| | | barBtnWorkingLossScale.Name = "barBtnWorkingLossScale"; |
| | | barBtnWorkingLossScale.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; |
| | | barBtnWorkingLossScale.ItemClick += barBtnWorkingLossScale_ItemClick; |
| | | barBtnWorkingLossStatistics.Caption = "æå¤±ç»è®¡"; |
| | | barBtnWorkingLossStatistics.Id = 70; |
| | | barBtnWorkingLossStatistics.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnWorkingLossScale.ImageOptions.SvgImage"); |
| | | barBtnWorkingLossStatistics.Name = "barBtnWorkingLossStatistics"; |
| | | barBtnWorkingLossStatistics.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.SmallWithText; |
| | | barBtnWorkingLossStatistics.ItemClick += barBtnWorkingLossStatistics_ItemClick; |
| | | // |
| | | // barBtnWorkingPower |
| | | // |
| | |
| | | barBtnWorkingAnaly.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large; |
| | | barBtnWorkingAnaly.ItemClick += barBtnWorkingAnaly_ItemClick; |
| | | // |
| | | // barBtnParallel |
| | | // barBtnPumpParallel |
| | | // |
| | | barBtnParallel.Caption = "å¹¶è"; |
| | | barBtnParallel.Id = 73; |
| | | barBtnParallel.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnParallel.ImageOptions.SvgImage"); |
| | | barBtnParallel.Name = "barBtnParallel"; |
| | | barBtnParallel.ItemClick += barBtnParallel_ItemClick; |
| | | barBtnPumpParallel.Caption = "å¹¶èæ¨¡æ"; |
| | | barBtnPumpParallel.Id = 73; |
| | | barBtnPumpParallel.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnPumpParallel.ImageOptions.SvgImage"); |
| | | barBtnPumpParallel.Name = "barBtnPumpParallel"; |
| | | barBtnPumpParallel.ItemClick += barBtnPumpParallel_ItemClick; |
| | | // |
| | | // barBtnRepair |
| | | // |
| | |
| | | // |
| | | // ribbonPageGroup5 |
| | | // |
| | | ribbonPageGroup5.ItemLinks.Add(barBtnParallel); |
| | | ribbonPageGroup5.ItemLinks.Add(barBtnPumpParallel); |
| | | ribbonPageGroup5.Name = "ribbonPageGroup5"; |
| | | ribbonPageGroup5.Text = "æ°´æ³µ"; |
| | | // |
| | |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingParallel); |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingPower); |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingLossCurve); |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingLossScale); |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingLossStatistics); |
| | | ribbonPageGroup9.ItemLinks.Add(barBtnWorkingAnaly); |
| | | ribbonPageGroup9.Name = "ribbonPageGroup9"; |
| | | ribbonPageGroup9.Text = "å·¥åµåæ"; |
| | |
| | | ribbonPageGroup3.ItemLinks.Add(barBtnRefresh); |
| | | ribbonPageGroup3.Name = "ribbonPageGroup3"; |
| | | ribbonPageGroup3.Text = "æ´å¤..."; |
| | | // |
| | | // repositoryItemImageComboBox1 |
| | | // |
| | | repositoryItemImageComboBox1.AutoHeight = false; |
| | | repositoryItemImageComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); |
| | | repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1"; |
| | | // |
| | | // ribbonPageGroup4 |
| | | // |
| | |
| | | Name = "XhsProjectSimulationCorePage"; |
| | | Size = new Size(1464, 700); |
| | | ((ISupportInitialize)ribbonControl1).EndInit(); |
| | | ((ISupportInitialize)repositoryItemImageComboBox1).EndInit(); |
| | | ((ISupportInitialize)tabPane1).EndInit(); |
| | | tabPane1.ResumeLayout(false); |
| | | ((ISupportInitialize)dockManager1).EndInit(); |
| | |
| | | private DevExpress.XtraBars.BarCheckItem barCkGrading; |
| | | private DevExpress.XtraBars.BarCheckItem barCkCalcu; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingLossCurve; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingLossScale; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingLossStatistics; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingPower; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingAnaly; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnParallel; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnPumpParallel; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnRepair; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnWorkingEvaluation; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnSetVisualVisible; |
| | | private DevExpress.XtraBars.BarCheckItem barCkDecorator; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup5; |
| | | private DevExpress.XtraBars.BarButtonItem barBtnAddWorking; |
| | | private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox1; |
| | | } |
| | | } |
| | |
| | | } |
| | | if (_bimfaceCtrl == null) |
| | | { |
| | | var overlay = this.ShowOverlay(); |
| | | _bimfaceCtrl = new XhsProjectSimulationBimfaceCtrl(); |
| | | _bimfaceCtrl.Dock = DockStyle.Fill; |
| | | await _bimfaceCtrl.InitialData(_project, _projectSite); |
| | | _bimfaceCtrl.LoadCompletedEvent += () => |
| | | {//viewå è½½å®æäºä»¶ |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | overlay.Close(); |
| | | this.barCkDecorator.Checked = false; |
| | | this.barCkGrading.Checked = true; |
| | | }; |
| | | _bimfaceCtrl.HydroMouseLeftClickEvent += (code) => |
| | | {//é¼ æ å·¦é®ç¹å»äºä»¶ |
| | |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | _calcuResultHelper = new SimulationCalcuResultHelper(workingHelper); |
| | | var calcuResult = GetCalcuResult(); |
| | | _calcuResultHelper.InitialData(); |
| | | } |
| | | return _calcuResultHelper; |
| | | } |
| | |
| | | { |
| | | if (_calcuResultLabelHelper == null) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | var calcuResultHelper = GetCalcuResultHelper(); |
| | | var bimfaceCtrl = await GetBimfaceCtrl(); |
| | | _calcuResultLabelHelper = new SimulationCalcuResultLabelHelper(visualListHelper, calcuResultHelper, bimfaceCtrl); |
| | | _calcuResultLabelHelper = new SimulationCalcuResultLabelHelper(calcuResultHelper, bimfaceCtrl); |
| | | } |
| | | return _calcuResultLabelHelper; |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å¹¶èè®¡ç® |
| | | #region æ°´æ³µå表 |
| | | |
| | | //å¹¶èåæ |
| | | private void ParallelAnalysis() |
| | | #region å¹¶èæ¨¡æ |
| | | |
| | | //å¹¶èæ¨¡æ |
| | | private void PumpParallel() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //å¹¶èåæ |
| | | private void barBtnParallel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //å¹¶èæ¨¡æ |
| | | private void barBtnPumpParallel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | ParallelAnalysis(); |
| | | PumpParallel(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #region æ°´åè®¡ç® |
| | | |
| | |
| | | ShowCalcuFailedCtrl(calcuResult); |
| | | TipFormHelper.ShowError("计ç®å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | #region 计ç®ç»æ |
| | | |
| | | var calcuResultHelper = GetCalcuResultHelper(); |
| | | calcuResultHelper.InitialData(); |
| | | |
| | | #endregion |
| | | |
| | | #region è§å¾å表 |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region æå¤±æ¯ä¾ |
| | | #region æå¤±ç»è®¡ |
| | | |
| | | private void barBtnWorkingLossScale_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //æå¤±ç»è®¡ |
| | | private void barBtnWorkingLossStatistics_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (workingHelper.Working == null) |
| | | if (_hydroInfo == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请计ç®åéè¯ï¼"); |
| | | return; |
| | | } |
| | | var network = workingHelper.HydroInfo.ToNetwork(); |
| | | var calcuResult = network.Calcu(Yw.EPAnet.CalcuMode.MinorLoss); |
| | | var allEnergyPointList = network.AnalyzeEnergy(calcuResult); |
| | | var dlg = new HydroSingleLossScaleDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo, allEnergyPointList); |
| | | dlg.ShowDialog(); |
| | | var workingCheckedListHelper = GetWorkingCheckedListHelper(); |
| | | var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList(); |
| | | if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1) |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (!workingHelper.Initialized) |
| | | { |
| | | TipFormHelper.ShowWarn("请计ç®åéè¯ï¼"); |
| | | return; |
| | | } |
| | | var dlg = new HydroSingleWorkingLossStatisticsDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo); |
| | | dlg.ShowDialog(); |
| | | } |
| | | else |
| | | { |
| | | var dlg = new HydroMultiWorkingLossStatisticsDlg(); |
| | | dlg.SetBindingData(_hydroInfo, allCheckedWorkingList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | |
| | | LDE1IDEwLDIxIDgsMTkgNCwyMyA0LDIwICAiIGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs= |
| | | </value> |
| | | </data> |
| | | <data name="barBtnParallel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <data name="barBtnPumpParallel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 |
| | | LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl |
| | |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | _calcuResultHelper = new SimulationCalcuResultHelper(workingHelper); |
| | | var calcuResult = GetCalcuResult(); |
| | | _calcuResultHelper.InitialData(); |
| | | } |
| | | return _calcuResultHelper; |
| | | } |
| | |
| | | { |
| | | if (_calcuResultLabelHelper == null) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | var calcuResultHelper = GetCalcuResultHelper(); |
| | | var bimfaceCtrl = await GetBimfaceCtrl(); |
| | | _calcuResultLabelHelper = new SimulationCalcuResultLabelHelper(visualListHelper, calcuResultHelper, bimfaceCtrl); |
| | | _calcuResultLabelHelper = new SimulationCalcuResultLabelHelper(calcuResultHelper, bimfaceCtrl); |
| | | } |
| | | return _calcuResultLabelHelper; |
| | | } |
| | |
| | | // |
| | | // layoutControlGroup2 |
| | | // |
| | | layoutControlGroup2.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | layoutControlGroup2.AppearanceGroup.Options.UseBorderColor = true; |
| | | layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); |
| | | layoutControlGroup2.Location = new Point(0, 122); |
| | | layoutControlGroup2.Name = "layoutControlGroup2"; |
| | |
| | | // |
| | | // groupForSinglePumpInfo |
| | | // |
| | | groupForSinglePumpInfo.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | groupForSinglePumpInfo.AppearanceGroup.Options.UseBorderColor = true; |
| | | groupForSinglePumpInfo.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, layoutControlItem5, layoutControlItem6, layoutControlItem7, emptySpaceItem1 }); |
| | | groupForSinglePumpInfo.Location = new Point(230, 0); |
| | | groupForSinglePumpInfo.Name = "groupForSinglePumpInfo"; |
| | |
| | | // |
| | | // layoutControlGroup1 |
| | | // |
| | | layoutControlGroup1.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | layoutControlGroup1.AppearanceGroup.Options.UseBorderColor = true; |
| | | layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); |
| | | layoutControlGroup1.Location = new Point(0, 0); |
| | | layoutControlGroup1.Name = "layoutControlGroup1"; |
| | |
| | | (XhsProjectVmo project, XhsProjectSiteVmo projectSite, DevExpress.Utils.Svg.SvgImage svgImage) |
| | | { |
| | | var dlg = new AddXhsSchemeDlg(); |
| | | |
| | | await dlg.SetBindingData(project, projectSite, null); |
| | | dlg.ShowDialog(); |
| | | } |
| | |
| | | /// </summary> |
| | | public static class HydroWorkingExtensions |
| | | { |
| | | |
| | | /// <summary> |
| | | /// æ´æ°å·¥åµä¿¡æ¯ |
| | | /// </summary> |
| | | public static void UpdateWorkingInfo(this Yw.Model.HydroModelInfo hydroInfo, string workingInfo) |
| | | { |
| | | hydroInfo.UpdateWorkingInfo(JsonHelper.Json2Object<HydroWorkingInfoViewModel>(workingInfo)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°å·¥åµä¿¡æ¯ |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class HydroWorkingListItemViewModel |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroWorkingListItemViewModel() { } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HydroWorkingListItemViewModel(Yw.Vmo.HydroWorkingVmo rhs) |
| | | { |
| | | this.Id = rhs.ID.ToString(); |
| | | this.Name = rhs.Name; |
| | | this.SortCode = rhs.SortCode; |
| | | this.Description = rhs.Description; |
| | | this.Vmo = rhs; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// Id |
| | | /// </summary> |
| | | public string Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åç§° |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æåºç |
| | | /// </summary> |
| | | public int SortCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 说æ |
| | | /// </summary> |
| | | public string Description { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public Yw.Vmo.HydroWorkingVmo Vmo { get; set; } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | partial class HydroWorkingListViewCtrl |
| | | { |
| | | /// <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() |
| | | { |
| | | components = new Container(); |
| | | DevExpress.XtraEditors.TableLayout.ItemTemplateBase itemTemplateBase1 = new DevExpress.XtraEditors.TableLayout.ItemTemplateBase(); |
| | | DevExpress.XtraEditors.TableLayout.TableColumnDefinition tableColumnDefinition1 = new DevExpress.XtraEditors.TableLayout.TableColumnDefinition(); |
| | | DevExpress.XtraEditors.TableLayout.TemplatedItemElement templatedItemElement1 = new DevExpress.XtraEditors.TableLayout.TemplatedItemElement(); |
| | | DevExpress.XtraEditors.TableLayout.TableRowDefinition tableRowDefinition1 = new DevExpress.XtraEditors.TableLayout.TableRowDefinition(); |
| | | listBoxControl1 = new DevExpress.XtraEditors.ListBoxControl(); |
| | | hydroWorkingListItemViewModelBindingSource = new BindingSource(components); |
| | | ((ISupportInitialize)listBoxControl1).BeginInit(); |
| | | ((ISupportInitialize)hydroWorkingListItemViewModelBindingSource).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // listBoxControl1 |
| | | // |
| | | listBoxControl1.DataSource = hydroWorkingListItemViewModelBindingSource; |
| | | listBoxControl1.Dock = DockStyle.Fill; |
| | | listBoxControl1.ItemHeight = 30; |
| | | listBoxControl1.Location = new Point(0, 0); |
| | | listBoxControl1.Name = "listBoxControl1"; |
| | | listBoxControl1.Size = new Size(267, 669); |
| | | listBoxControl1.TabIndex = 0; |
| | | itemTemplateBase1.Columns.Add(tableColumnDefinition1); |
| | | templatedItemElement1.FieldName = "Name"; |
| | | templatedItemElement1.ImageOptions.ImageAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleCenter; |
| | | templatedItemElement1.ImageOptions.ImageScaleMode = DevExpress.XtraEditors.TileItemImageScaleMode.ZoomInside; |
| | | templatedItemElement1.Text = "Name"; |
| | | templatedItemElement1.TextAlignment = DevExpress.XtraEditors.TileItemContentAlignment.MiddleLeft; |
| | | templatedItemElement1.TextLocation = new Point(10, 0); |
| | | itemTemplateBase1.Elements.Add(templatedItemElement1); |
| | | itemTemplateBase1.Name = "template1"; |
| | | itemTemplateBase1.Rows.Add(tableRowDefinition1); |
| | | listBoxControl1.Templates.Add(itemTemplateBase1); |
| | | listBoxControl1.SelectedValueChanged += listBoxControl1_SelectedValueChanged; |
| | | // |
| | | // hydroWorkingListItemViewModelBindingSource |
| | | // |
| | | hydroWorkingListItemViewModelBindingSource.DataSource = typeof(HydroWorkingListItemViewModel); |
| | | // |
| | | // HydroWorkingListViewCtrl |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(listBoxControl1); |
| | | Name = "HydroWorkingListViewCtrl"; |
| | | Size = new Size(267, 669); |
| | | ((ISupportInitialize)listBoxControl1).EndInit(); |
| | | ((ISupportInitialize)hydroWorkingListItemViewModelBindingSource).EndInit(); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraEditors.ListBoxControl listBoxControl1; |
| | | private BindingSource hydroWorkingListItemViewModelBindingSource; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.Xpo.Helpers; |
| | | using DevExpress.XtraEditors; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | public partial class HydroWorkingListViewCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public HydroWorkingListViewCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | this.listBoxControl1.InitialDefaultSettings(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éæ©æ¹åäºä»¶ |
| | | /// </summary> |
| | | public event Action<HydroWorkingVmo> SelectedChangedEvent; |
| | | |
| | | private List<HydroWorkingListItemViewModel> _allBindingList = null; |
| | | |
| | | /// <summary> |
| | | /// ç»å®æ°æ® |
| | | /// </summary> |
| | | public void SetBindingData(List<HydroWorkingVmo> allWorkingList) |
| | | { |
| | | _allBindingList = new List<HydroWorkingListItemViewModel>(); |
| | | allWorkingList?.OrderBy(x => x.SortCode).ToList().ForEach(x => _allBindingList.Add(new HydroWorkingListItemViewModel(x))); |
| | | this.hydroWorkingListItemViewModelBindingSource.DataSource = _allBindingList; |
| | | this.hydroWorkingListItemViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | |
| | | //éæ©æ¹å |
| | | private void listBoxControl1_SelectedValueChanged(object sender, EventArgs e) |
| | | { |
| | | if (_allBindingList == null) |
| | | { |
| | | return; |
| | | } |
| | | var item = this.listBoxControl1.SelectedItem; |
| | | var vm = item as HydroWorkingListItemViewModel; |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | this.SelectedChangedEvent?.Invoke(vm.Vmo); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="hydroWorkingListItemViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
| | | <value>17, 17</value> |
| | | </metadata> |
| | | </root> |
| | |
| | | var propList = HydroVisualCalcuPropHelper.GetNameDict(visualInfo.Catalog); |
| | | if (propList != null && propList.Count > 0) |
| | | { |
| | | var sortCode = allMonitorList == null || allMonitorList.Count < 1 ? 0 : allMonitorList.Max(x => x.SortCode); |
| | | foreach (var prop in propList) |
| | | { |
| | | var maxSortCode = allMonitorList == null || allMonitorList.Count < 1 ? 0 : allMonitorList.Max(x => x.SortCode); |
| | | var vmo = allMonitorList?.Find(x => x.ModelID == hydroInfo.ID && x.Relation == visualInfo.Code); |
| | | var vmo = allMonitorList?.Find(x => x.ModelID == hydroInfo.ID && x.Relation == visualInfo.Code && x.PropName == prop.Key); |
| | | if (vmo == null) |
| | | { |
| | | maxSortCode++; |
| | | sortCode++; |
| | | vmo = new HydroMonitorVmo() |
| | | { |
| | | ID = 0, |
| | | ModelID = hydroInfo.ID, |
| | | Relation = visualInfo.Code, |
| | | PropName = prop.Key, |
| | | SortCode = maxSortCode, |
| | | SortCode = sortCode, |
| | | Description = string.Empty |
| | | }; |
| | | } |
ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/02-scale/HydroSingleLossScaleCtrl.Designer.cs ÐÞ¸Ä |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | partial class HydroSingleLossScaleCtrl |
| | | partial class HydroCatalogLossScaleChartCtrl |
| | | { |
| | | /// <summary> |
| | | /// Required designer variable. |
ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/02-scale/HydroSingleLossScaleCtrl.cs ÐÞ¸Ä |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | public partial class HydroSingleLossScaleCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | public partial class HydroCatalogLossScaleChartCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public HydroSingleLossScaleCtrl() |
| | | public HydroCatalogLossScaleChartCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | partial class HydroMultiWorkingLossStatisticsDlg |
| | | { |
| | | /// <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() |
| | | { |
| | | ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl(); |
| | | ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); |
| | | ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); |
| | | hydroSingleWorkingLossStatisticsCtrl1 = new HydroSingleWorkingLossStatisticsCtrl(); |
| | | hydroWorkingListViewCtrl1 = new HydroWorkingListViewCtrl(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | groupForWorkingList = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | groupForLossStatistics = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | splitter = new DevExpress.XtraLayout.SplitterItem(); |
| | | ((ISupportInitialize)ribbon).BeginInit(); |
| | | ((ISupportInitialize)layoutControl1).BeginInit(); |
| | | layoutControl1.SuspendLayout(); |
| | | ((ISupportInitialize)Root).BeginInit(); |
| | | ((ISupportInitialize)groupForWorkingList).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | ((ISupportInitialize)groupForLossStatistics).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((ISupportInitialize)splitter).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // ribbon |
| | | // |
| | | ribbon.ExpandCollapseItem.Id = 0; |
| | | ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbon.ExpandCollapseItem }); |
| | | ribbon.Location = new Point(0, 0); |
| | | ribbon.MaxItemId = 1; |
| | | ribbon.Name = "ribbon"; |
| | | ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); |
| | | ribbon.RibbonCaptionAlignment = DevExpress.XtraBars.Ribbon.RibbonCaptionAlignment.Left; |
| | | ribbon.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbon.Size = new Size(994, 32); |
| | | // |
| | | // ribbonPage1 |
| | | // |
| | | ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); |
| | | ribbonPage1.Name = "ribbonPage1"; |
| | | ribbonPage1.Text = "ribbonPage1"; |
| | | // |
| | | // ribbonPageGroup1 |
| | | // |
| | | ribbonPageGroup1.Name = "ribbonPageGroup1"; |
| | | ribbonPageGroup1.Text = "ribbonPageGroup1"; |
| | | // |
| | | // layoutControl1 |
| | | // |
| | | layoutControl1.Controls.Add(hydroSingleWorkingLossStatisticsCtrl1); |
| | | layoutControl1.Controls.Add(hydroWorkingListViewCtrl1); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | | layoutControl1.Location = new Point(0, 32); |
| | | layoutControl1.Name = "layoutControl1"; |
| | | layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(719, 346, 650, 400); |
| | | layoutControl1.Root = Root; |
| | | layoutControl1.Size = new Size(994, 573); |
| | | layoutControl1.TabIndex = 1; |
| | | layoutControl1.Text = "layoutControl1"; |
| | | // |
| | | // hydroSingleWorkingLossStatisticsCtrl1 |
| | | // |
| | | hydroSingleWorkingLossStatisticsCtrl1.Location = new Point(180, 26); |
| | | hydroSingleWorkingLossStatisticsCtrl1.Name = "hydroSingleWorkingLossStatisticsCtrl1"; |
| | | hydroSingleWorkingLossStatisticsCtrl1.Size = new Size(809, 542); |
| | | hydroSingleWorkingLossStatisticsCtrl1.TabIndex = 2; |
| | | // |
| | | // hydroWorkingListViewCtrl1 |
| | | // |
| | | hydroWorkingListViewCtrl1.Location = new Point(5, 26); |
| | | hydroWorkingListViewCtrl1.Name = "hydroWorkingListViewCtrl1"; |
| | | hydroWorkingListViewCtrl1.Size = new Size(155, 542); |
| | | hydroWorkingListViewCtrl1.TabIndex = 0; |
| | | // |
| | | // Root |
| | | // |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { groupForWorkingList, groupForLossStatistics, splitter }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); |
| | | Root.Size = new Size(994, 573); |
| | | Root.TextVisible = false; |
| | | // |
| | | // groupForWorkingList |
| | | // |
| | | groupForWorkingList.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | groupForWorkingList.AppearanceGroup.Options.UseBorderColor = true; |
| | | groupForWorkingList.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 }); |
| | | groupForWorkingList.Location = new Point(0, 0); |
| | | groupForWorkingList.Name = "groupForWorkingList"; |
| | | groupForWorkingList.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); |
| | | groupForWorkingList.Size = new Size(165, 573); |
| | | groupForWorkingList.Text = "å·¥åµå表"; |
| | | // |
| | | // layoutControlItem1 |
| | | // |
| | | layoutControlItem1.Control = hydroWorkingListViewCtrl1; |
| | | layoutControlItem1.Location = new Point(0, 0); |
| | | layoutControlItem1.Name = "layoutControlItem1"; |
| | | layoutControlItem1.Size = new Size(159, 546); |
| | | layoutControlItem1.TextSize = new Size(0, 0); |
| | | layoutControlItem1.TextVisible = false; |
| | | // |
| | | // groupForLossScale |
| | | // |
| | | groupForLossStatistics.AppearanceGroup.BorderColor = Color.FromArgb(0, 122, 204); |
| | | groupForLossStatistics.AppearanceGroup.Options.UseBorderColor = true; |
| | | groupForLossStatistics.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); |
| | | groupForLossStatistics.Location = new Point(175, 0); |
| | | groupForLossStatistics.Name = "groupForLossScale"; |
| | | groupForLossStatistics.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); |
| | | groupForLossStatistics.Size = new Size(819, 573); |
| | | groupForLossStatistics.Text = "æå¤±ç»è®¡"; |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | | layoutControlItem2.Control = hydroSingleWorkingLossStatisticsCtrl1; |
| | | layoutControlItem2.Location = new Point(0, 0); |
| | | layoutControlItem2.Name = "layoutControlItem2"; |
| | | layoutControlItem2.Size = new Size(813, 546); |
| | | layoutControlItem2.TextSize = new Size(0, 0); |
| | | layoutControlItem2.TextVisible = false; |
| | | // |
| | | // splitter |
| | | // |
| | | splitter.AllowHotTrack = true; |
| | | splitter.Location = new Point(165, 0); |
| | | splitter.Name = "splitter"; |
| | | splitter.Size = new Size(10, 573); |
| | | // |
| | | // HydroMultiWorkingLossStatisticsDlg |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | ClientSize = new Size(994, 605); |
| | | Controls.Add(layoutControl1); |
| | | Controls.Add(ribbon); |
| | | FormBorderStyle = FormBorderStyle.SizableToolWindow; |
| | | Name = "HydroMultiWorkingLossStatisticsDlg"; |
| | | Ribbon = ribbon; |
| | | RibbonVisibility = DevExpress.XtraBars.Ribbon.RibbonVisibility.Hidden; |
| | | StartPosition = FormStartPosition.CenterParent; |
| | | Text = "æå¤±ç»è®¡"; |
| | | ((ISupportInitialize)ribbon).EndInit(); |
| | | ((ISupportInitialize)layoutControl1).EndInit(); |
| | | layoutControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)Root).EndInit(); |
| | | ((ISupportInitialize)groupForWorkingList).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ((ISupportInitialize)groupForLossStatistics).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((ISupportInitialize)splitter).EndInit(); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraBars.Ribbon.RibbonControl ribbon; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; |
| | | private DevExpress.XtraLayout.LayoutControl layoutControl1; |
| | | private HydroSingleWorkingLossStatisticsCtrl hydroSingleWorkingLossStatisticsCtrl1; |
| | | private HydroWorkingListViewCtrl hydroWorkingListViewCtrl1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup Root; |
| | | private DevExpress.XtraLayout.LayoutControlGroup groupForWorkingList; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup groupForLossStatistics; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
| | | private DevExpress.XtraLayout.SplitterItem splitter; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using DevExpress.Xpo.Helpers; |
| | | using Mapster; |
| | | using Yw.EPAnet; |
| | | using Yw.Hydro; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | public partial class HydroMultiWorkingLossStatisticsDlg : DevExpress.XtraBars.Ribbon.RibbonForm |
| | | { |
| | | public HydroMultiWorkingLossStatisticsDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | this.hydroWorkingListViewCtrl1.SelectedChangedEvent += HydroWorkingListViewCtrl1_SelectedChangedEvent; |
| | | } |
| | | |
| | | |
| | | private Yw.Model.HydroModelInfo _hydroInfo = null; |
| | | |
| | | /// <summary> |
| | | /// ç»å®æ°æ® |
| | | /// </summary> |
| | | public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroWorkingVmo> allWorkingList) |
| | | { |
| | | if (hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | if (allWorkingList == null || allWorkingList.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | _hydroInfo = hydroInfo; |
| | | this.hydroWorkingListViewCtrl1.SetBindingData(allWorkingList); |
| | | if (allWorkingList.Count < 2) |
| | | { |
| | | var working = allWorkingList[0]; |
| | | this.Text = $"æå¤±ç»è®¡({working.Name})"; |
| | | this.groupForWorkingList.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | this.splitter.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | this.groupForLossStatistics.GroupBordersVisible = false; |
| | | LoadWorkingLossStatistics(working); |
| | | } |
| | | } |
| | | |
| | | //å·¥åµéæ©æ¹å |
| | | private void HydroWorkingListViewCtrl1_SelectedChangedEvent(HydroWorkingVmo working) |
| | | { |
| | | if (working == null) |
| | | { |
| | | return; |
| | | } |
| | | LoadWorkingLossStatistics(working); |
| | | } |
| | | |
| | | //å 载工åµç»è®¡ |
| | | private void LoadWorkingLossStatistics(HydroWorkingVmo working) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | this.groupForLossStatistics.Text = working.Name; |
| | | var hydroInfo = _hydroInfo.Adapt<Yw.Model.HydroModelInfo>(); |
| | | hydroInfo.UpdateWorkingInfo(working.WorkingInfo); |
| | | var network = hydroInfo.ToNetwork(); |
| | | var calcuResult = network.Calcu(Yw.EPAnet.CalcuMode.MinorLoss); |
| | | var allEnergyList = network.AnalyzeEnergy(calcuResult); |
| | | this.hydroSingleWorkingLossStatisticsCtrl1.SetBindingData(hydroInfo, allEnergyList); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | partial class HydroSingleWorkingLossStatisticsCtrl |
| | | { |
| | | /// <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() |
| | | { |
| | | layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); |
| | | hydroEnergyStatisticsBarCtrl1 = new HydroEnergyStatisticsBarCtrl(); |
| | | hydroCatalogLossScaleChartCtrl1 = new HydroCatalogLossScaleChartCtrl(); |
| | | Root = new DevExpress.XtraLayout.LayoutControlGroup(); |
| | | layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); |
| | | ((ISupportInitialize)layoutControl1).BeginInit(); |
| | | layoutControl1.SuspendLayout(); |
| | | ((ISupportInitialize)Root).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem2).BeginInit(); |
| | | ((ISupportInitialize)layoutControlItem1).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // layoutControl1 |
| | | // |
| | | layoutControl1.Controls.Add(hydroEnergyStatisticsBarCtrl1); |
| | | layoutControl1.Controls.Add(hydroCatalogLossScaleChartCtrl1); |
| | | layoutControl1.Dock = DockStyle.Fill; |
| | | layoutControl1.Location = new Point(0, 0); |
| | | layoutControl1.Name = "layoutControl1"; |
| | | layoutControl1.Root = Root; |
| | | layoutControl1.Size = new Size(918, 674); |
| | | layoutControl1.TabIndex = 9; |
| | | layoutControl1.Text = "layoutControl1"; |
| | | // |
| | | // hydroEnergyStatisticsBarCtrl1 |
| | | // |
| | | hydroEnergyStatisticsBarCtrl1.Location = new Point(2, 469); |
| | | hydroEnergyStatisticsBarCtrl1.Name = "hydroEnergyStatisticsBarCtrl1"; |
| | | hydroEnergyStatisticsBarCtrl1.Size = new Size(914, 203); |
| | | hydroEnergyStatisticsBarCtrl1.TabIndex = 2; |
| | | // |
| | | // hydroCatalogLossScaleChartCtrl1 |
| | | // |
| | | hydroCatalogLossScaleChartCtrl1.Location = new Point(2, 19); |
| | | hydroCatalogLossScaleChartCtrl1.Name = "hydroCatalogLossScaleChartCtrl1"; |
| | | hydroCatalogLossScaleChartCtrl1.Size = new Size(914, 429); |
| | | hydroCatalogLossScaleChartCtrl1.TabIndex = 0; |
| | | // |
| | | // Root |
| | | // |
| | | Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; |
| | | Root.GroupBordersVisible = false; |
| | | Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem1 }); |
| | | Root.Name = "Root"; |
| | | Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); |
| | | Root.Size = new Size(918, 674); |
| | | Root.TextVisible = false; |
| | | // |
| | | // layoutControlItem2 |
| | | // |
| | | layoutControlItem2.Control = hydroEnergyStatisticsBarCtrl1; |
| | | layoutControlItem2.Location = new Point(0, 450); |
| | | layoutControlItem2.Name = "layoutControlItem2"; |
| | | layoutControlItem2.Size = new Size(918, 224); |
| | | layoutControlItem2.Text = "è½éç»è®¡"; |
| | | layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top; |
| | | layoutControlItem2.TextSize = new Size(48, 14); |
| | | // |
| | | // layoutControlItem1 |
| | | // |
| | | layoutControlItem1.Control = hydroCatalogLossScaleChartCtrl1; |
| | | layoutControlItem1.Location = new Point(0, 0); |
| | | layoutControlItem1.Name = "layoutControlItem1"; |
| | | layoutControlItem1.Size = new Size(918, 450); |
| | | layoutControlItem1.Text = "åç±»ç»è®¡"; |
| | | layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top; |
| | | layoutControlItem1.TextSize = new Size(48, 14); |
| | | // |
| | | // HydroSingleLossScaleCtrl |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(layoutControl1); |
| | | Name = "HydroSingleLossScaleCtrl"; |
| | | Size = new Size(918, 674); |
| | | ((ISupportInitialize)layoutControl1).EndInit(); |
| | | layoutControl1.ResumeLayout(false); |
| | | ((ISupportInitialize)Root).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem2).EndInit(); |
| | | ((ISupportInitialize)layoutControlItem1).EndInit(); |
| | | ResumeLayout(false); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraLayout.LayoutControl layoutControl1; |
| | | private HydroEnergyStatisticsBarCtrl hydroEnergyStatisticsBarCtrl1; |
| | | private HydroCatalogLossScaleChartCtrl hydroCatalogLossScaleChartCtrl1; |
| | | private DevExpress.XtraLayout.LayoutControlGroup Root; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; |
| | | private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; |
| | | } |
| | | } |
ÎļþÃû´Ó WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/02-scale/HydroSingleLossScaleDlg.cs ÐÞ¸Ä |
| | |
| | | using DevExpress.Xpo.Helpers; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | public partial class HydroSingleLossScaleDlg : DevExpress.XtraBars.Ribbon.RibbonForm |
| | | public partial class HydroSingleWorkingLossStatisticsCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public HydroSingleLossScaleDlg() |
| | | public HydroSingleWorkingLossStatisticsCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | var allLossList = hydroInfo.GetAllCatalogLossScaleList(allEnergyList); |
| | | this.hydroSingleLossScaleCtrl1.SetBindingData(allLossList); |
| | | this.hydroCatalogLossScaleChartCtrl1.SetBindingData(allLossList); |
| | | var allStatisticsList = allEnergyList.GetStatisticsList(); |
| | | this.hydroEnergyStatisticsBarCtrl1.SetBindingData(allStatisticsList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
copy from WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/02-scale/HydroSingleLossScaleDlg.resx
copy to WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/03-statistics/HydroSingleWorkingLossStatisticsCtrl.resx
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | partial class HydroSingleWorkingLossStatisticsDlg |
| | | { |
| | | /// <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() |
| | | { |
| | | ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl(); |
| | | ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); |
| | | ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); |
| | | hydroSingleWorkingLossStatisticsCtrl1 = new HydroSingleWorkingLossStatisticsCtrl(); |
| | | ((ISupportInitialize)ribbon).BeginInit(); |
| | | SuspendLayout(); |
| | | // |
| | | // ribbon |
| | | // |
| | | ribbon.ExpandCollapseItem.Id = 0; |
| | | ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbon.ExpandCollapseItem }); |
| | | ribbon.Location = new Point(0, 0); |
| | | ribbon.MaxItemId = 1; |
| | | ribbon.Name = "ribbon"; |
| | | ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); |
| | | ribbon.RibbonCaptionAlignment = DevExpress.XtraBars.Ribbon.RibbonCaptionAlignment.Left; |
| | | ribbon.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbon.Size = new Size(997, 32); |
| | | // |
| | | // ribbonPage1 |
| | | // |
| | | ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); |
| | | ribbonPage1.Name = "ribbonPage1"; |
| | | ribbonPage1.Text = "ribbonPage1"; |
| | | // |
| | | // ribbonPageGroup1 |
| | | // |
| | | ribbonPageGroup1.Name = "ribbonPageGroup1"; |
| | | ribbonPageGroup1.Text = "ribbonPageGroup1"; |
| | | // |
| | | // hydroSingleLossScaleCtrl1 |
| | | // |
| | | hydroSingleWorkingLossStatisticsCtrl1.Dock = DockStyle.Fill; |
| | | hydroSingleWorkingLossStatisticsCtrl1.Location = new Point(0, 32); |
| | | hydroSingleWorkingLossStatisticsCtrl1.Name = "hydroSingleLossScaleCtrl1"; |
| | | hydroSingleWorkingLossStatisticsCtrl1.Size = new Size(997, 591); |
| | | hydroSingleWorkingLossStatisticsCtrl1.TabIndex = 1; |
| | | // |
| | | // HydroSingleLossScaleDlg |
| | | // |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | ClientSize = new Size(997, 623); |
| | | Controls.Add(hydroSingleWorkingLossStatisticsCtrl1); |
| | | Controls.Add(ribbon); |
| | | FormBorderStyle = FormBorderStyle.SizableToolWindow; |
| | | Name = "HydroSingleLossScaleDlg"; |
| | | Ribbon = ribbon; |
| | | RibbonVisibility = DevExpress.XtraBars.Ribbon.RibbonVisibility.Hidden; |
| | | StartPosition = FormStartPosition.CenterParent; |
| | | Text = "æå¤±æ¯ä¾"; |
| | | ((ISupportInitialize)ribbon).EndInit(); |
| | | ResumeLayout(false); |
| | | PerformLayout(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private DevExpress.XtraBars.Ribbon.RibbonControl ribbon; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; |
| | | private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; |
| | | private HydroSingleWorkingLossStatisticsCtrl hydroSingleWorkingLossStatisticsCtrl1; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Yw.Hydro; |
| | | using Yw.EPAnet; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | | public partial class HydroSingleWorkingLossStatisticsDlg : DevExpress.XtraBars.Ribbon.RibbonForm |
| | | { |
| | | public HydroSingleWorkingLossStatisticsDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»å®æ°æ® |
| | | /// </summary> |
| | | public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo) |
| | | { |
| | | var network = hydroInfo.ToNetwork(); |
| | | var calcuResult = network.Calcu(Yw.EPAnet.CalcuMode.MinorLoss); |
| | | var allEnergyPointList = network.AnalyzeEnergy(calcuResult); |
| | | SetBindingData(hydroInfo, allEnergyPointList); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<Yw.EPAnet.EnergyPoint> allEnergyList) |
| | | { |
| | | this.hydroSingleWorkingLossStatisticsCtrl1.SetBindingData(hydroInfo, allEnergyList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
copy from WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/02-scale/HydroSingleLossScaleDlg.resx
copy to WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/03-statistics/HydroSingleWorkingLossStatisticsDlg.resx
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <!-- |
| | | This file is automatically generated by Visual Studio. It is |
| | | used to store generic object data source configuration information. |
| | | Renaming the file extension or editing the content of this file may |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="HydroWorkingListItemViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>Yw.WinFrmUI.HydroWorkingListItemViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | <Compile Update="18-loss\01-curve\HydroSingleLossCurveDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="18-loss\02-scale\HydroSingleLossScaleDlg.cs"> |
| | | <Compile Update="18-loss\03-statistics\HydroMultiWorkingLossStatisticsDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="18-loss\03-statistics\HydroSingleWorkingLossStatisticsDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Update="99-view\02-l2d\HydroL2dViewPage.cs"> |
| | |
| | | <Compile Update="10-working\01-basic\SetHydroWorkingBasicCtrl.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="10-working\07-list\HydroWorkingListViewCtrl.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="11-search\InputHydroVisualSearchListDlg.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | |
| | | <Compile Update="18-loss\01-curve\HydroSingleLossCurveCtrl.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="18-loss\02-scale\HydroSingleLossScaleCtrl.cs"> |
| | | <Compile Update="18-loss\02-scale\HydroCatalogLossScaleChartCtrl.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="18-loss\03-statistics\HydroSingleWorkingLossStatisticsCtrl.cs"> |
| | | <SubType>UserControl</SubType> |
| | | </Compile> |
| | | <Compile Update="19-pump\01-run\HydroPumpRunListCtrl.cs"> |