| | |
| | | using DevExpress.Utils.Svg; |
| | | using HStation.Vmo; |
| | | using HStation.WinFrmUI.Xhs.PumpProduct; |
| | | using Yw.WinFrmUI.Page; |
| | | |
| | |
| | | this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | this.PageTitle.SvgImageSize = new Size(24, 24); |
| | | this.PageTitle.AllowClose = false; |
| | | |
| | | this.repPicEdit.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom; |
| | | } |
| | | |
| | |
| | | public SvgImage Image { get; set; } |
| | | } |
| | | |
| | | private Lazy<BLL.XhsProjectStd> _bllProjectStd = new(() => new BLL.XhsProjectStd()); |
| | | private List<XhsProjectStdDto> _allProjectList = null; |
| | | private List<XhsProjectVmo> _allProjectList = null; |
| | | |
| | | private Lazy<BLL.PumpMain> _bllPump = new(() => new BLL.PumpMain()); |
| | | |
| | |
| | | /// </summary> |
| | | public override async void InitialDataSource() |
| | | { |
| | | _allProjectList = await _bllProjectStd.Value.GetAll(); |
| | | SetBindingData(); |
| | | this.mapViewProjectListContainer1.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent; |
| | | await this.mapViewProjectListContainer1.InitialContainer(); |
| | | } |
| | | |
| | | private async void SetBindingData() |
| | | { |
| | | _allProjectList = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetAll(); |
| | | var allPump = await _bllPump.Value.GetAll(); |
| | | var vm = new CurrentViewModel() |
| | | { |
| | |
| | | Count = 0, |
| | | Image = ImageLib.Valve |
| | | }; |
| | | var vm4 = new CurrentViewModel() |
| | | { |
| | | Name = "冷却塔数量", |
| | | Count = 0, |
| | | Image = ImageLib.CoolingTower |
| | | }; |
| | | |
| | | var list = new List<CurrentViewModel>() { vm, vm2, vm3 }; |
| | | var list = new List<CurrentViewModel>() { vm, vm2, vm3, vm4 }; |
| | | this.gridControl1.DataSource = list; |
| | | this.gridControl1.RefreshDataSource(); |
| | | |
| | | this.mapViewProjectListContainer1.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent; |
| | | await this.mapViewProjectListContainer1.InitialContainer(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public override async void RefreshData() |
| | | { |
| | | base.RefreshData(); |
| | | _allProjectList = await _bllProjectStd.Value.GetAll(); |
| | | _allProjectList = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetAll(); |
| | | await this.mapViewProjectListContainer1.SetProjectList(_allProjectList); |
| | | this.homeXhsProjectTreeListCtrl1.SetBindingData(_allProjectList); |
| | | SetBindingData(); |
| | | } |
| | | |
| | | //地图加载完成 |
| | |
| | | } |
| | | |
| | | //选择项目事件 |
| | | private async void homeXhsProjectTreeListCtrl1_SelectProjectEvent(XhsProjectStdDto obj) |
| | | private async void homeXhsProjectTreeListCtrl1_SelectProjectEvent(XhsProjectVmo obj) |
| | | { |
| | | await this.mapViewProjectListContainer1.SelectProject(obj.ID); |
| | | var vm = new HomeXhsProjectPropertyViewModel(obj); |
| | |
| | | } |
| | | |
| | | //跳转事件 |
| | | private async void homeXhsProjectPropertyCtrl1_JumpDirectEvent(XhsProjectStdDto obj) |
| | | private async void homeXhsProjectPropertyCtrl1_JumpDirectEvent(XhsProjectVmo obj) |
| | | { |
| | | var bimfacefile = await BimfaceFileStateHelper.IsHaveBimFace(obj.ID); |
| | | if (bimfacefile == null) |
| | |
| | | |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeMultiMgrPage(); |
| | | // var page = new XhsSchemeMultiMgrPage(); |
| | | // await page.SetBindingData(obj.ID); |
| | | |
| | | var page = new XhsProjectSimulationMgrPage(); |
| | | await page.SetBindingData(obj.ID); |
| | | //var page = new XhsProjectSimulationMgrPage(); |
| | | CreatePage(page, guid); |
| | |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void layoutView1_MouseMove(object sender, MouseEventArgs e) |
| | | { |
| | | var info = layoutView1.CalcHitInfo(e.X, e.Y); |
| | | if (info.Column == null) |
| | | return; |
| | | if (info.Column.Caption == "名称") |
| | | { |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | else |
| | | { |
| | | } |
| | | } |
| | | |
| | | private void layoutView1_MouseEnter(object sender, EventArgs e) |
| | | { |
| | | var info = layoutView1.CalcHitInfo(Cursor.Position.X, Cursor.Position.Y); |
| | | if (info.Column != null && info.Column.Caption == "名称") |
| | | { |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | } |
| | | |
| | | private void layoutView1_MouseLeave(object sender, EventArgs e) |
| | | { |
| | | Cursor.Current = Cursors.Default; |
| | | } |
| | | } |
| | | } |