tx
2025-04-10 2538101febc78f525945da72c7cdcb2589f9e6ea
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
using DevExpress.XtraEditors;
using System;
using System.Windows.Forms;
 
namespace TProduct.WinFrmUI.TValve
{
    public partial class FeatTestIngMainDialog : XtraForm
    {
        public FeatTestIngMainDialog()
        {
            InitializeComponent();
 
            featTestIngMainPage1.OnChangeProductInfo += (product) =>
            {
                //if (OnChangeProductInfo != null)
                //{
                //    OnChangeProductInfo(pump, motor);
                //}
            };
 
            featTestIngMainPage1.OnChangeTestInfo += (item) =>
            {
                //if (OnChangeTestInfo != null)
                //{
                //    OnChangeTestInfo(item);
                //}
            };
 
            featTestIngMainPage1.OnCloseAndView += () =>
            {
                featTestIngMainPage1.CheckTestEndTime();
 
                if (!featTestIngMainPage1.IsCloseFrmAble())
                {
                    return;
                }
 
                this.DialogResult = DialogResult.Yes;//用YES ,外部会启动查看界面
                this.Close();
            };
        }
 
        private void FeatTestIngMainDialog_Load(object sender, EventArgs e)
        {
 
        }
        public void SetBindingData(
            TProduct.Model.ProductMainExValve valve,
            TProduct.Model.PartBase part,
            TProduct.Model.TestProjectItemView project,
            TProduct.Model.WorkBenchBase workBench)
        {
            if (project == null)
            {
                return;
            }
 
            featTestIngMainPage1.SetBindingData(
                valve, part,
                project,
                workBench);
            this.Text = "阀测试:" + valve.Name;
            // TProduct.WinFrmUI.GlobeParas.MainForm.CreatePage(ctrl, new SurfaceGuid() {
            // DockType = eDockType.Tab, Modular = eModular.PumpTestDetail,
            // Function = "PumpTestDetail",
            // Tag = "PumpTestDetail" });
        }
        private void FeatTestIngMainDialog_FormClosing(object sender, FormClosingEventArgs e)
        {
            featTestIngMainPage1.CheckTestEndTime();
            if (!featTestIngMainPage1.IsCloseFrmAble())
            {
                e.Cancel = true;
                return;
            }
        }
 
        public int GetTestRecordCount()
        {
            return featTestIngMainPage1.GetTestRecordCount();
        }
        public bool IsConnetctCommPort
        {
            get
            {
                return featTestIngMainPage1.IsConnetctCommPort;
            }
        }
        public bool IsModifyTestRecord
        {
            get
            {
                return featTestIngMainPage1.IsModifyTestRecord;
            }
        }
 
 
    }
}