diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.Designer.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.Designer.cs
index 1ede7b3..e89bf19 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.Designer.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.Designer.cs
@@ -45,18 +45,16 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
//
// HighWeight
//
- this.HighWeight.Enabled = false;
this.HighWeight.Location = new System.Drawing.Point(98, 64);
- this.HighWeight.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+ this.HighWeight.Margin = new System.Windows.Forms.Padding(5);
this.HighWeight.Name = "HighWeight";
this.HighWeight.Size = new System.Drawing.Size(129, 21);
this.HighWeight.TabIndex = 57;
//
// LowWeight
//
- this.LowWeight.Enabled = false;
this.LowWeight.Location = new System.Drawing.Point(98, 33);
- this.LowWeight.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+ this.LowWeight.Margin = new System.Windows.Forms.Padding(5);
this.LowWeight.Name = "LowWeight";
this.LowWeight.Size = new System.Drawing.Size(129, 21);
this.LowWeight.TabIndex = 58;
@@ -65,7 +63,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(163, 117);
- this.btnCancel.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+ this.btnCancel.Margin = new System.Windows.Forms.Padding(5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(98, 45);
this.btnCancel.TabIndex = 56;
@@ -75,7 +73,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(14, 117);
- this.btnOK.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+ this.btnOK.Margin = new System.Windows.Forms.Padding(5);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(98, 45);
this.btnOK.TabIndex = 55;
@@ -136,7 +134,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
this.Name = "FrmWeight";
this.ResumeLayout(false);
this.PerformLayout();
-
}
private System.Windows.Forms.TextBox HighWeight;
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.cs
index 8db152a..2a078d1 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjWeight/FrmWeight.cs
@@ -1,5 +1,7 @@
using System;
+using System.Globalization;
using System.Windows.Forms;
+using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjWeight
{
@@ -18,13 +20,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
SetUpdateFromPlc();
LowWeight.MaxLength = 5;
HighWeight.MaxLength = 5;
+
}
private void SetUpdateFromPlc()
{
WeightSettingView view = WeightSettingPlc.UpFromPlc(_id);
- this.HighWeight.Text = view.HighWeight.ToString();
- this.LowWeight.Text = view.LowWeight.ToString();
+ this.HighWeight.Text = view.HighWeight.ToString(CultureInfo.InvariantCulture);
+ this.LowWeight.Text = view.LowWeight.ToString(CultureInfo.InvariantCulture);
}
private void btnCancel_Click(object sender, EventArgs e)
@@ -59,6 +62,10 @@ namespace Mesnac.Action.ChemicalWeighing.LjWeight
};
WeightSettingPlc.DownToPlc(new []{view});
+ //select Id,Name,ActWeight,HighLevel,HighWeight,LowLevel,LowWeight from WeightSetting
+ string sql =$"update WeightSetting set LowWeight={view.LowWeight},HighWeight={view.HighWeight} where Id={view.Id}";
+ DBHelp.ExecuteNonQuery(sql);
+ this.DialogResult = System.Windows.Forms.DialogResult.OK;
}
private void label1_Click(object sender, EventArgs e)
diff --git a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj
index d0ff891..5f0aff3 100644
--- a/Main/MCEdit/Data/MCProject/SCWSProject2.mprj
+++ b/Main/MCEdit/Data/MCProject/SCWSProject2.mprj
@@ -20,7 +20,6 @@
-
@@ -36,6 +35,7 @@
+
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/FormWeightSetting.xml b/Main/MCEdit/Data/MCProject/nodeForm/FormWeightSetting.xml
new file mode 100644
index 0000000..d50af5d
--- /dev/null
+++ b/Main/MCEdit/Data/MCProject/nodeForm/FormWeightSetting.xml
@@ -0,0 +1,224 @@
+
+