| | |
| | | /// </summary> |
| | | public void ExportXmlFile() |
| | | { |
| | | //if (_hdrBaseInfo == null) |
| | | //{ |
| | | // MessageBox.Show("您还没有完成定义参数!请定义完成后在进行导出!(至少完成第三步)"); |
| | | // return; |
| | | //} |
| | | if (_hdrBaseInfo == null) |
| | | { |
| | | MessageBox.Show("您还没有完成定义参数!请定义完成后在进行导出!(至少完成第三步)"); |
| | | return; |
| | | var currentStepID = this._stepTreeDockPanel.CurrentStepID; |
| | | if (currentStepID == this._stepTreeDockPanel.Step_ID_Hdr_Base_Info) |
| | | { |
| | | if (!SaveParaStep1()) |
| | | { |
| | | MessageBox.Show("您还没有完成定义参数!请该界面全部输入完成后在进行导出!"); |
| | | return; |
| | | } |
| | | if (_sectionBundleInfo == null) |
| | | { |
| | | _sectionBundleInfo = new ViewModel.SectionBundleInfo(); |
| | | |
| | | _sectionBundleInfo.BaseWidth = _geomBaseInfo.B3; |
| | | _sectionBundleInfo.BaseCircleRadius = _geomBaseInfo.D3 / 2; |
| | | |
| | | _sectionBundleInfo.ResetAllParas(_hdrBaseInfo, _geomBaseInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | SaveFileDialog dlg = new SaveFileDialog(); |
| | | dlg.Title = "导出蜗壳信息"; |
| | | dlg.FileName = "蜗壳信息.xml"; |
| | |
| | | dlg.FileName, |
| | | _hdrBaseInfo, |
| | | _geomBaseInfo, |
| | | _sectionBundleInfo, |
| | | _outflowType, |
| | | _sectionBundleInfo, |
| | | _outflowParas, |
| | | this._bodyThickness); |
| | | } |
| | |
| | | dlg.FileName, |
| | | out _hdrBaseInfo, |
| | | out _geomBaseInfo, |
| | | out _sectionBundleInfo, |
| | | out _outflowType, |
| | | out _sectionBundleInfo, |
| | | out _outflowParas, |
| | | out this._bodyThickness); |
| | | if(ret) |
| | |
| | | |
| | | |
| | | #region 出水面类型选择 |
| | | if (_outflowType != ViewModel.eOutflowStyle.未知) |
| | | { |
| | | if (_ctrlSetOutflowType == null) |
| | | { |
| | | _ctrlSetOutflowType = new ctrlSetOutflowType(); |
| | | _ctrlSetOutflowType.Name = "ctrlSetOutflowDim"; |
| | | } |
| | | this._ctrlSetOutflowType.SetBindingData(_outflowType); |
| | | } |
| | | //if (_outflowType != ViewModel.eOutflowStyle.未知) |
| | | //{ |
| | | // if (_ctrlSetOutflowType == null) |
| | | // { |
| | | // _ctrlSetOutflowType = new ctrlSetOutflowType(); |
| | | // _ctrlSetOutflowType.Name = "ctrlSetOutflowDim"; |
| | | // } |
| | | // this._ctrlSetOutflowType.SetBindingData(_outflowType); |
| | | //} |
| | | #endregion |
| | | |
| | | #region 出水面参数 |
| | |
| | | _ctrlSetOutflowParas.Name = "ctrlSetOutflowStyle"; |
| | | _ctrlSetOutflowParas.OnRefreshShape2D += RefreshWaterBody2D; |
| | | _ctrlSetOutflowParas.OnRefreshShape3D += RefreshWaterBody3D; |
| | | _ctrlSetOutflowParas.InitialParas(_outflowType, _hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo); |
| | | _ctrlSetOutflowParas.InitialParas( _hdrBaseInfo, _geomBaseInfo, _sectionBundleInfo); |
| | | } |
| | | //CreateWaterBody2D(_outflowParas); |
| | | RefreshWaterBody3D(_outflowParas); |
| | | |
| | | |
| | | _ctrlSetOutflowParas.SetBindingData(_outflowType,_outflowParas); |
| | | _ctrlSetOutflowParas.SetBindingData( _outflowParas); |
| | | |
| | | #region 加厚 |
| | | if (_bodyThickness>0) |
| | |
| | | dlg.FileName.Replace(".stp", ".xml"), |
| | | _hdrBaseInfo, |
| | | _geomBaseInfo, |
| | | _sectionBundleInfo, |
| | | _outflowType, |
| | | _sectionBundleInfo, |
| | | _outflowParas, |
| | | this._bodyThickness); |
| | | } |
| | |
| | | dlg.FileName.Replace(".stp", ".igs"), |
| | | _hdrBaseInfo, |
| | | _geomBaseInfo, |
| | | _sectionBundleInfo, |
| | | _outflowType, |
| | | _sectionBundleInfo, |
| | | _outflowParas, |
| | | this._bodyThickness); |
| | | } |