namespace HStation.WinFrmUI { public partial class ProjectResultShowPanel : DevExpress.XtraEditors.XtraUserControl, IWizardPage { public ProjectResultShowPanel() { InitializeComponent(); } /// 页面状态改变事件 /// public event Action PageStateChangedEvent; private ImportXhsProjectViewModel _vm = null;//操作对象 /// /// 初始化页面 /// public async void InitialPage(ImportXhsProjectViewModel vm) { _vm = vm; this.txtAddress.Text = _vm.Address; this.mapSetSimpleMarkerContainer1.LoadCompletedEvent += MapSetSimpleMarkerContainer1_LoadCompletedEvent; await this.mapSetSimpleMarkerContainer1.InitialContainer(); xhsProjectInfoCtrl1.SetBindingData(_vm); await xhsProjectHydroInfoCtrl1.SetBindingData(_vm.ProjectID ?? 0); await xhsProjectBimfaceInfoCtrl1.SetBindingData(_vm.ProjectID ?? 0); this.xhsProjectSimulationAnalysisCtrl1.SetBindingData(vm.RevitModel); } //地图加载完成 private async void MapSetSimpleMarkerContainer1_LoadCompletedEvent() { if (_vm == null) { return; } if (_vm.Location != null) { await this.mapSetSimpleMarkerContainer1.LoadMarker(_vm.Location); } } /// /// 允许上一步 /// public bool AllowPrev { get { return false; } } /// /// 允许下一步 /// public bool AllowNext { get { return false; } } /// /// 允许取消 /// public bool AllowCancel { get { return false; } } /// /// 允许完成 /// public bool AllowComplete { get { return true; } } /// /// 能否上一步 /// public bool CanPrev() { return false; } /// /// 能否下一步 /// public bool CanNext() { return false; } /// /// 能否取消 /// public bool CanCancel() { return false; } /// /// 能否完成 /// public bool CanComplete() { _vm.IsCompleted = true; return true; } } }