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()
@@ -112,7 +116,7 @@
            FastShowHidden(false);
            InitialSchemeType();
            await InitialFlags();
            await InitialFlags();
        }
        private void SetBindingData(List<SetSchemeParterRecord> set_record_list = null)
@@ -155,22 +159,22 @@
        }
        #endregion
        #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, () => _hydro_info);
                await _bimfaceCtrl.InitialData(_project, _project_site);
                _bimfaceCtrl.LoadCompletedEvent += () =>
                {
                    //view加载完成事件
@@ -206,7 +210,7 @@
        #endregion
        #region Menu
        #region FastShowHidden
        //一键显隐
@@ -215,7 +219,7 @@
            _show_hidden = !_show_hidden;
            FastShowHidden(_show_hidden);
        }
        private bool _show_hidden = false;
        private async void FastShowHidden(bool visible)
        {
@@ -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, "创建成功!");
@@ -340,6 +347,6 @@
        #endregion
    }
}