using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Windows.Forms;
|
using System.IO;
|
|
namespace DPumpHydr.WinFrmUI.Volute
|
{
|
public partial class MainViewPage
|
{
|
//参数控件
|
ctrlHdrBaseInfo _ctrlHdrBaseInfo = null;
|
//参数
|
ViewModel.HdrBaseInfo _hdrBaseInfo = null;
|
ViewModel.GeomBaseInfo _geomBaseInfo = null;
|
|
|
|
/// <summary>
|
/// 保存第一步参数
|
/// </summary>
|
/// <returns></returns>
|
private bool SaveParaStep1()
|
{
|
ViewModel.HdrBaseInfo hdrBaseInfo = null;
|
ViewModel.GeomBaseInfo geomBaseInfo = null;
|
string error_info = _ctrlHdrBaseInfo.GetBindingData(out hdrBaseInfo, out geomBaseInfo);
|
if (error_info != null)
|
{
|
MessageBox.Show(error_info);
|
return false;
|
}
|
if (geomBaseInfo == null || hdrBaseInfo == null)
|
return false;
|
|
bool isClearAll = false;
|
if (_geomBaseInfo != null)
|
{
|
if (Math.Abs(geomBaseInfo.B3 - _geomBaseInfo.B3) > 1)
|
{
|
isClearAll = true;
|
}
|
if (Math.Abs(geomBaseInfo.D3 - _geomBaseInfo.D3) > 1)
|
{
|
isClearAll = true;
|
}
|
}
|
if (isClearAll)
|
{
|
this._occDesign2dCtrl.ClearAll();
|
this._occDesign3dCtrl.ClearAll();
|
}
|
|
_ctrlHdrBaseInfo.SaveHistoryParas(hdrBaseInfo, geomBaseInfo);
|
|
_hdrBaseInfo = hdrBaseInfo;
|
_hdrBaseInfo.CalcNs();
|
_geomBaseInfo = geomBaseInfo;
|
|
return true;
|
}
|
|
/// <summary>
|
/// 进入第一步
|
/// </summary>
|
private void EnterStep1(long last_step_id)
|
{
|
if (_ctrlHdrBaseInfo == null)
|
{
|
_ctrlHdrBaseInfo = new ctrlHdrBaseInfo();
|
_ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo";
|
_ctrlHdrBaseInfo.OnNextStep += () =>
|
{
|
GoNextStep();
|
};
|
}
|
|
DockStepParaCtrl(_ctrlHdrBaseInfo);
|
}
|
|
|
}
|
}
|