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;
|
}
|
}
|
|
|
}
|
}
|