| | |
| | | using HStation.WinFrmUI.Dict; |
| | | using NPOI.SS.Formula.Functions; |
| | | using PBS.WinFrmUI; |
| | | using PBS.WinFrmUI.DataAnalysis; |
| | | using PBS.WinFrmUI.Hydro; |
| | | using PBS.WinFrmUI.WE; |
| | | using System.IO; |
| | | using Yw.WinFrmUI; |
| | |
| | | //this.tabbedView1.AppearancePage.Header.BackColor = Color.White; |
| | | this.tabbedView1.AppearancePage.HeaderSelected.Font = new Font("微软雅黑", 10f, FontStyle.Bold); |
| | | |
| | | // this.tabbedView1.CustomDrawTabHeader += OnCustomDrawTabHeader; |
| | | // this.tabbedView1.CustomDrawTabHeader += OnCustomDrawTabHeader; |
| | | } |
| | | |
| | | private void OnCustomDrawTabHeader(object sender, TabHeaderCustomDrawEventArgs e) |
| | |
| | | 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() |
| | | { |
| | |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new PlaceMgrPage(); |
| | | var page = new DivisionMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | |
| | | } |
| | | }) |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | 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[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | coupling.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("闷头",new PageGuid() |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | 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[7], 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[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupplySource.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水池", new PageGuid() |
| | | { |
| | |
| | | }), |
| | | }; |
| | | |
| | | #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[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | waterSupply.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("水泵管理", new PageGuid() |
| | | { |
| | |
| | | }) |
| | | }; |
| | | |
| | | #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[7], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | }); |
| | | FacilityNetwork.Elements = new List<AccordionElement>() |
| | | { |
| | | Get("管道",new PageGuid() |
| | | { |
| | |
| | | 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", |
| | |
| | | FacilityNetwork, |
| | | Instrument, |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | 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", |
| | |
| | | } |
| | | }), |
| | | } |
| | | }; |
| | | }; |
| | | |
| | | 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": |
| | | { |
| | | 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); |
| | | } |
| | | 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 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 analysis1 = Get("流量压力分析", new PageGuid() |
| | | { |
| | | Modular = "DataAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], 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("分析1", new PageGuid() |
| | | { |
| | | Modular = "DataAnalysis", |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = " ", |
| | | }, svgImgItem32[4], new Size(18, 18), (caption, guid, svg, size) => |
| | | { |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | } |
| | | }); |
| | | |
| | | list.Add(analysis1); |
| | | list.Add(analysis2); |
| | | } |
| | | 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 PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | 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 page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | 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 page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | 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)) |
| | | { |
| | | var page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | 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 page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | 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 page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | 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)) |
| | | { |
| | | var page = new PBS.WinFrmUI.WE.WaterUtensilMainPage(); |
| | | page.PageGuid = guid; |
| | | page.PageTitle.Caption = caption; |
| | | page.PageTitle.HeaderSvgImage = svg; |
| | | page.PageTitle.SvgImageSize = size; |
| | | CreatePage(page, guid); |
| | | } |
| | | }); |
| | | list.Add(systemCurve); |
| | | list.Add(forecastWater); |
| | | list.Add(operationalEvaluation); |
| | | } |
| | | |
| | | |
| | | return list; |
| | | } |
| | | |