tx
2025-04-22 e0b138b3e057de6f57021e6c8963868f5c5acc5a
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
using System;
using System.Windows.Forms;
using TProduct.Model;
 
namespace TProduct.WinFrmUI.TValve
{
    /// <summary>
    /// 性能测试
    /// </summary>
    public partial class FeatTestIngMainPage
    {
        private void IntialPartInfoCtrl()
        {
            if (_partInfoCtrl == null)
            {
                this._partInfoCtrl = new TProduct.WinFrmUI.TValve.PartInfoCtrl();
 
                this._partInfoCtrl.Appearance.BackColor = System.Drawing.SystemColors.Control;
                this._partInfoCtrl.Appearance.Options.UseBackColor = true;
                this._partInfoCtrl.Dock = System.Windows.Forms.DockStyle.Fill;
                this._partInfoCtrl.Location = new System.Drawing.Point(0, 0);
                this._partInfoCtrl.Name = "PartInfoCtrl";
 
                this._partInfoCtrl.Size = new System.Drawing.Size(967, 555);
                this._partInfoCtrl.TabIndex = 0;
 
                this.tabPagePartInfo.Controls.Add(this._partInfoCtrl);
            }
 
 
 
            this._partInfoCtrl.SetBindingData(
                this._currentValve,
                this._currentPart);
        }
 
        //TProduct.WinFrmUI.ModelBaseBrowser _model3dCtrl = null;
        private void InitialModel3d()
        {
            if (string.IsNullOrEmpty(_workBenchInfo.Model3dPath))
            {
                this.tabPage3D.PageVisible = false;
                return;
            }
            if (!TProduct.UserSetting.Setting.Disp.IsShowModel3d)
            {
                this.tabPage3D.PageVisible = false;
                return;
            }
 
            //if (_model3dCtrl == null)
            //{
            //    var fileDll = System.IO.Path.Combine(Environment.CurrentDirectory, "TProduct.WinFrmUI.Model3d.dll");
            //    if (!System.IO.File.Exists(fileDll))
            //        return;
            //    var assem_Model3d = System.Reflection.Assembly.LoadFile(fileDll);
 
 
            //    _model3dCtrl = (ModelBaseBrowser)assem_Model3d.CreateInstance("TProduct.WinFrmUI.Model3d.BimfaceWebBrowser");
            //    if (_model3dCtrl == null)
            //        return;
 
            //    _model3dCtrl.Dock = DockStyle.Fill;
            //    _model3dCtrl.Name = "PumpTestBimfaceViewCtrl";
            //    _model3dCtrl.Padding = new Padding(0);
            //    this.tabPage3D.PageVisible = false;
            //    _model3dCtrl.OnModelLoadSuceess += () =>
            //    {//要在初始化之前赋值
 
 
 
            //    };
            //    var url = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Model3d", _workBenchInfo.Model3dPath);
 
            //    if (System.IO.File.Exists(url))
            //    {
            //        if (_model3dCtrl.Initial(this._currentValve.Name, this._allMonitorPointList, url))
            //        {
            //            this.tabPage3D.PageVisible = true;
            //            this.tabPage3D.Controls.Add(_model3dCtrl);
            //        }
            //    }
            //    else
            //    {
            //        MessageBox.Show(string.Format("{0} 文件丢失!", url));
            //    }
 
            //}
        }
 
 
        private void barBtn测试台仪表_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var frm = TProduct.WinFrmUI.TestBench.InstrumentDialog.BuildDialog(this._workBenchInfo);
            frm.Show();
        }
 
        private void barBtn测试台测点_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            TProduct.WinFrmUI.TestBench.ListWorkBenchMonitorPointDlg frm = new TProduct.WinFrmUI.TestBench.ListWorkBenchMonitorPointDlg();
            frm.SetBindingData(this._workBenchInfo);
            frm.Show();
        }
 
 
        /// <summary>
        /// 测试日志
        /// </summary>
        private void InitialTestLogCtrl()
        {
            if (this._testItem == null)
                return;
            if (_testLogCtrl == null)
            {
                _testLogCtrl = new TBase.TestItemLogContentCtrl();
                _testLogCtrl.Name = "TestItemLogContentCtrl";
                _testLogCtrl.Dock = DockStyle.Fill;
                _testLogCtrl.OnSaveLog += (new_content) =>
                {
                    this._testItem.ItemLogContent = new_content;
                    new TProduct.BLL.TestProjectItem().UpdateLogContent(_testItem.ItemID, _testItem.ItemLogContent);
                };
                this.tabPageTestLog.Controls.Add(_testLogCtrl);
            }
            _testLogCtrl.SetBindingData(this._testItem.ItemLogContent);
        }
 
 
 
 
    }
}