| | |
| | | using DevExpress.CodeParser.VB.Preprocessor; |
| | | using DevExpress.Utils.Svg; |
| | | using DevExpress.XtraBars.Docking; |
| | | using DevExpress.XtraBars.Docking2010.Views; |
| | |
| | | using DevExpress.XtraBars.Navigation; |
| | | using DevExpress.XtraBars.Ribbon; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraSpreadsheet.Model; |
| | | using DevExpress.XtraTab; |
| | | using HStation.WinFrmUI; |
| | | using HStation.WinFrmUI.Assets; |
| | | using HStation.WinFrmUI.Basic; |
| | | using HStation.WinFrmUI.Dict; |
| | | using NPOI.SS.Formula.Functions; |
| | | using PBS.WinFrmUI; |
| | | using PBS.WinFrmUI.WE; |
| | | using System.IO; |
| | | using PBS.WinFrmUI.Box; |
| | | using PBS.WinFrmUI.DataAnalysis; |
| | | using PBS.WinFrmUI.Hydro; |
| | | using Yw.WinFrmUI; |
| | | using Yw.WinFrmUI.Page; |
| | | |
| | |
| | | { |
| | | pguid = this.tabbedView1.ActiveDocument.Tag as PageGuid; |
| | | } |
| | | |
| | | SelectModular(tag, pguid); |
| | | } |
| | | |
| | |
| | | //if (!IsExistPage(guid, true)) |
| | | //{ |
| | | //} |
| | | |
| | | SelectModular("BasicData"); |
| | | var pageGuid = new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "MapInfo", |
| | | }; |
| | | SelectModular("Home", pageGuid); |
| | | } |
| | | |
| | | //界面正在退出时确认 |
| | |
| | | var accEle = GetAccordionControlElement(element); |
| | | this.accordionControlFunction.Elements.Add(accEle); |
| | | } |
| | | |
| | | foreach (var element in list) |
| | | { |
| | | if (element.IsNormallyOpen && !IsExistPage(element.PageGuid, false)) |
| | | { |
| | | element.Click.Invoke(); |
| | | } |
| | | } |
| | | } |
| | | _sel_modular = modular; |
| | | } |
| | |
| | | dev_ele.Tag = ele; |
| | | dev_ele.Style = DevExpress.XtraBars.Navigation.ElementStyle.Item; |
| | | dev_ele.Click += delegate { ele.Click?.Invoke(); }; |
| | | dev_ele.Enabled = ele.Enable; |
| | | ele.EnableChangedEvent += (bol) => |
| | | { |
| | | dev_ele.Enabled = bol; |
| | | }; |
| | | if (ele.Elements != null && ele.Elements.Count > 0) |
| | | { |
| | | dev_ele.Style = DevExpress.XtraBars.Navigation.ElementStyle.Group; |
| | |
| | | return false; |
| | | } |
| | | |
| | | private bool _ibox_status = false; |
| | | |
| | | //获取 |
| | | private List<AccordionElement> GetAccordionElementList(string modular) |
| | | { |
| | | var list = new List<AccordionElement>(); |
| | | if (modular == "BasicData") |
| | | switch (modular) |
| | | { |
| | | var place_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "place", |
| | | Caption = "场所管理", |
| | | SvgImage = svgImgGroup32[0], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | case "BasicData": |
| | | { |
| | | var place_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "place", |
| | | Caption = "场所管理", |
| | | SvgImage = svgImgGroup32[0], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | { |
| | | Get("行政区域",new PageGuid() |
| | | { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | var we_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "we", |
| | | Caption = "当量管理", |
| | | SvgImage = svgImgGroup32[1], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | var we_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "we", |
| | | Caption = "当量管理", |
| | | SvgImage = svgImgGroup32[1], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | Get("用水器具",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | var coupling = Get("连接件", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsCouplingMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | coupling.Elements = new List<AccordionElement>() |
| | | var coupling = Get("连接件", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsCouplingMgr", |
| | | }, svgImgItem32[41], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | coupling.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("闷头",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsBluntheadMgr", |
| | | }, svgImgItem32[8], new Size(18, 18), (caption,guid,svg,size) => |
| | | }, svgImgItem32[43], new Size(18, 18), (caption,guid,svg,size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | var emitter = Get("扩散器", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsEmitterMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | emitter.Elements = new List<AccordionElement>() |
| | | var emitter = Get("扩散器", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsEmitterMgr", |
| | | }, svgImgItem32[37], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | emitter.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("喷头",new PageGuid() |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | var Instrument = Get("设施仪表", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsInstrumentMgr", |
| | | }, svgImgItem32[22], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | Instrument.Elements = new List<AccordionElement>() |
| | | var Instrument = Get("设施仪表", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsInstrumentMgr", |
| | | }, svgImgItem32[22], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | Instrument.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水表",new PageGuid() |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | var Resistance = Get("阻件", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsResistanceMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | Resistance.Elements = new List<AccordionElement>() |
| | | var Resistance = Get("阻件", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsResistanceMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | Resistance.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("换热器",new PageGuid() |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | #region 供水水源 |
| | | #region 供水水源 |
| | | |
| | | var waterSupplySource = Get("供水水源", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "waterSupplySource", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupplySource.Elements = new List<AccordionElement>() |
| | | var waterSupplySource = Get("供水水源", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "waterSupplySource", |
| | | }, svgImgItem32[40], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupplySource.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水池", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsTankMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | }, svgImgItem32[39], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | #endregion 供水水源 |
| | | #endregion 供水水源 |
| | | |
| | | #region 供水装置 |
| | | #region 供水装置 |
| | | |
| | | var waterSupply = Get("供水装置", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "waterSupply", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupply.Elements = new List<AccordionElement>() |
| | | var waterSupply = Get("供水装置", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "waterSupply", |
| | | }, svgImgItem32[38], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupply.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水泵管理", new PageGuid() |
| | | { |
| | |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsKitMgr", |
| | | Function = "AssetsPackageMgr", |
| | | }, svgImgItem32[8], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new PackageManageMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | #endregion 供水装置 |
| | | #endregion 供水装置 |
| | | |
| | | var FacilityNetwork = Get("设施管网", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "FacilityNetwork", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | FacilityNetwork.Elements = new List<AccordionElement>() |
| | | var FacilityNetwork = Get("设施管网", new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "FacilityNetwork", |
| | | }, svgImgItem32[36], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | FacilityNetwork.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("管道",new PageGuid() |
| | | { |
| | |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AssetsValveMgr", |
| | | }, svgImgItem32[7], new Size(18, 18), (caption,guid,svg,size) => |
| | | }, svgImgItem32[42], new Size(18, 18), (caption,guid,svg,size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | |
| | | emitter, |
| | | }; |
| | | |
| | | var asset_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "产品管理", |
| | | SvgImage = svgImgGroup32[2], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | var asset_mgr_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "产品管理", |
| | | SvgImage = svgImgGroup32[2], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | Get("厂商管理",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | /* var page = new DocumentPage(); |
| | | var page=new AssetsManufacturerMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid);*/ |
| | | CreatePage(page,guid); |
| | | } |
| | | }), |
| | | waterSupplySource, |
| | | waterSupply, |
| | | FacilityNetwork, |
| | | Instrument, |
| | | Get("供水设备",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "WaterEquipmentMgr", |
| | | }, svgImgItem32[6], new Size(18, 18), (caption,guid,svg,size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page=new WaterEquipmentMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page,guid); |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | var system_config_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "系统配置", |
| | | SvgImage = svgImgGroup32[3], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | var system_config_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "系统配置", |
| | | SvgImage = svgImgGroup32[3], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | Get("类型管理",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | |
| | | CreatePage(page,guid); |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | Get("电费配置",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ElecPriceMgr", |
| | | }, svgImgItem32[44], new Size(18, 18), (caption,guid,svg,size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page=new ElecPriceMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page,guid); |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | |
| | | var auth_config_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "权限配置", |
| | | SvgImage = svgImgGroup32[4], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | var auth_config_ele = new AccordionElement() |
| | | { |
| | | Id = "asset", |
| | | Caption = "权限配置", |
| | | SvgImage = svgImgGroup32[4], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() { |
| | | Get("用户管理",new PageGuid() |
| | | { |
| | | Modular = "BasicData", |
| | |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | list.Add(place_mgr_ele); |
| | | list.Add(we_mgr_ele); |
| | | list.Add(asset_mgr_ele); |
| | | list.Add(system_config_ele); |
| | | list.Add(auth_config_ele); |
| | | list.Add(place_mgr_ele); |
| | | list.Add(we_mgr_ele); |
| | | list.Add(asset_mgr_ele); |
| | | list.Add(system_config_ele); |
| | | list.Add(auth_config_ele); |
| | | } |
| | | break; |
| | | |
| | | case "ModelManage": |
| | | { |
| | | } |
| | | break; |
| | | |
| | | case "WaterSupplyAnalysis": |
| | | { |
| | | var systemCurve = Get("系统曲线", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new SystemCurvePage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | //var simulationDrill = Get("模拟调度", new PageGuid() |
| | | //{ |
| | | // Modular = "WaterSupplyAnalysis", |
| | | // MoudingType = eMoudingType.Tab, |
| | | // Function = "SimulationSchedule", |
| | | //}, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | //{ |
| | | // if (!IsExistPage(guid, true)) |
| | | // { |
| | | // var page = new SimulationSchedulePage(); |
| | | // page.PageGuid = guid; |
| | | // page.PageTitle.Caption = caption; |
| | | // page.PageTitle.HeaderSvgImage = svg; |
| | | // page.PageTitle.SvgImageSize = size; |
| | | // CreatePage(page, guid); |
| | | // } |
| | | //}); |
| | | var forecastWater = Get("水量预测", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }); |
| | | var operationalEvaluation = Get("运行评估", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }); |
| | | list.Add(systemCurve); |
| | | list.Add(forecastWater); |
| | | list.Add(operationalEvaluation); |
| | | } |
| | | break; |
| | | |
| | | case "DataAnalysis": |
| | | { |
| | | var analysis = Get("能耗分析", new PageGuid() |
| | | { |
| | | Modular = "DataAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "EnergyAnalysis", |
| | | }, svgImageIBox[14], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new EnergyAnalysis(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | var analysis1 = Get("流量压力比对分析", new PageGuid() |
| | | { |
| | | Modular = "DataAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "FlowPressAnalysis", |
| | | }, svgImageIBox[13], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new FlowPressAnalysis(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | |
| | | var analysis2 = Get("末端压力分析", new PageGuid() |
| | | { |
| | | Modular = "DataAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "EndPressAnalysis", |
| | | }, svgImageIBox[12], 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); |
| | | } |
| | | }); |
| | | list.Add(analysis); |
| | | list.Add(analysis1); |
| | | list.Add(analysis2); |
| | | } |
| | | break; |
| | | |
| | | case "SmartHardware": |
| | | { |
| | | // 创建一个列表来存储所有需要操作的 AccordionElement 对象 |
| | | List<AccordionElement> allAccordionElements = new List<AccordionElement>(); |
| | | AccordionElement accordionElement_Facility = new(); |
| | | accordionElement_Facility = Get("选择设施", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "FlowPressAnalysis", |
| | | }, svgImageIBox[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | var dlg = new PBS.WinFrmUI.Box.ChoiceFacilityDlg(); |
| | | dlg.SetDataSource(); |
| | | dlg.VisibleChanged += (bol) => |
| | | { |
| | | accordionElement_Facility.Enable = bol; |
| | | foreach (var item in allAccordionElements) |
| | | { |
| | | foreach (var ele in item.Elements) |
| | | { |
| | | ele.Enable = true; |
| | | _ibox_status = true; |
| | | } |
| | | } |
| | | }; |
| | | dlg.ShowDialog(); |
| | | }); |
| | | AccordionElement accordionElement_IboxInfo = new(); |
| | | accordionElement_IboxInfo = Get("硬件详情", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "IBoxInfo", |
| | | }, svgImageIBox[10], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new IBoxInfoMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }, true); |
| | | |
| | | var accordionElement_Monitor = new AccordionElement() |
| | | { |
| | | Id = "monitor", |
| | | Caption = "监测分析", |
| | | SvgImage = svgImageIBox[4], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | { |
| | | Get("实时监测", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "MonitorMgr", |
| | | }, svgImageIBox[3], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new MonitorMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("能耗分析", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "AnalysisMgr", |
| | | }, svgImageIBox[1], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new AnalysisMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | allAccordionElements.Add(accordionElement_Monitor); |
| | | var accordionElement_DataManagement = new AccordionElement() |
| | | { |
| | | Id = "management", |
| | | Caption = "数据管理", |
| | | SvgImage = svgImageIBox[9], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | { |
| | | Get("协议配置", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ProtocolMgr", |
| | | }, svgImageIBox[11], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new ProtocolMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("监测配置", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "MonitorConfigurationMgr", |
| | | }, svgImageIBox[5], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new MonitorConfigurationMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("数据处理", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "DataFilterMgr", |
| | | },svgImageIBox[8], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new DataFilter(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("参数配置", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ParameterMgr", |
| | | }, svgImageIBox[0], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new ParameterMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | /*Get("智控数据", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "IntelligentControlData", |
| | | }, svgImgItem32[2], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }),Get("数据下发", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "DataDeliveryMgr", |
| | | }, svgImgItem32[2], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new DataDeliveryMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }),Get("服务升级", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ServiceUpgradeMgr", |
| | | }, svgImgItem32[2], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | })*/ |
| | | Get("基础信息", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "BasicInfoMgr", |
| | | }, svgImageIBox[2], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new BasicInfoMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }),Get("日志管理", new PageGuid() |
| | | { |
| | | Modular = "SmartHardware", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "LogManagentMgr", |
| | | }, svgImageIBox[6], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new LogManagentMgr(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | allAccordionElements.Add(accordionElement_DataManagement); |
| | | if (!_ibox_status) |
| | | { |
| | | foreach (var item in allAccordionElements) |
| | | { |
| | | foreach (var ele in item.Elements) |
| | | { |
| | | ele.Enable = false; |
| | | } |
| | | } |
| | | } |
| | | list.Add(accordionElement_Facility); |
| | | list.Add(accordionElement_IboxInfo); |
| | | list.Add(accordionElement_Monitor); |
| | | list.Add(accordionElement_DataManagement); |
| | | } |
| | | |
| | | break; |
| | | |
| | | case "Home": |
| | | { |
| | | AccordionElement accordionElement_Home = new(); |
| | | accordionElement_Home = Get("地图信息", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "MapInfo", |
| | | }, svgImageHome[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new HomePbsProjectPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }, true); |
| | | |
| | | var accordionElement_ModelManagement = new AccordionElement() |
| | | { |
| | | Id = "Home", |
| | | Caption = "模型管理", |
| | | SvgImage = svgImageHome[3], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水力场景", new PageGuid() |
| | | { |
| | | Modular = "ModelManage", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImageHome[8], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | //var page = new HydroSceneMgrPage(); |
| | | //page.PageGuid = guid; |
| | | //page.PageTitle.Caption = caption; |
| | | //page.PageTitle.HeaderSvgImage = svg; |
| | | //page.PageTitle.SvgImageSize = size; |
| | | //CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("模型模版", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ModelTemplate", |
| | | }, svgImageHome[2], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new ModelTemplatePage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("快速建模", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "QuickModeling", |
| | | }, svgImageHome[1], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new QuickModelingPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("模型编辑", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "ModelEdit", |
| | | }, svgImageHome[0], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new ModelEditPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | var accordionElement_WaterSupplyAnalysic = new AccordionElement() |
| | | { |
| | | Id = "WaterSupplyAnalysis", |
| | | Caption = "供水分析", |
| | | SvgImage = svgImageHome[6], |
| | | SvgImageSize = new Size(24, 24), |
| | | AllowGlyphSkinning = true, |
| | | Elements = new List<AccordionElement>() |
| | | { |
| | | Get("系统曲线", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImageHome[9], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new SystemCurvePage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }), |
| | | Get("水量预测", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImageHome[5], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }), |
| | | Get("运行评估", new PageGuid() |
| | | { |
| | | Modular = "Home", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImageHome[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | /* AccordionElement accordionElement_test = new(); |
| | | accordionElement_test = Get("test", new PageGuid() |
| | | { |
| | | Modular = "Test", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "MapInfo", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new IBox.WinFrmUI.IBoxFormControll(new Vmo.IBoxControllViewModel()); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }, true);*/ |
| | | list.Add(accordionElement_Home); |
| | | // list.Add(accordionElement_test); |
| | | list.Add(accordionElement_WaterSupplyAnalysic); |
| | | list.Add(accordionElement_ModelManagement); |
| | | } |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | if (modular == "ModelManage") |
| | | { |
| | | var hydraulicScenario = Get("水力场景", new PageGuid() |
| | | { |
| | | Modular = "ModelManage", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new HydroSceneMgrPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | |
| | | } |
| | | }); |
| | | var modelTemplate = Get("模型模版", new PageGuid() |
| | | { |
| | | Modular = "ModelManage", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | var rapidModeling = Get("快速建模", new PageGuid() |
| | | { |
| | | Modular = "ModelManage", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | var modelEdit = Get("模型编辑", new PageGuid() |
| | | { |
| | | Modular = "ModelManage", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }); |
| | | list.Add(hydraulicScenario); |
| | | list.Add(modelTemplate); |
| | | list.Add(rapidModeling); |
| | | list.Add(modelEdit); |
| | | } |
| | | if (modular == "WaterSupplyAnalysis") |
| | | { |
| | | var systemCurve = Get("系统曲线", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | var forecastWater = Get("水量预测", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }); |
| | | var operationalEvaluation = Get("运行评估", new PageGuid() |
| | | { |
| | | Modular = "WaterSupplyAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | |
| | | } |
| | | }); |
| | | list.Add(systemCurve); |
| | | list.Add(forecastWater); |
| | | list.Add(operationalEvaluation); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | private AccordionElement Get(string caption, PageGuid guid, SvgImage svg_img, Size size, Action<string, PageGuid, SvgImage, Size> action, bool glyph_skinning = true) |
| | | private AccordionElement Get(string caption, PageGuid guid, SvgImage svg_img, Size size, Action<string, PageGuid, SvgImage, Size> action, bool is_normally_open = false, bool glyph_skinning = true) |
| | | { |
| | | var ele = new AccordionElement(); |
| | | if (guid == null) |
| | |
| | | ele.SvgImage = svg_img; |
| | | ele.SvgImageSize = size; |
| | | ele.AllowGlyphSkinning = glyph_skinning; |
| | | ele.IsNormallyOpen = is_normally_open; |
| | | return ele; |
| | | } |
| | | |