lixiaojun
2024-12-11 caa0bdb6f42efa49d5f76d447d8a0acec8d38ada
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/AddXhsSchemeDlg.cs
@@ -41,6 +41,10 @@
        }
        /// <summary>
        ///
        /// </summary>
        public event Action<HStation.Vmo.XhsSchemeVmo> ReloadDataEvent;
        private HStation.Vmo.XhsProjectVmo _project = null;//项目
@@ -57,11 +61,11 @@
        //初始化文件格式
        private void InitialSchemeType()
        {
            this.imgCmbSchemeType.Properties.BeginUpdate();
            this.imgCmbSchemeType.Properties.Items.Clear();
            this.imgCmbSchemeType.Properties.Items.AddEnum(typeof(HStation.Xhs.eSchemeType), false);
            this.imgCmbSchemeType.EditValue = eSchemeType.Common;
            this.imgCmbSchemeType.Properties.EndUpdate();
            //this.imgCmbSchemeType.Properties.BeginUpdate();
            //this.imgCmbSchemeType.Properties.Items.Clear();
            //this.imgCmbSchemeType.Properties.Items.AddEnum(typeof(HStation.Xhs.eSchemeType), false);
            //this.imgCmbSchemeType.EditValue = eSchemeType.Common;
            //this.imgCmbSchemeType.Properties.EndUpdate();
        }
        //初始化标签
        private async Task InitialFlags()
@@ -161,14 +165,14 @@
        #region Bimface
        //bimface控件
        private XhsProjectSimulationBimfaceCtrl _bimfaceCtrl = null;
        private SimulationBimfaceCtrl _bimfaceCtrl = null;
        //获取 bimface 控件
        private async Task<XhsProjectSimulationBimfaceCtrl> GetBimfaceCtrl()
        private async Task<SimulationBimfaceCtrl> GetBimfaceCtrl()
        {
            if (_bimfaceCtrl == null)
            {
                _bimfaceCtrl = new XhsProjectSimulationBimfaceCtrl();
                _bimfaceCtrl = new SimulationBimfaceCtrl();
                _bimfaceCtrl.Dock = DockStyle.Fill;
                await _bimfaceCtrl.InitialData(_project, _project_site);
                _bimfaceCtrl.LoadCompletedEvent += () =>
@@ -277,7 +281,7 @@
                xhs_scheme.SiteID = _project_site.ID;
                xhs_scheme.NO = this.txtNo.Text.Trim();
                xhs_scheme.Name = this.txtName.Text.Trim();
                xhs_scheme.SchemeType = eSchemeType.Common;
                //xhs_scheme.SchemeType = eSchemeType.Common;
                xhs_scheme.Paras = null;
                xhs_scheme.Flags = null;
                xhs_scheme.UseStatus = Yw.Model.eUseStatus.Enable;
@@ -307,6 +311,9 @@
                    XtraMessageBox.Show("模型依赖创建失败!");
                    return;
                }
                var scheme = await BLLFactory<HStation.BLL.XhsScheme>.Instance.GetByID(xhs_scheme_id);
                this.ReloadDataEvent?.Invoke(scheme);
            }
            TipFormHelper.Show(eTipStatus.Succeed, "创建成功!");