| | |
| | | this.Load += XhsProjectMgrPage_Load; |
| | | } |
| | | |
| | | private void XhsProjectMgrPage_Load(object sender, EventArgs e) |
| | | private void XhsProjectMgrPage_Load |
| | | (object sender, EventArgs e) |
| | | { |
| | | repositoryItemImageComboBox1.Items.AddEnum(typeof(XhsProjectMgrViewModel.eFileStatus)); |
| | | var a = typeof(XhsProjectMgrViewModel.eFileStatus); |
| | |
| | | |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | var page = new XhsSchemeMultiMgrPage(); |
| | | var page = new XhsProjectSimulationMgrPage(); |
| | | await page.SetBindingData(vm.ID); |
| | | CreatePage(page, guid); |
| | | } |
| | |
| | | } |
| | | |
| | | //导入文件 |
| | | private void BtnAddBimfaceFile_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void BtnAddBimfaceFile_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var currentVm = this.GetCurrentViewModel(); |
| | | if (currentVm == null) |
| | |
| | | MessageBoxHelper.ShowWarning("请选择数据行!"); |
| | | return; |
| | | } |
| | | if (currentVm.ModelState != XhsProjectMgrViewModel.eFileStatus.Noupload) |
| | | { |
| | | MessageBoxHelper.ShowWarning("已经存在模型文件!"); |
| | | return; |
| | | } |
| | | var dlg = new ImportXhsProjectFileDlg(); |
| | | dlg.SetBindingData(currentVm.ID); |
| | | if (dlg.ShowDialog() == DialogResult.OK) |
| | | { |
| | | var prj = dlg.ViewModel; |
| | | if (prj.ProjectID == null) |
| | | return; |
| | | var mapinfo = await new Yw.BLL.MapInfo().Get(HStation.Xhs.DataType.XhsProject, (long)prj.ProjectID, Yw.Map.Kind.Gaodei, Yw.Map.Purpose.Location); |
| | | var bimFile = await BimfaceFileStateHelper.IsHaveBimFace((long)prj.ProjectID); |
| | | if (bimFile != null) |
| | | { |
| | | currentVm.Reset(currentVm, bimFile.FileStatus); |
| | | this.xhsProjectMgrViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | } |
| | | } |
| | | } |