diff --git a/Rs.DeweyTester/Commom/GlobalVar.cs b/Rs.DeweyTester/Commom/GlobalVar.cs
index 3c5e80a..9a21088 100644
--- a/Rs.DeweyTester/Commom/GlobalVar.cs
+++ b/Rs.DeweyTester/Commom/GlobalVar.cs
@@ -17,6 +17,31 @@ namespace Rs.Framework
{
#region newpro
+ ///
+ /// REL Category
+ ///
+ [ParameterInit("string", "", "system", " REL Category")]
+ public static string RelCategory
+ {
+ get
+ {
+ return SysConfigParam.GetValue(nameof(RelCategory));
+ }
+ }
+
+
+ ///
+ /// REL CP
+ ///
+ [ParameterInit("string", "", "system", " REL CP")]
+ public static string RelCp
+ {
+ get
+ {
+ return SysConfigParam.GetValue(nameof(RelCp));
+ }
+ }
+
///
/// 允许OK料仓盖盖子前拍照
///
diff --git a/Rs.DeweyTester/Commom/Ops.cs b/Rs.DeweyTester/Commom/Ops.cs
index 8e26ce6..073ce02 100644
--- a/Rs.DeweyTester/Commom/Ops.cs
+++ b/Rs.DeweyTester/Commom/Ops.cs
@@ -129,9 +129,10 @@ namespace Rs.MotionPlat.Commom
public static void Start()
{
+ Ops.Off("照明灯");
//先检测门禁
//if(IoManager.Instance.ReadIn("后安全门禁")==0 && !GlobalVar.DisableDoor)
- if(SafeDoorCheck.Check())
+ if (SafeDoorCheck.Check())
{
bool run = true;
if (run)
diff --git a/Rs.DeweyTester/Entitys/TestFixtureManager.cs b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
index 9ccb898..538ac0c 100644
--- a/Rs.DeweyTester/Entitys/TestFixtureManager.cs
+++ b/Rs.DeweyTester/Entitys/TestFixtureManager.cs
@@ -456,7 +456,7 @@ namespace Rs.MotionPlat.Entitys
{
//StartTest#SN#Machine#User#Config#Lot#Mode#SiteID#ProjectID#RetryMode#Mes#Mtcp#configD#DualMode#TakeIndex#SubLotName$
//msg = $"StartTest#{Product.SN}#MS001#OP#DXD#GRR_GRR_DXD_202203120320#Production#LF1#MOS#T1#0#0#Paint#0#R1C5#SP0012#1$";
- msg = $"StartTest#{Product.SN}#{GlobalVar.MachineID}#op#{GlobalVar.ConfigName}#{GlobalVar.LotName}#{GlobalVar.TestMode}#{GlobalVar.SiteID}#{GlobalVar.ProjectID}#T1#0#{mtcp}#{GlobalVar.Config}#0#{Product.From}#{GlobalVar.SubLotName}#{noise}#{isFirstFixture}$";
+ msg = $"StartTest#{Product.SN}#{GlobalVar.MachineID}#op#{GlobalVar.ConfigName}#{GlobalVar.LotName}#{GlobalVar.TestMode}#{GlobalVar.SiteID}#{GlobalVar.ProjectID}#T1#0#{mtcp}#{GlobalVar.Config}#0#{Product.From}#{GlobalVar.SubLotName}#{noise}#{isFirstFixture}#{GlobalVar.RelCategory}#{GlobalVar.RelCp}$";
}
else
{
diff --git a/Rs.DeweyTester/FormMain.cs b/Rs.DeweyTester/FormMain.cs
index f64aef0..e752b02 100644
--- a/Rs.DeweyTester/FormMain.cs
+++ b/Rs.DeweyTester/FormMain.cs
@@ -325,6 +325,7 @@ namespace Rs.MotionPlat
private void btnSpaceRun_BtnClick(object sender, EventArgs e)
{
+
//SpaceTest.Instance.Start();
if (MachineManage.Instance.MachineStatus== EMachineStatus.Homed || MachineManage.Instance.MachineStatus == EMachineStatus.Stop)
{
diff --git a/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs b/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs
index 3abb7e8..2354fd6 100644
--- a/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs
+++ b/Rs.DeweyTester/SysConfig/CommonConfig.Designer.cs
@@ -254,6 +254,7 @@
this.btnSaveRelCategory.ForeColor = System.Drawing.Color.White;
this.btnSaveRelCategory.Name = "btnSaveRelCategory";
this.btnSaveRelCategory.UseVisualStyleBackColor = false;
+ this.btnSaveRelCategory.Click += new System.EventHandler(this.btnSaveRelCategory_Click);
//
// txtSiteID
//
@@ -264,19 +265,17 @@
// comBoxCp
//
resources.ApplyResources(this.comBoxCp, "comBoxCp");
- this.comBoxCp.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comBoxCp.FormattingEnabled = true;
this.comBoxCp.Items.AddRange(new object[] {
resources.GetString("comBoxCp.Items"),
resources.GetString("comBoxCp.Items1"),
resources.GetString("comBoxCp.Items2")});
this.comBoxCp.Name = "comBoxCp";
- this.comBoxCp.SelectedIndexChanged += new System.EventHandler(this.cboxConfigName_SelectedIndexChanged);
+ this.comBoxCp.SelectedIndexChanged += new System.EventHandler(this.comBoxCp_SelectedIndexChanged);
//
// comBoxRelCategory
//
resources.ApplyResources(this.comBoxRelCategory, "comBoxRelCategory");
- this.comBoxRelCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comBoxRelCategory.FormattingEnabled = true;
this.comBoxRelCategory.Items.AddRange(new object[] {
resources.GetString("comBoxRelCategory.Items"),
diff --git a/Rs.DeweyTester/SysConfig/CommonConfig.cs b/Rs.DeweyTester/SysConfig/CommonConfig.cs
index 1eecddd..5d1478a 100644
--- a/Rs.DeweyTester/SysConfig/CommonConfig.cs
+++ b/Rs.DeweyTester/SysConfig/CommonConfig.cs
@@ -113,6 +113,8 @@ namespace Rs.MotionPlat.SysConfig
comBoxRelCategory.Items.Clear();
var list = relCategorieList.GroupBy(rc => rc.Category).Select(a=>a.Key).ToList();
comBoxRelCategory.DataSource = list;
+
+ comBoxRelCategory.SelectedItem = GlobalVar.RelCategory;
}
private void BindMenu()
@@ -341,8 +343,30 @@ namespace Rs.MotionPlat.SysConfig
private void comBoxRelCategory_SelectedIndexChanged(object sender, EventArgs e)
{
+
string selectValue=comBoxRelCategory.SelectedItem.ToString();
- comBoxCp.DataSource = relCategorieList.Where(r => r.Category == selectValue).Select(a => a.CP).ToList();
+ List cpList= relCategorieList.Where(r => r.Category == selectValue).Select(a => a.CP).ToList();
+ comBoxCp.DataSource = cpList;
+ if(cpList.Contains(GlobalVar.RelCp))
+ {
+ comBoxCp.SelectedItem = GlobalVar.RelCp;
+ }
+ else
+ {
+ comBoxCp.SelectedIndex = 0;
+ }
+ }
+
+ private void comBoxCp_SelectedIndexChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void btnSaveRelCategory_Click(object sender, EventArgs e)
+ {
+ SysConfigParam.Update("RelCategory", comBoxRelCategory.SelectedItem.ToString());
+ SysConfigParam.Update("RelCp", comBoxCp.SelectedItem.ToString());
+ Msg.ShowInfo("Save success!");
}
}
diff --git a/Rs.DeweyTester/SysConfig/CommonConfig.resx b/Rs.DeweyTester/SysConfig/CommonConfig.resx
index 637e1f2..6e9db21 100644
--- a/Rs.DeweyTester/SysConfig/CommonConfig.resx
+++ b/Rs.DeweyTester/SysConfig/CommonConfig.resx
@@ -460,10 +460,7 @@
7
- 保存
-
-
- False
+ Save
btnSaveRelCategory
@@ -522,9 +519,6 @@
15
-
- False
-
comBoxCp
@@ -558,9 +552,6 @@
15
-
- False
-
comBoxRelCategory
@@ -627,9 +618,6 @@
MiddleLeft
-
- False
-
label8
@@ -693,9 +681,6 @@
MiddleLeft
-
- False
-
label3