yangyin
2025-03-27 b0de14c2670b9ff0079dacfb4b7457b438368f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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);
        }
 
 
    }
}