add - 干混机糊化机整合 干混机功能添加

wangsr
wangsr 1 year ago
parent 4ef5cc7372
commit 051c41da3d

@ -16,24 +16,31 @@ using Mesnac.Action.ChemicalWeighing.LjPlanning;
using System.Diagnostics.SymbolStore;
using Mesnac.Basic;
using Mesnac.Action.ChemicalWeighing.FreeDb;
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity;
using Mesnac.Controls.ChemicalWeighing;
using IAction = Mesnac.Action.Base.IAction;
using Mesnac.Core.Service;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
internal class GelerWeterControl : ChemicalWeighingAction, IAction
internal class AutoControl : ChemicalWeighingAction, IAction
{
private List<Control> McControls;
RuntimeParameter _runtime;
GelerWeterControlsEntity ControlsEntity = new GelerWeterControlsEntity();
MCTextBoxEntity TextE = new MCTextBoxEntity();
ButtonEntity ButtonE = new ButtonEntity();
MCLabelEntity LabelE = new MCLabelEntity();
MCComboBoxEntity ComboE = new MCComboBoxEntity();
MCRadioButtonEntity RadioE = new MCRadioButtonEntity();
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须要调用
this._runtime = runtime;
McControls = GetAllControls();
ControlImport();
ControlsHelper.ControlImport(TextE, ButtonE, ComboE, LabelE, RadioE, McControls);
try
{
@ -51,35 +58,37 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
#region 自动参数下传
if (ControlsEntity.Download == runtime.Sender)
#region 湿混机糊化机参数下传
if (ButtonE.Download == runtime.Sender)
{
if (MessageBox.Show("确认下传数据?", "下传确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
int b1 = Convert.ToInt32(ControlsEntity.ChooseMaterial1.MCValue.ToString());
int b2 = Convert.ToInt32(ControlsEntity.ChooseMaterial2.MCValue.ToString());
int b1 = Convert.ToInt32(ComboE.ChooseMaterial1.MCValue.ToString());
int b2 = Convert.ToInt32(ComboE.ChooseMaterial2.MCValue.ToString());
short bin1 = (short)StockMaterrialDbHelp.GetCodeById(b1);
short bin2 = (short)StockMaterrialDbHelp.GetCodeById(b2);
float MatTol1 = Convert.ToSingle(ControlsEntity.MaterialTolerance1.MCValue.ToString());
float MatTol2 = Convert.ToSingle(ControlsEntity.MaterialTolerance2.MCValue.ToString());
float MatTol1 = Convert.ToSingle(TextE.MaterialTolerance1.MCValue.ToString());
float MatTol2 = Convert.ToSingle(TextE.MaterialTolerance2.MCValue.ToString());
float MatWei1 = Convert.ToSingle(ControlsEntity.MaterialWeight1.MCValue.ToString());
float MatWei2 = Convert.ToSingle(ControlsEntity.MaterialWeight2.MCValue.ToString());
float MatWei1 = Convert.ToSingle(TextE.MaterialWeight1.MCValue.ToString());
float MatWei2 = Convert.ToSingle(TextE.MaterialWeight2.MCValue.ToString());
float GelSpeed = Convert.ToSingle(ControlsEntity.GelSpeedSet.MCValue.ToString());
float GelSpeed = Convert.ToSingle(TextE.GelSpeedSet.MCValue.ToString());
float GelPosA = Convert.ToSingle(ControlsEntity.GelPosTimeA.MCValue.ToString());
float GelNagB = Convert.ToSingle(ControlsEntity.GelNagTimeB.MCValue.ToString());
short GelPosC = Convert.ToInt16(ControlsEntity.GelPosTimeC.MCValue.ToString());
float GelPosA = Convert.ToSingle(TextE.GelPosTimeA.MCValue.ToString());
float GelNagB = Convert.ToSingle(TextE.GelNagTimeB.MCValue.ToString());
short GelPosC = Convert.ToInt16(TextE.GelPosTimeC.MCValue.ToString());
short GelWater = Convert.ToInt16(ControlsEntity.GelWaterTime.MCValue.ToString());
short GelWait = Convert.ToInt16(ControlsEntity.GelWaitTime.MCValue.ToString());
short GelCloseHeat = Convert.ToInt16(ControlsEntity.GelCloseHeatTime.MCValue.ToString());
float GelDelayTime = Convert.ToSingle(ControlsEntity.GelOutDelayTime.MCValue.ToString());
short GelWater = Convert.ToInt16(TextE.GelWaterTime.MCValue.ToString());
short GelWait = Convert.ToInt16(TextE.GelWaitTime.MCValue.ToString());
short GelCloseHeat = Convert.ToInt16(TextE.GelCloseHeatTime.MCValue.ToString());
float GelDelayTime = Convert.ToSingle(TextE.GelOutDelayTime.MCValue.ToString());
if (b2 == -1)
{
@ -168,9 +177,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
steps.Add(step7);
steps.Add(step8);
float WetDryWei = Convert.ToSingle(ControlsEntity.WetDryWeight.MCValue.ToString());
short WetMix = Convert.ToInt16(ControlsEntity.WetMixTime.MCValue.ToString());
short WetOutDelay = Convert.ToInt16(ControlsEntity.WetOutDelayTime.MCValue.ToString());
float WetDryWei = Convert.ToSingle(TextE.WetDryWeight.MCValue.ToString());
short WetMix = Convert.ToInt16(TextE.WetMixTime.MCValue.ToString());
short WetOutDelay = Convert.ToInt16(TextE.WetOutDelayTime.MCValue.ToString());
List<MixStep> mixSteps = new List<MixStep>();
@ -303,9 +312,337 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
#endregion
#region 水称参数下传
if (ButtonE.WaterDownload == runtime.Sender)
{
if (MessageBox.Show("确认下发水称数据?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
WaterEntity HotA = new WaterEntity();
WaterEntity ColdA = new WaterEntity();
WaterEntity HotB = new WaterEntity();
WaterEntity ColdB = new WaterEntity();
float hotASet, hotBSet, coldASet, coldBSet, hotATol, hotBTol, coldATol, coldBTol;
if (float.TryParse(Convert.ToString(TextE.HotValueA.MCValue), out hotASet) &&
float.TryParse(Convert.ToString(TextE.HotToleranceA.MCValue), out hotATol) &&
float.TryParse(Convert.ToString(TextE.HotValueB.MCValue), out hotBSet) &&
float.TryParse(Convert.ToString(TextE.HotToleranceB.MCValue), out hotBTol) &&
float.TryParse(Convert.ToString(TextE.ColdValueA.MCValue), out coldASet) &&
float.TryParse(Convert.ToString(TextE.ColdToleranceA.MCValue), out coldATol) &&
float.TryParse(Convert.ToString(TextE.ColdValueB.MCValue), out coldBSet) &&
float.TryParse(Convert.ToString(TextE.ColdToleranceB.MCValue), out coldBTol))
{
HotA.Set = hotASet;
HotB.Set = hotBSet;
ColdA.Set = coldASet;
ColdB.Set = coldBSet;
HotA.Tolerance = hotATol;
HotB.Tolerance = hotBTol;
ColdA.Tolerance = coldATol;
ColdB.Tolerance = coldBTol;
Db2104WriteHelper.WriteAHostWater(HotA);
Db2104WriteHelper.WriteBHostWater(HotB);
Db2104WriteHelper.WriteAColWater(ColdA);
Db2104WriteHelper.WriteBColWater(ColdB);
MesnacServiceManager.Instance.LoggingService.Info("水称数据下发成功!");
MessageBox.Show("水称数据下发成功");
}
else
{
MesnacServiceManager.Instance.LoggingService.Info("输入数值的格式有误");
MessageBox.Show("输入数值的格式有误!");
return;
}
}
#endregion
#region 干混机参数下传
if(ButtonE.DryDownload == runtime.Sender)
{
if (MessageBox.Show("确认下传干混机数据?", "下传确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
int b1 = Convert.ToInt32(ComboE.DryM1.MCValue.ToString());
int b2 = Convert.ToInt32(ComboE.DryM2.MCValue.ToString());
int b3 = Convert.ToInt32(ComboE.DryM3.MCValue.ToString());
int b4 = Convert.ToInt32(ComboE.DryM4.MCValue.ToString());
int b5 = Convert.ToInt32(ComboE.DryM5.MCValue.ToString());
int b6 = Convert.ToInt32(ComboE.DryM6.MCValue.ToString());
int b7 = Convert.ToInt32(ComboE.DryM7.MCValue.ToString());
int b8 = Convert.ToInt32(ComboE.DryM8.MCValue.ToString());
int b9 = Convert.ToInt32(ComboE.DryM9.MCValue.ToString());
int b10 = Convert.ToInt32(ComboE.DryM10.MCValue.ToString());
int b11 = Convert.ToInt32(ComboE.DryM11.MCValue.ToString());
int b12 = Convert.ToInt32(ComboE.DryM12.MCValue.ToString());
short bin1 = (short)StockMaterrialDbHelp.GetCodeById(b1);
short bin2 = (short)StockMaterrialDbHelp.GetCodeById(b2);
short bin3 = (short)StockMaterrialDbHelp.GetCodeById(b3);
short bin4 = (short)StockMaterrialDbHelp.GetCodeById(b4);
short bin5 = (short)StockMaterrialDbHelp.GetCodeById(b5);
short bin6 = (short)StockMaterrialDbHelp.GetCodeById(b6);
short bin7 = (short)StockMaterrialDbHelp.GetCodeById(b7);
short bin8 = (short)StockMaterrialDbHelp.GetCodeById(b8);
short bin9 = (short)StockMaterrialDbHelp.GetCodeById(b9);
short bin10 = (short)StockMaterrialDbHelp.GetCodeById(b10);
short bin11 = (short)StockMaterrialDbHelp.GetCodeById(b11);
short bin12 = (short)StockMaterrialDbHelp.GetCodeById(b12);
int w1 = Convert.ToInt32(TextE.DryW1.MCValue.ToString());
int w2 = Convert.ToInt32(TextE.DryW2.MCValue.ToString());
int w3 = Convert.ToInt32(TextE.DryW3.MCValue.ToString());
int w4 = Convert.ToInt32(TextE.DryW4.MCValue.ToString());
int w5 = Convert.ToInt32(TextE.DryW5.MCValue.ToString());
int w6 = Convert.ToInt32(TextE.DryW6.MCValue.ToString());
int w7 = Convert.ToInt32(TextE.DryW7.MCValue.ToString());
int w8 = Convert.ToInt32(TextE.DryW8.MCValue.ToString());
int w9 = Convert.ToInt32(TextE.DryW9.MCValue.ToString());
int w10 = Convert.ToInt32(TextE.DryW10.MCValue.ToString());
int w11 = Convert.ToInt32(TextE.DryW11.MCValue.ToString());
int w12 = Convert.ToInt32(TextE.DryW12.MCValue.ToString());
int t1 = Convert.ToInt32(TextE.DryT1.MCValue.ToString());
int t2 = Convert.ToInt32(TextE.DryT2.MCValue.ToString());
int t3 = Convert.ToInt32(TextE.DryT3.MCValue.ToString());
int t4 = Convert.ToInt32(TextE.DryT4.MCValue.ToString());
int t5 = Convert.ToInt32(TextE.DryT5.MCValue.ToString());
int t6 = Convert.ToInt32(TextE.DryT6.MCValue.ToString());
int t7 = Convert.ToInt32(TextE.DryT7.MCValue.ToString());
int t8 = Convert.ToInt32(TextE.DryT8.MCValue.ToString());
int t9 = Convert.ToInt32(TextE.DryT9.MCValue.ToString());
int t10 = Convert.ToInt32(TextE.DryT10.MCValue.ToString());
int t11 = Convert.ToInt32(TextE.DryT11.MCValue.ToString());
int t12 = Convert.ToInt32(TextE.DryT12.MCValue.ToString());
List<RecipePlcView> recipes = new List<RecipePlcView>();
RecipePlcView recipe1 = new RecipePlcView()
{
Bin = bin1,
Set = w1,
Tolerance = t1,
};
RecipePlcView recipe2 = new RecipePlcView()
{
Bin = bin2,
Set = w2,
Tolerance = t2,
};
RecipePlcView recipe3 = new RecipePlcView()
{
Bin = bin3,
Set = w3,
Tolerance = t3,
};
RecipePlcView recipe4 = new RecipePlcView()
{
Bin = bin4,
Set = w4,
Tolerance = t4,
};
RecipePlcView recipe5 = new RecipePlcView()
{
Bin = bin5,
Set = w5,
Tolerance = t5,
};
RecipePlcView recipe6 = new RecipePlcView()
{
Bin = bin6,
Set = w6,
Tolerance = t6,
};
RecipePlcView recipe7 = new RecipePlcView()
{
Bin = bin7,
Set = w7,
Tolerance = t7,
};
RecipePlcView recipe8 = new RecipePlcView()
{
Bin = bin8,
Set = w8,
Tolerance = t8,
};
RecipePlcView recipe9 = new RecipePlcView()
{
Bin = bin9,
Set = w9,
Tolerance = t9,
};
RecipePlcView recipe10 = new RecipePlcView()
{
Bin = bin10,
Set = w10,
Tolerance = t10,
};
RecipePlcView recipe11 = new RecipePlcView()
{
Bin = bin11,
Set = w11,
Tolerance = t11,
};
RecipePlcView recipe12 = new RecipePlcView()
{
Bin = bin12,
Set = w12,
Tolerance = t12,
};
recipes.Add(recipe1);
recipes.Add(recipe2);
recipes.Add(recipe3);
recipes.Add(recipe4);
recipes.Add(recipe5);
recipes.Add(recipe6);
recipes.Add(recipe7);
recipes.Add(recipe8);
recipes.Add(recipe9);
recipes.Add(recipe10);
recipes.Add(recipe11);
recipes.Add(recipe12);
List<Step> steps = new List<Step>();
List<DeviceMaterrial> materials = new List<DeviceMaterrial>();
DeviceMaterrial deviceMaterial1 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b1,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b1)
};
DeviceMaterrial deviceMaterial2 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b2,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b2)
};
DeviceMaterrial deviceMaterial3 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b3,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b3)
};
DeviceMaterrial deviceMaterial4 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b4,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b4)
};
DeviceMaterrial deviceMaterial5 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b5,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b5)
};
DeviceMaterrial deviceMaterial6 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b6,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b6)
};
DeviceMaterrial deviceMaterial7 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b7,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b7)
};
DeviceMaterrial deviceMaterial8 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b8,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b8)
};
DeviceMaterrial deviceMaterial9 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b9,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b9)
};
DeviceMaterrial deviceMaterial10 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b10,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b10)
};
DeviceMaterrial deviceMaterial11 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b11,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b11)
};
DeviceMaterrial deviceMaterial12 = new DeviceMaterrial()
{
DeviceId = DrySelect(),
MaterrialId = b12,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b12)
};
materials.Add(deviceMaterial1);
materials.Add(deviceMaterial2);
materials.Add(deviceMaterial3);
materials.Add(deviceMaterial4);
materials.Add(deviceMaterial5);
materials.Add(deviceMaterial6);
materials.Add(deviceMaterial7);
materials.Add(deviceMaterial8);
materials.Add(deviceMaterial9);
materials.Add(deviceMaterial10);
materials.Add(deviceMaterial11);
materials.Add(deviceMaterial12);
switch (DrySelect())
{
case 1:
LjPlanningPlcHelp.DownD1Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
break;
case 2:
LjPlanningPlcHelp.DownD2Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
break;
case 3:
LjPlanningPlcHelp.DownD3Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
break;
case 4:
LjPlanningPlcHelp.DownD4Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
break;
}
MessageBox.Show("数据下传成功!");
}
#endregion
#endregion
#region 手动控制
if (ControlsEntity.GelManualPowder == runtime.Sender)
if (ButtonE.GelManualPowder == runtime.Sender)
{
if (MessageBox.Show("确认手动下粉料?", "下粉确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -366,7 +703,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
if (ControlsEntity.GelManualColdWater == runtime.Sender)
if (ButtonE.GelManualColdWater == runtime.Sender)
{
if (MessageBox.Show("确认下冷水?", "下水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -427,7 +764,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
if (ControlsEntity.GelManualHotWater == runtime.Sender)
if (ButtonE.GelManualHotWater == runtime.Sender)
{
if (MessageBox.Show("确认下热水?", "下水确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -488,7 +825,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
if (ControlsEntity.WetManualGel == runtime.Sender)
if (ButtonE.WetManualGel == runtime.Sender)
{
if (MessageBox.Show("确认下糊化料?", "下糊化料确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -549,15 +886,15 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
if (ControlsEntity.WetManualControl == runtime.Sender)
if (ButtonE.WetManualControl == runtime.Sender)
{
if (MessageBox.Show("确认下传数据?", "下传确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
float t = Convert.ToSingle(ControlsEntity.ManualTolerance.MCValue.ToString());
float w = Convert.ToSingle(ControlsEntity.ManualWeight.MCValue.ToString());
float t = Convert.ToSingle(TextE.ManualTolerance.MCValue.ToString());
float w = Convert.ToSingle(TextE.ManualWeight.MCValue.ToString());
if (t < 0.1)
{
MessageBox.Show("公差不能小于0.1");
@ -630,7 +967,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
#region 自动启停
if (ControlsEntity.LineStart == runtime.Sender)
if (ButtonE.LineStart == runtime.Sender)
{
if (MessageBox.Show("确认启动生产?", "启动确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -682,7 +1019,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
if (ControlsEntity.LineStop == runtime.Sender)
if (ButtonE.LineStop == runtime.Sender)
{
switch (SingleSelect())
{
@ -733,18 +1070,18 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
#region 维修模式
if(ControlsEntity.RepairMode == runtime.Sender)
if(ButtonE.RepairMode == runtime.Sender)
{
if (ControlsEntity.RepairState.MCValue.ToString() == "关")
if (LabelE.RepairState.MCValue.ToString() == "关")
{
if (MessageBox.Show("是否开启维修模式?", "维修模式确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
Db3000Helper.WriteModel(SingleSelect(), true);
ControlsEntity.RepairState.MCValue = "开";
LabelE.RepairState.MCValue = "开";
Auto_Log log = new Auto_Log()
{
@ -761,14 +1098,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
else
{
if (ControlsEntity.RepairState.MCValue.ToString() == "开")
if (LabelE.RepairState.MCValue.ToString() == "开")
{
if (MessageBox.Show("是否关闭维修模式?", "维修模式确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
Db3000Helper.WriteModel(SingleSelect(), false);
ControlsEntity.RepairState.MCValue = "关";
LabelE.RepairState.MCValue = "关";
Auto_Log log = new Auto_Log()
{
@ -800,35 +1137,35 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
/// <returns>返回单选的产线号 如果未选择返回0</returns>
private int SingleSelect()
{
if (Convert.ToBoolean(ControlsEntity.Line1.MCValue) == true)
if (Convert.ToBoolean(RadioE.Line1.MCValue) == true)
{
return 1;
}
else if (Convert.ToBoolean(ControlsEntity.Line2.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line2.MCValue) == true)
{
return 2;
}
else if (Convert.ToBoolean(ControlsEntity.Line3.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line3.MCValue) == true)
{
return 3;
}
else if (Convert.ToBoolean(ControlsEntity.Line4.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line4.MCValue) == true)
{
return 4;
}
else if (Convert.ToBoolean(ControlsEntity.Line5.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line5.MCValue) == true)
{
return 5;
}
else if (Convert.ToBoolean(ControlsEntity.Line6.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line6.MCValue) == true)
{
return 6;
}
else if (Convert.ToBoolean(ControlsEntity.Line7.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line7.MCValue) == true)
{
return 7;
}
else if (Convert.ToBoolean(ControlsEntity.Line8.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line8.MCValue) == true)
{
return 8;
}
@ -839,73 +1176,33 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
/// <summary>
/// 控件导入
/// 单混机单选选择
/// </summary>
private void ControlImport()
{
ControlsEntity.Line1 = GetMCRadioButtonControl("Line1");
ControlsEntity.Line2 = GetMCRadioButtonControl("Line2");
ControlsEntity.Line3 = GetMCRadioButtonControl("Line3");
ControlsEntity.Line4 = GetMCRadioButtonControl("Line4");
ControlsEntity.Line5 = GetMCRadioButtonControl("Line5");
ControlsEntity.Line6 = GetMCRadioButtonControl("Line6");
ControlsEntity.Line7 = GetMCRadioButtonControl("Line7");
ControlsEntity.Line8 = GetMCRadioButtonControl("Line8");
ControlsEntity.ChooseMaterial1 = GetComboBoxControl("ChooseMaterial1");
ControlsEntity.ChooseMaterial2 = GetComboBoxControl("ChooseMaterial2");
ControlsEntity.MaterialWeight1 = GetBaseControl("MaterialWeight1");
ControlsEntity.MaterialWeight2 = GetBaseControl("MaterialWeight2");
ControlsEntity.MaterialTolerance1 = GetBaseControl("MaterialTolerance1");
ControlsEntity.MaterialTolerance2 = GetBaseControl("MaterialTolerance2");
ControlsEntity.GelSpeedSet = GetBaseControl("GelSpeedSet");
ControlsEntity.GelPosTimeA = GetBaseControl("GelPosTimeA");
ControlsEntity.GelNagTimeB = GetBaseControl("GelNagTimeB");
ControlsEntity.GelPosTimeC = GetBaseControl("GelPosTimeC");
ControlsEntity.GelWaterTime = GetBaseControl("GelWaterTime");
ControlsEntity.GelWaitTime = GetBaseControl("GelWaitTime");
ControlsEntity.GelCloseHeatTime = GetBaseControl("GelCloseHeatTime");
ControlsEntity.GelOutDelayTime = GetBaseControl("GelOutDelayTime");
ControlsEntity.RepairState = GetBaseControl("RepairState") as MCLabel;
ControlsEntity.WetDryWeight = GetBaseControl("WetDryWeight");
ControlsEntity.WetMixTime = GetBaseControl("WetMixTime");
ControlsEntity.WetOutDelayTime = GetBaseControl("WetOutDelayTime");
ControlsEntity.ManualTolerance = GetBaseControl("ManualTolerance");
ControlsEntity.ManualWeight = GetBaseControl("ManualWeight");
ControlsEntity.WetManualControl = GetButtonControl("WetManualControl");
ControlsEntity.Download = GetButtonControl("Download");
ControlsEntity.LineStart = GetButtonControl("LineStart");
ControlsEntity.LineStop = GetButtonControl("LineStop");
ControlsEntity.GelManualPowder = GetButtonControl("GelManualPowder");
ControlsEntity.GelManualColdWater = GetButtonControl("GelManualColdWater");
ControlsEntity.GelManualHotWater = GetButtonControl("GelManualHotWater");
ControlsEntity.WetManualGel = GetButtonControl("WetManualGel");
ControlsEntity.RepairMode = GetButtonControl("RepairMode");
}
private IBaseControl GetBaseControl(string name)
{
return McControls.First(x => x.Name == name) as IBaseControl;
}
private Button GetButtonControl(string name)
{
return McControls.First(x => x.Name == name) as Button;
}
private MCCombobox GetComboBoxControl(string name)
/// <returns></returns>
private int DrySelect()
{
return McControls.First(x => x.Name == name) as MCCombobox;
if (Convert.ToBoolean(RadioE.Dry1.MCValue) == true)
{
return 1;
}
else if (Convert.ToBoolean(RadioE.Dry2.MCValue) == true)
{
return 2;
}
else if (Convert.ToBoolean(RadioE.Dry3.MCValue) == true)
{
return 3;
}
else if (Convert.ToBoolean(RadioE.Dry4.MCValue) == true)
{
return 4;
}
else
{
return 0;
}
}
private MCRadioButton GetMCRadioButtonControl(string name)
{
return McControls.First(x => x.Name == name) as MCRadioButton;
}
#endregion

@ -0,0 +1,43 @@
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Controls.Base;
using Mesnac.Controls.ChemicalWeighing;
using Mesnac.Controls.Default;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class ControlsHelper
{
/// <summary>
/// 控件导入
/// </summary>
public static void ControlImport(MCTextBoxEntity textE, ButtonEntity buttonE,
MCComboBoxEntity comboE, MCLabelEntity labelE, MCRadioButtonEntity radioE,
List<Control> McControls)
{
FillBase<MCTextBox>(textE, McControls);
FillBase<System.Windows.Forms.Button>(buttonE, McControls);
FillBase<MCCombobox>(comboE, McControls);
FillBase<MCLabel>(labelE, McControls);
FillBase<MCRadioButton>(radioE, McControls);
}
private static void FillBase<T>(object E, List<Control> McControls) where T : class
{
PropertyInfo[] sourcePropertyInfoList = E.GetType().GetProperties();
foreach (PropertyInfo sourceProperty in sourcePropertyInfoList)
{
string name = sourceProperty.Name;
var pro = McControls.FirstOrDefault(x => x.Name == name) as T;
sourceProperty.SetValue(E, pro);
}
}
}
}

@ -1,107 +0,0 @@
using DataBlockHelper.DBHelpers;
using DataBlockHelper.Entity.DB2104Entity;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.Entity;
using Mesnac.Controls.Base;
using Mesnac.Core.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class DryerWaterControl : ChemicalWeighingAction, IAction
{
private List<Control> McControls; // 获取Query控件
DryerWaterControlsEntity ControlsEntity = new DryerWaterControlsEntity();
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须要调用
McControls = GetAllControls();
ControlImport();
BottomSelect(runtime);
}
private void ControlImport()
{
ControlsEntity.WaterConfrim = GetButtonControl("WaterConfrim");
ControlsEntity.ColdValueA = GetBaseControl("ColdValueA");
ControlsEntity.ColdValueB = GetBaseControl("ColdValueB");
ControlsEntity.HotValueA = GetBaseControl("HotValueA");
ControlsEntity.HotValueB = GetBaseControl("HotValueB");
ControlsEntity.ColdToleranceA = GetBaseControl("ColdToleranceA");
ControlsEntity.ColdToleranceB = GetBaseControl("ColdToleranceB");
ControlsEntity.HotToleranceA = GetBaseControl("HotToleranceA");
ControlsEntity.HotToleranceB = GetBaseControl("HotToleranceB");
}
private void BottomSelect(RuntimeParameter runtime)
{
if(ControlsEntity.WaterConfrim == runtime.Sender)
{
if (MessageBox.Show("确认下发水称数据?", "下发确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return;
}
WaterEntity HotA = new WaterEntity();
WaterEntity ColdA = new WaterEntity();
WaterEntity HotB = new WaterEntity();
WaterEntity ColdB = new WaterEntity();
float hotASet, hotBSet, coldASet, coldBSet, hotATol, hotBTol, coldATol, coldBTol;
if (float.TryParse(Convert.ToString(ControlsEntity.HotValueA.MCValue), out hotASet) &&
float.TryParse(Convert.ToString(ControlsEntity.HotToleranceA.MCValue), out hotATol) &&
float.TryParse(Convert.ToString(ControlsEntity.HotValueB.MCValue), out hotBSet) &&
float.TryParse(Convert.ToString(ControlsEntity.HotToleranceB.MCValue), out hotBTol) &&
float.TryParse(Convert.ToString(ControlsEntity.ColdValueA.MCValue), out coldASet) &&
float.TryParse(Convert.ToString(ControlsEntity.ColdToleranceA.MCValue), out coldATol) &&
float.TryParse(Convert.ToString(ControlsEntity.ColdValueB.MCValue), out coldBSet) &&
float.TryParse(Convert.ToString(ControlsEntity.ColdToleranceB.MCValue), out coldBTol))
{
HotA.Set = hotASet;
HotB.Set = hotBSet;
ColdA.Set = coldASet;
ColdB.Set = coldBSet;
HotA.Tolerance = hotATol;
HotB.Tolerance = hotBTol;
ColdA.Tolerance = coldATol;
ColdB.Tolerance = coldBTol;
Db2104WriteHelper.WriteAHostWater(HotA);
Db2104WriteHelper.WriteBHostWater(HotB);
Db2104WriteHelper.WriteAColWater(ColdA);
Db2104WriteHelper.WriteBColWater(ColdB);
MesnacServiceManager.Instance.LoggingService.Info("水称数据下发成功!");
MessageBox.Show("水称数据下发成功");
}
else
{
MesnacServiceManager.Instance.LoggingService.Info("输入数值的格式有误");
MessageBox.Show("输入数值的格式有误!");
return;
}
}
}
private IBaseControl GetBaseControl(string name)
{
return McControls.First(x => x.Name == name) as IBaseControl;
}
private Button GetButtonControl(string name)
{
return McControls.First(x => x.Name == name) as Button;
}
}
}

@ -1,24 +0,0 @@
using Mesnac.Action.Base;
using Mesnac.Controls.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
{
public class DryerWaterControlsEntity
{
public IBaseControl ColdValueA { get; set; }
public IBaseControl ColdValueB { get; set; }
public IBaseControl HotValueA { get; set; }
public IBaseControl HotValueB { get; set; }
public IBaseControl ColdToleranceA { get; set; }
public IBaseControl ColdToleranceB { get; set; }
public IBaseControl HotToleranceA { get; set; }
public IBaseControl HotToleranceB { get; set; }
public Button WaterConfrim { get; set; }
}
}

@ -10,7 +10,7 @@ using Button = System.Windows.Forms.Button;
namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
{
public class GelerWeterControlsEntity
public class MCRadioButtonEntity
{
public MCRadioButton Line1 { get; set; }
public MCRadioButton Line2 { get; set; }
@ -20,28 +20,32 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public MCRadioButton Line6 { get; set; }
public MCRadioButton Line7 { get; set; }
public MCRadioButton Line8 { get; set; }
public MCRadioButton Dry1 { get; set; }
public MCRadioButton Dry2 { get; set; }
public MCRadioButton Dry3 { get; set; }
public MCRadioButton Dry4 { get; set; }
}
public class MCComboBoxEntity
{
public MCCombobox ChooseMaterial1 { get; set; }
public MCCombobox ChooseMaterial2 { get; set; }
public MCCombobox DryM1 { get; set; }
public MCCombobox DryM2 { get; set; }
public MCCombobox DryM3 { get; set; }
public MCCombobox DryM4 { get; set; }
public MCCombobox DryM5 { get; set; }
public MCCombobox DryM6 { get; set; }
public MCCombobox DryM7 { get; set; }
public MCCombobox DryM8 { get; set; }
public MCCombobox DryM9 { get; set; }
public MCCombobox DryM10 { get; set; }
public MCCombobox DryM11 { get; set; }
public MCCombobox DryM12 { get; set; }
}
public IBaseControl MaterialWeight1 { get; set; }
public IBaseControl MaterialWeight2 { get; set; }
public IBaseControl MaterialTolerance1 { get; set; }
public IBaseControl MaterialTolerance2 { get; set; }
public IBaseControl GelSpeedSet { get; set; }
public IBaseControl GelPosTimeA { get; set; }
public IBaseControl GelNagTimeB { get; set; }
public IBaseControl GelPosTimeC { get; set; }
public IBaseControl GelWaterTime { get; set; }
public IBaseControl GelWaitTime { get; set; }
public IBaseControl GelCloseHeatTime { get; set; }
public IBaseControl GelOutDelayTime { get; set; }
public IBaseControl WetDryWeight { get; set; }
public IBaseControl WetMixTime { get; set; }
public IBaseControl WetOutDelayTime { get; set; }
public IBaseControl ManualWeight { get; set; }
public IBaseControl ManualTolerance { get; set; }
public class MCLabelEntity
{
public MCLabel State1 { get; set; }
public MCLabel State2 { get; set; }
public MCLabel State3 { get; set; }
@ -51,7 +55,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public MCLabel State7 { get; set; }
public MCLabel State8 { get; set; }
public MCLabel RepairState { get; set; }
}
public class ButtonEntity
{
public Button WetManualControl { get; set; }
public Button Download { get; set; }
public Button LineStart { get; set; }
@ -61,6 +68,63 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public Button GelManualHotWater { get; set; }
public Button WetManualGel { get; set; }
public Button RepairMode { get; set; }
public Button WaterConfrim { get; set; }
public Button DryDownload { get; set; }
public Button WaterDownload { get; set; }
}
public class MCTextBoxEntity
{
public MCTextBox MaterialWeight1 { get; set; }
public MCTextBox MaterialWeight2 { get; set; }
public MCTextBox MaterialTolerance1 { get; set; }
public MCTextBox MaterialTolerance2 { get; set; }
public MCTextBox GelSpeedSet { get; set; }
public MCTextBox GelPosTimeA { get; set; }
public MCTextBox GelNagTimeB { get; set; }
public MCTextBox GelPosTimeC { get; set; }
public MCTextBox GelWaterTime { get; set; }
public MCTextBox GelWaitTime { get; set; }
public MCTextBox GelCloseHeatTime { get; set; }
public MCTextBox GelOutDelayTime { get; set; }
public MCTextBox WetDryWeight { get; set; }
public MCTextBox WetMixTime { get; set; }
public MCTextBox WetOutDelayTime { get; set; }
public MCTextBox ManualWeight { get; set; }
public MCTextBox ManualTolerance { get; set; }
public MCTextBox ColdValueA { get; set; }
public MCTextBox ColdValueB { get; set; }
public MCTextBox HotValueA { get; set; }
public MCTextBox HotValueB { get; set; }
public MCTextBox ColdToleranceA { get; set; }
public MCTextBox ColdToleranceB { get; set; }
public MCTextBox HotToleranceA { get; set; }
public MCTextBox HotToleranceB { get; set; }
public MCTextBox DryW1 { get; set; }
public MCTextBox DryW2 { get; set; }
public MCTextBox DryW3 { get; set; }
public MCTextBox DryW4 { get; set; }
public MCTextBox DryW5 { get; set; }
public MCTextBox DryW6 { get; set; }
public MCTextBox DryW7 { get; set; }
public MCTextBox DryW8 { get; set; }
public MCTextBox DryW9 { get; set; }
public MCTextBox DryW10 { get; set; }
public MCTextBox DryW11{ get; set; }
public MCTextBox DryW12 { get; set; }
public MCTextBox DryT1 { get; set; }
public MCTextBox DryT2 { get; set; }
public MCTextBox DryT3 { get; set; }
public MCTextBox DryT4 { get; set; }
public MCTextBox DryT5 { get; set; }
public MCTextBox DryT6 { get; set; }
public MCTextBox DryT7 { get; set; }
public MCTextBox DryT8 { get; set; }
public MCTextBox DryT9 { get; set; }
public MCTextBox DryT10 { get; set; }
public MCTextBox DryT11 { get; set; }
public MCTextBox DryT12 { get; set; }
}
}

@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -21,9 +22,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class InitAction : ChemicalWeighingAction, IAction
{
GelerWeterControlsEntity ControlsEntity = new GelerWeterControlsEntity();
private List<Control> McControls;
Color backColor = Color.Transparent;
MCTextBoxEntity TextE = new MCTextBoxEntity();
ButtonEntity ButtonE = new ButtonEntity();
MCLabelEntity LabelE = new MCLabelEntity();
MCComboBoxEntity ComboE = new MCComboBoxEntity();
MCRadioButtonEntity RadioE = new MCRadioButtonEntity();
public Timer timer;
@ -33,19 +38,20 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
base.RunIni(runtime); //必须要调用
McControls = GetAllControls();
ControlImport();
ControlsHelper.ControlImport(TextE, ButtonE, ComboE, LabelE, RadioE, McControls);
ControlsEntity.Line1.MCValue = true;
ControlsEntity.Line1.BackColor = System.Drawing.Color.LightSkyBlue;
RadioE.Line1.MCValue = true;
RadioE.Dry1.MCValue = true;
RadioE.Line1.BackColor = System.Drawing.Color.LightSkyBlue;
ControlsEntity.Line1.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line2.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line3.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line4.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line5.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line6.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line7.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line8.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line1.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line2.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line3.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line4.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line5.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line6.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line7.CheckedChanged += Mcradion_CheckedChanged;
RadioE.Line8.CheckedChanged += Mcradion_CheckedChanged;
ControlInitFromPLC();
@ -69,33 +75,33 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
var startJob = dB2105Helper.GetStartJob;
ControlsEntity.State1.MCValue = ConvertOnOff(startJob[0].Val);
ControlsEntity.State2.MCValue = ConvertOnOff(startJob[1].Val);
ControlsEntity.State3.MCValue = ConvertOnOff(startJob[2].Val);
ControlsEntity.State4.MCValue = ConvertOnOff(startJob[3].Val);
ControlsEntity.State5.MCValue = ConvertOnOff(startJob[4].Val);
ControlsEntity.State6.MCValue = ConvertOnOff(startJob[5].Val);
ControlsEntity.State7.MCValue = ConvertOnOff(startJob[6].Val);
ControlsEntity.State8.MCValue = ConvertOnOff(startJob[7].Val);
ControlsEntity.State1.BackColor = ConvertColor(startJob[0].Val);
ControlsEntity.State2.BackColor = ConvertColor(startJob[1].Val);
ControlsEntity.State3.BackColor = ConvertColor(startJob[2].Val);
ControlsEntity.State4.BackColor = ConvertColor(startJob[3].Val);
ControlsEntity.State5.BackColor = ConvertColor(startJob[4].Val);
ControlsEntity.State6.BackColor = ConvertColor(startJob[5].Val);
ControlsEntity.State7.BackColor = ConvertColor(startJob[6].Val);
ControlsEntity.State8.BackColor = ConvertColor(startJob[7].Val);
LabelE.State1.MCValue = ConvertOnOff(startJob[0].Val);
LabelE.State2.MCValue = ConvertOnOff(startJob[1].Val);
LabelE.State3.MCValue = ConvertOnOff(startJob[2].Val);
LabelE.State4.MCValue = ConvertOnOff(startJob[3].Val);
LabelE.State5.MCValue = ConvertOnOff(startJob[4].Val);
LabelE.State6.MCValue = ConvertOnOff(startJob[5].Val);
LabelE.State7.MCValue = ConvertOnOff(startJob[6].Val);
LabelE.State8.MCValue = ConvertOnOff(startJob[7].Val);
LabelE.State1.BackColor = ConvertColor(startJob[0].Val);
LabelE.State2.BackColor = ConvertColor(startJob[1].Val);
LabelE.State3.BackColor = ConvertColor(startJob[2].Val);
LabelE.State4.BackColor = ConvertColor(startJob[3].Val);
LabelE.State5.BackColor = ConvertColor(startJob[4].Val);
LabelE.State6.BackColor = ConvertColor(startJob[5].Val);
LabelE.State7.BackColor = ConvertColor(startJob[6].Val);
LabelE.State8.BackColor = ConvertColor(startJob[7].Val);
var rd = Db3000Helper.ReadModel();
if (rd[SingleSelect() - 1])
{
ControlsEntity.RepairState.MCValue = "开";
LabelE.RepairState.MCValue = "开";
}
else
{
ControlsEntity.RepairState.MCValue = "关";
LabelE.RepairState.MCValue = "关";
}
}
@ -126,14 +132,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
private void Mcradion_CheckedChanged(object sender, EventArgs e)
{
MCRadioButton mCRadio = sender as MCRadioButton;
ControlsEntity.Line1.BackColor = backColor;
ControlsEntity.Line2.BackColor = backColor;
ControlsEntity.Line3.BackColor = backColor;
ControlsEntity.Line4.BackColor = backColor;
ControlsEntity.Line5.BackColor = backColor;
ControlsEntity.Line6.BackColor = backColor;
ControlsEntity.Line7.BackColor = backColor;
ControlsEntity.Line8.BackColor = backColor;
RadioE.Line1.BackColor = backColor;
RadioE.Line2.BackColor = backColor;
RadioE.Line3.BackColor = backColor;
RadioE.Line4.BackColor = backColor;
RadioE.Line5.BackColor = backColor;
RadioE.Line6.BackColor = backColor;
RadioE.Line7.BackColor = backColor;
RadioE.Line8.BackColor = backColor;
mCRadio.BackColor = Color.LightSkyBlue;
}
@ -145,41 +151,127 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
private void ControlInitFromPLC()
{
ControlsEntity.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ControlsEntity.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ComboE.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ComboE.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
var selected = FreeSqlUnit.Instance.Select<DeviceMaterrial>().
Where(x => x.DeviceId == SingleSelect()).ToList();
Where(x => x.DeviceId == SingleSelect() && x.Type == 2).ToList();
if(selected.Count != 0)
{
ControlsEntity.ChooseMaterial1.SelectedValue = selected[0].MaterrialId;
ControlsEntity.ChooseMaterial2.SelectedValue = selected[1].MaterrialId;
ComboE.ChooseMaterial1.SelectedValue = selected[0].MaterrialId;
ComboE.ChooseMaterial2.SelectedValue = selected[1].MaterrialId;
}
else
{
ControlsEntity.ChooseMaterial1.SelectedIndex = 0;
ControlsEntity.ChooseMaterial2.SelectedIndex = 0;
ComboE.ChooseMaterial1.SelectedIndex = 0;
ComboE.ChooseMaterial2.SelectedIndex = 0;
}
var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG1.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG1.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG1.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG1.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG1.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM1[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM1[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM1[4].MixTime;
TextE.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set;
TextE.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set;
//TextE.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance;
//TextE.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance;
TextE.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed;
TextE.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp;
TextE.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed;
TextE.GelPosTimeC.MCValue = getGelatG1.RecipeSteps[2].MixTime;
TextE.GelWaterTime.MCValue = getGelatG1.RecipeSteps[4].MixTime;
TextE.GelWaitTime.MCValue = getGelatG1.RecipeSteps[6].MixTime;
TextE.GelCloseHeatTime.MCValue = getGelatG1.RecipeSteps[7].MixTime;
TextE.GelOutDelayTime.MCValue = getGelatG1.RecipeSteps[7].MixTemp;
TextE.WetDryWeight.MCValue = getWeterM1[1].SetValue;
TextE.WetMixTime.MCValue = getWeterM1[2].MixTime;
TextE.WetOutDelayTime.MCValue = getWeterM1[4].MixTime;
DB2104Helper dB2104Helper = new DB2104Helper();
TextE.ColdValueA.MCValue = dB2104Helper.GetAColWater.Set;
TextE.ColdValueB.MCValue = dB2104Helper.GetBColWater.Set;
TextE.HotValueA.MCValue = dB2104Helper.GetAHotWater.Set;
TextE.HotValueB.MCValue = dB2104Helper.GetBHotWater.Set;
TextE.ColdToleranceA.MCValue = dB2104Helper.GetAColWater.Tolerance;
TextE.ColdToleranceB.MCValue = dB2104Helper.GetBColWater.Tolerance;
TextE.HotToleranceA.MCValue = dB2104Helper.GetAHotWater.Tolerance;
TextE.HotToleranceB.MCValue = dB2104Helper.GetBHotWater.Tolerance;
ComboE.DryM1.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM2.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM3.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM4.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM5.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM6.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM7.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM8.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM9.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM10.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM11.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM12.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
var drtSelected = FreeSqlUnit.Instance.Select<DeviceMaterrial>().
Where(x => x.DeviceId == DrySelect() && x.Type == 1).ToList();
if (drtSelected.Count != 0)
{
ComboE.DryM1.SelectedValue = drtSelected[0].MaterrialId;
ComboE.DryM2.SelectedValue = drtSelected[1].MaterrialId;
ComboE.DryM3.SelectedValue = drtSelected[2].MaterrialId;
ComboE.DryM4.SelectedValue = drtSelected[3].MaterrialId;
ComboE.DryM5.SelectedValue = drtSelected[4].MaterrialId;
ComboE.DryM6.SelectedValue = drtSelected[5].MaterrialId;
ComboE.DryM7.SelectedValue = drtSelected[6].MaterrialId;
ComboE.DryM8.SelectedValue = drtSelected[7].MaterrialId;
ComboE.DryM9.SelectedValue = drtSelected[8].MaterrialId;
ComboE.DryM10.SelectedValue = drtSelected[9].MaterrialId;
ComboE.DryM11.SelectedValue = drtSelected[10].MaterrialId;
ComboE.DryM12.SelectedValue = drtSelected[11].MaterrialId;
}
else
{
ComboE.DryM1.SelectedIndex = 0;
ComboE.DryM2.SelectedIndex = 0;
ComboE.DryM3.SelectedIndex = 0;
ComboE.DryM4.SelectedIndex = 0;
ComboE.DryM5.SelectedIndex = 0;
ComboE.DryM6.SelectedIndex = 0;
ComboE.DryM7.SelectedIndex = 0;
ComboE.DryM8.SelectedIndex = 0;
ComboE.DryM9.SelectedIndex = 0;
ComboE.DryM10.SelectedIndex = 0;
ComboE.DryM11.SelectedIndex = 0;
ComboE.DryM12.SelectedIndex = 0;
}
var getDryerD1 = LjPlanningPlcHelp.GetDryerD1;
TextE.DryW1.MCValue = getDryerD1.RecipePlcViews[0].Set;
TextE.DryW2.MCValue = getDryerD1.RecipePlcViews[1].Set;
TextE.DryW3.MCValue = getDryerD1.RecipePlcViews[2].Set;
TextE.DryW4.MCValue = getDryerD1.RecipePlcViews[3].Set;
TextE.DryW5.MCValue = getDryerD1.RecipePlcViews[4].Set;
TextE.DryW6.MCValue = getDryerD1.RecipePlcViews[5].Set;
TextE.DryW7.MCValue = getDryerD1.RecipePlcViews[6].Set;
TextE.DryW8.MCValue = getDryerD1.RecipePlcViews[7].Set;
TextE.DryW9.MCValue = getDryerD1.RecipePlcViews[8].Set;
TextE.DryW10.MCValue = getDryerD1.RecipePlcViews[9].Set;
TextE.DryW11.MCValue = getDryerD1.RecipePlcViews[10].Set;
TextE.DryW12.MCValue = getDryerD1.RecipePlcViews[11].Set;
TextE.DryT1.MCValue = getDryerD1.RecipePlcViews[0].Tolerance;
TextE.DryT2.MCValue = getDryerD1.RecipePlcViews[1].Tolerance;
TextE.DryT3.MCValue = getDryerD1.RecipePlcViews[2].Tolerance;
TextE.DryT4.MCValue = getDryerD1.RecipePlcViews[3].Tolerance;
TextE.DryT5.MCValue = getDryerD1.RecipePlcViews[4].Tolerance;
TextE.DryT6.MCValue = getDryerD1.RecipePlcViews[5].Tolerance;
TextE.DryT7.MCValue = getDryerD1.RecipePlcViews[6].Tolerance;
TextE.DryT8.MCValue = getDryerD1.RecipePlcViews[7].Tolerance;
TextE.DryT9.MCValue = getDryerD1.RecipePlcViews[8].Tolerance;
TextE.DryT10.MCValue = getDryerD1.RecipePlcViews[9].Tolerance;
TextE.DryT11.MCValue = getDryerD1.RecipePlcViews[10].Tolerance;
TextE.DryT12.MCValue = getDryerD1.RecipePlcViews[11].Tolerance;
}
#region 帮助类
@ -191,35 +283,35 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
private int SingleSelect()
{
int no = 0;
if (Convert.ToBoolean(ControlsEntity.Line1.MCValue))
if (Convert.ToBoolean(RadioE.Line1.MCValue))
{
no= 1;
}
else if (Convert.ToBoolean(ControlsEntity.Line2.MCValue))
else if (Convert.ToBoolean(RadioE.Line2.MCValue))
{
no= 2;
}
else if (Convert.ToBoolean(ControlsEntity.Line3.MCValue))
else if (Convert.ToBoolean(RadioE.Line3.MCValue))
{
no= 3;
}
else if (Convert.ToBoolean(ControlsEntity.Line4.MCValue))
else if (Convert.ToBoolean(RadioE.Line4.MCValue))
{
no= 4;
}
else if (Convert.ToBoolean(ControlsEntity.Line5.MCValue))
else if (Convert.ToBoolean(RadioE.Line5.MCValue))
{
no= 5;
}
else if (Convert.ToBoolean(ControlsEntity.Line6.MCValue))
else if (Convert.ToBoolean(RadioE.Line6.MCValue))
{
no= 6;
}
else if (Convert.ToBoolean(ControlsEntity.Line7.MCValue))
else if (Convert.ToBoolean(RadioE.Line7.MCValue))
{
no= 7;
}
else if (Convert.ToBoolean(ControlsEntity.Line8.MCValue))
else if (Convert.ToBoolean(RadioE.Line8.MCValue))
{
no= 8;
}
@ -227,67 +319,34 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return no;
}
/// <summary>
/// 控件导入
/// 单混机单选选择
/// </summary>
private void ControlImport()
/// <returns></returns>
private int DrySelect()
{
ControlsEntity.Line1 = GetMCRadioButtonControl("Line1");
ControlsEntity.Line2 = GetMCRadioButtonControl("Line2");
ControlsEntity.Line3 = GetMCRadioButtonControl("Line3");
ControlsEntity.Line4 = GetMCRadioButtonControl("Line4");
ControlsEntity.Line5 = GetMCRadioButtonControl("Line5");
ControlsEntity.Line6 = GetMCRadioButtonControl("Line6");
ControlsEntity.Line7 = GetMCRadioButtonControl("Line7");
ControlsEntity.Line8 = GetMCRadioButtonControl("Line8");
ControlsEntity.State1 = GetBaseControl("State1") as MCLabel;
ControlsEntity.State2 = GetBaseControl("State2") as MCLabel;
ControlsEntity.State3 = GetBaseControl("State3") as MCLabel;
ControlsEntity.State4 = GetBaseControl("State4") as MCLabel;
ControlsEntity.State5 = GetBaseControl("State5") as MCLabel;
ControlsEntity.State6 = GetBaseControl("State6") as MCLabel;
ControlsEntity.State7 = GetBaseControl("State7") as MCLabel;
ControlsEntity.State8 = GetBaseControl("State8") as MCLabel;
ControlsEntity.RepairState = GetBaseControl("RepairState") as MCLabel;
ControlsEntity.ChooseMaterial1 = GetBaseControl("ChooseMaterial1") as MCCombobox;
ControlsEntity.ChooseMaterial2 = GetBaseControl("ChooseMaterial2") as MCCombobox;
ControlsEntity.MaterialWeight1 = GetBaseControl("MaterialWeight1");
ControlsEntity.MaterialWeight2 = GetBaseControl("MaterialWeight2");
ControlsEntity.MaterialTolerance1 = GetBaseControl("MaterialTolerance1");
ControlsEntity.MaterialTolerance2 = GetBaseControl("MaterialTolerance2");
ControlsEntity.GelSpeedSet = GetBaseControl("GelSpeedSet");
ControlsEntity.GelPosTimeA = GetBaseControl("GelPosTimeA");
ControlsEntity.GelNagTimeB = GetBaseControl("GelNagTimeB");
ControlsEntity.GelPosTimeC = GetBaseControl("GelPosTimeC");
ControlsEntity.GelWaterTime = GetBaseControl("GelWaterTime");
ControlsEntity.GelWaitTime = GetBaseControl("GelWaitTime");
ControlsEntity.GelCloseHeatTime = GetBaseControl("GelCloseHeatTime");
ControlsEntity.GelOutDelayTime = GetBaseControl("GelOutDelayTime");
ControlsEntity.WetDryWeight = GetBaseControl("WetDryWeight");
ControlsEntity.WetMixTime = GetBaseControl("WetMixTime");
ControlsEntity.WetOutDelayTime = GetBaseControl("WetOutDelayTime");
}
private IBaseControl GetBaseControl(string name)
{
return McControls.First(x => x.Name == name) as IBaseControl;
}
private MCCombobox GetComboBoxControl(string name)
{
return McControls.First(x => x.Name == name) as MCCombobox;
}
private MCRadioButton GetMCRadioButtonControl(string name)
{
return McControls.First(x => x.Name == name) as MCRadioButton;
if (Convert.ToBoolean(RadioE.Dry1.MCValue) == true)
{
return 1;
}
else if (Convert.ToBoolean(RadioE.Dry2.MCValue) == true)
{
return 2;
}
else if (Convert.ToBoolean(RadioE.Dry3.MCValue) == true)
{
return 3;
}
else if (Convert.ToBoolean(RadioE.Dry4.MCValue) == true)
{
return 4;
}
else
{
return 0;
}
}
#endregion
}

@ -4,6 +4,7 @@ using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.FreeDb;
using Mesnac.Action.ChemicalWeighing.LjMixManager;
using Mesnac.Action.ChemicalWeighing.LjPlanning;
using Mesnac.Controls.Base;
using Mesnac.Controls.Default;
@ -19,8 +20,12 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class RefreshAction : ChemicalWeighingAction, IAction
{
GelerWeterControlsEntity ControlsEntity = new GelerWeterControlsEntity();
private List<Control> McControls;
MCTextBoxEntity TextE = new MCTextBoxEntity();
ButtonEntity ButtonE = new ButtonEntity();
MCLabelEntity LabelE = new MCLabelEntity();
MCComboBoxEntity ComboE = new MCComboBoxEntity();
MCRadioButtonEntity RadioE = new MCRadioButtonEntity();
public void Run(RuntimeParameter runtime)
{
@ -29,7 +34,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
McControls = GetAllControls();
ControlImport();
ControlsHelper.ControlImport(TextE, ButtonE, ComboE, LabelE, RadioE, McControls);
ControlInitFromPLC();
@ -49,20 +54,20 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
// case 1:
// LjPlanningPlcHelp.GetGelatG1.
//}
ControlsEntity.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ControlsEntity.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ComboE.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ComboE.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
var selected = FreeSqlUnit.Instance.Select<DeviceMaterrial>().Where(x => x.DeviceId == SingleSelect()).ToList();
var selected = FreeSqlUnit.Instance.Select<DeviceMaterrial>().Where(x => x.DeviceId == SingleSelect() && x.Type == 2).ToList();
if (selected.Count != 0)
{
ControlsEntity.ChooseMaterial1.SelectedValue = selected[0].MaterrialId;
ControlsEntity.ChooseMaterial2.SelectedValue = selected[1].MaterrialId;
ComboE.ChooseMaterial1.SelectedValue = selected[0].MaterrialId;
ComboE.ChooseMaterial2.SelectedValue = selected[1].MaterrialId;
}
else
{
ControlsEntity.ChooseMaterial1.SelectedIndex = 0;
ControlsEntity.ChooseMaterial2.SelectedIndex = 0;
ComboE.ChooseMaterial1.SelectedIndex = 0;
ComboE.ChooseMaterial2.SelectedIndex = 0;
}
var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
@ -85,146 +90,151 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
switch (SingleSelect())
{
case 1:
ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG1.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG1.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG1.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG1.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG1.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM1[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM1[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM1[4].MixTime;
GWDataShow(getGelatG1, getWeterM1);
break;
case 2:
ControlsEntity.MaterialWeight1.MCValue = getGelatG2.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG2.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG2.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG2.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG2.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG2.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG2.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG2.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG2.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG2.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG2.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG2.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM2[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM2[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM2[4].MixTime;
GWDataShow(getGelatG2, getWeterM2);
break;
case 3:
ControlsEntity.MaterialWeight1.MCValue = getGelatG3.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG3.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG3.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG3.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG3.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG3.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG3.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG3.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG3.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG3.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG3.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG3.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM3[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM3[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM3[4].MixTime;
GWDataShow(getGelatG3, getWeterM3);
break;
case 4:
ControlsEntity.MaterialWeight1.MCValue = getGelatG4.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG4.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG4.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG4.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG4.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG4.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG4.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG4.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG4.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG4.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG4.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG4.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM4[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM4[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM4[4].MixTime;
GWDataShow(getGelatG4, getWeterM4);
break;
case 5:
ControlsEntity.MaterialWeight1.MCValue = getGelatG5.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG5.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG5.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG5.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG5.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG5.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG5.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG5.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG5.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG5.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG5.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG5.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM5[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM5[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM5[4].MixTime;
GWDataShow(getGelatG5, getWeterM5);
break;
case 6:
ControlsEntity.MaterialWeight1.MCValue = getGelatG6.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG6.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG6.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG6.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG6.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG6.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG6.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG6.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG6.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG6.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG6.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG6.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM6[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM6[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM6[4].MixTime;
GWDataShow(getGelatG6, getWeterM6);
break;
case 7:
ControlsEntity.MaterialWeight1.MCValue = getGelatG7.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG7.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG7.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG7.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG7.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG7.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG7.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG7.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG7.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG7.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG7.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG7.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM7[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM7[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM7[4].MixTime;
GWDataShow(getGelatG7, getWeterM7);
break;
case 8:
ControlsEntity.MaterialWeight1.MCValue = getGelatG8.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG8.RecipePlcViews[1].Set;
//ControlsEntity.MaterialTolerance1.MCValue = getGelatG8.RecipePlcViews[0].Tolerance;
//ControlsEntity.MaterialTolerance2.MCValue = getGelatG8.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG8.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG8.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG8.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = getGelatG8.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = getGelatG8.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = getGelatG8.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = getGelatG8.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = getGelatG8.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = getWeterM8[1].SetValue;
ControlsEntity.WetMixTime.MCValue = getWeterM8[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = getWeterM8[4].MixTime;
GWDataShow(getGelatG8, getWeterM8);
break;
default:
return;
}
ComboE.DryM1.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM2.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM3.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM4.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM5.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM6.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM7.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM8.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM9.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM10.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM11.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM12.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
var drtSelected = FreeSqlUnit.Instance.Select<DeviceMaterrial>().
Where(x => x.DeviceId == DrySelect() && x.Type == 1).ToList();
if (drtSelected.Count != 0)
{
ComboE.DryM1.SelectedValue = drtSelected[0].MaterrialId;
ComboE.DryM2.SelectedValue = drtSelected[1].MaterrialId;
ComboE.DryM3.SelectedValue = drtSelected[2].MaterrialId;
ComboE.DryM4.SelectedValue = drtSelected[3].MaterrialId;
ComboE.DryM5.SelectedValue = drtSelected[4].MaterrialId;
ComboE.DryM6.SelectedValue = drtSelected[5].MaterrialId;
ComboE.DryM7.SelectedValue = drtSelected[6].MaterrialId;
ComboE.DryM8.SelectedValue = drtSelected[7].MaterrialId;
ComboE.DryM9.SelectedValue = drtSelected[8].MaterrialId;
ComboE.DryM10.SelectedValue = drtSelected[9].MaterrialId;
ComboE.DryM11.SelectedValue = drtSelected[10].MaterrialId;
ComboE.DryM12.SelectedValue = drtSelected[11].MaterrialId;
}
else
{
ComboE.DryM1.SelectedIndex = 0;
ComboE.DryM2.SelectedIndex = 0;
ComboE.DryM3.SelectedIndex = 0;
ComboE.DryM4.SelectedIndex = 0;
ComboE.DryM5.SelectedIndex = 0;
ComboE.DryM6.SelectedIndex = 0;
ComboE.DryM7.SelectedIndex = 0;
ComboE.DryM8.SelectedIndex = 0;
ComboE.DryM9.SelectedIndex = 0;
ComboE.DryM10.SelectedIndex = 0;
ComboE.DryM11.SelectedIndex = 0;
ComboE.DryM12.SelectedIndex = 0;
}
var getDryerD1 = LjPlanningPlcHelp.GetDryerD1;
var getDryerD2 = LjPlanningPlcHelp.GetDryerD2;
var getDryerD3 = LjPlanningPlcHelp.GetDryerD3;
var getDryerD4 = LjPlanningPlcHelp.GetDryerD4;
switch (DrySelect())
{
case 1:
DryDataShow(getDryerD1);
break;
case 2:
DryDataShow(getDryerD2);
break;
case 3:
DryDataShow(getDryerD3);
break;
case 4:
DryDataShow(getDryerD4);
break;
default: return;
}
}
private void DryDataShow(DryerView Dry)
{
TextE.DryW1.MCValue = Dry.RecipePlcViews[0].Set;
TextE.DryW2.MCValue = Dry.RecipePlcViews[1].Set;
TextE.DryW3.MCValue = Dry.RecipePlcViews[2].Set;
TextE.DryW4.MCValue = Dry.RecipePlcViews[3].Set;
TextE.DryW5.MCValue = Dry.RecipePlcViews[4].Set;
TextE.DryW6.MCValue = Dry.RecipePlcViews[5].Set;
TextE.DryW7.MCValue = Dry.RecipePlcViews[6].Set;
TextE.DryW8.MCValue = Dry.RecipePlcViews[7].Set;
TextE.DryW9.MCValue = Dry.RecipePlcViews[8].Set;
TextE.DryW10.MCValue = Dry.RecipePlcViews[9].Set;
TextE.DryW11.MCValue = Dry.RecipePlcViews[10].Set;
TextE.DryW12.MCValue = Dry.RecipePlcViews[11].Set;
TextE.DryT1.MCValue = Dry.RecipePlcViews[0].Tolerance;
TextE.DryT2.MCValue = Dry.RecipePlcViews[1].Tolerance;
TextE.DryT3.MCValue = Dry.RecipePlcViews[2].Tolerance;
TextE.DryT4.MCValue = Dry.RecipePlcViews[3].Tolerance;
TextE.DryT5.MCValue = Dry.RecipePlcViews[4].Tolerance;
TextE.DryT6.MCValue = Dry.RecipePlcViews[5].Tolerance;
TextE.DryT7.MCValue = Dry.RecipePlcViews[6].Tolerance;
TextE.DryT8.MCValue = Dry.RecipePlcViews[7].Tolerance;
TextE.DryT9.MCValue = Dry.RecipePlcViews[8].Tolerance;
TextE.DryT10.MCValue = Dry.RecipePlcViews[9].Tolerance;
TextE.DryT11.MCValue = Dry.RecipePlcViews[10].Tolerance;
TextE.DryT12.MCValue = Dry.RecipePlcViews[11].Tolerance;
}
private void GWDataShow(DryerView Gel, List<MixStep> Wet)
{
TextE.MaterialWeight1.MCValue = Gel.RecipePlcViews[0].Set;
TextE.MaterialWeight2.MCValue = Gel.RecipePlcViews[1].Set;
//TextE.MaterialTolerance1.MCValue = Gel.RecipePlcViews[0].Tolerance;
//TextE.MaterialTolerance2.MCValue = Gel.RecipePlcViews[1].Tolerance;
TextE.GelSpeedSet.MCValue = Gel.RecipeSteps[0].MixSpeed;
TextE.GelPosTimeA.MCValue = Gel.RecipeSteps[2].MixTemp;
TextE.GelNagTimeB.MCValue = Gel.RecipeSteps[2].MixSpeed;
TextE.GelPosTimeC.MCValue = Gel.RecipeSteps[2].MixTime;
TextE.GelWaterTime.MCValue = Gel.RecipeSteps[4].MixTime;
TextE.GelWaitTime.MCValue = Gel.RecipeSteps[6].MixTime;
TextE.GelCloseHeatTime.MCValue = Gel.RecipeSteps[7].MixTime;
TextE.GelOutDelayTime.MCValue = Gel.RecipeSteps[7].MixTemp;
TextE.WetDryWeight.MCValue = Wet[1].SetValue;
TextE.WetMixTime.MCValue = Wet[2].MixTime;
TextE.WetOutDelayTime.MCValue = Wet[4].MixTime;
}
#endregion
@ -237,35 +247,35 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
/// <returns>返回单选的产线号 如果未选择返回0</returns>
private int SingleSelect()
{
if (Convert.ToBoolean(ControlsEntity.Line1.MCValue) == true)
if (Convert.ToBoolean(RadioE.Line1.MCValue) == true)
{
return 1;
}
else if (Convert.ToBoolean(ControlsEntity.Line2.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line2.MCValue) == true)
{
return 2;
}
else if (Convert.ToBoolean(ControlsEntity.Line3.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line3.MCValue) == true)
{
return 3;
}
else if (Convert.ToBoolean(ControlsEntity.Line4.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line4.MCValue) == true)
{
return 4;
}
else if (Convert.ToBoolean(ControlsEntity.Line5.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line5.MCValue) == true)
{
return 5;
}
else if (Convert.ToBoolean(ControlsEntity.Line6.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line6.MCValue) == true)
{
return 6;
}
else if (Convert.ToBoolean(ControlsEntity.Line7.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line7.MCValue) == true)
{
return 7;
}
else if (Convert.ToBoolean(ControlsEntity.Line8.MCValue) == true)
else if (Convert.ToBoolean(RadioE.Line8.MCValue) == true)
{
return 8;
}
@ -276,56 +286,32 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
/// <summary>
/// 控件导入
/// 单混机单选选择
/// </summary>
private void ControlImport()
{
ControlsEntity.Line1 = GetMCRadioButtonControl("Line1");
ControlsEntity.Line2 = GetMCRadioButtonControl("Line2");
ControlsEntity.Line3 = GetMCRadioButtonControl("Line3");
ControlsEntity.Line4 = GetMCRadioButtonControl("Line4");
ControlsEntity.Line5 = GetMCRadioButtonControl("Line5");
ControlsEntity.Line6 = GetMCRadioButtonControl("Line6");
ControlsEntity.Line7 = GetMCRadioButtonControl("Line7");
ControlsEntity.Line8 = GetMCRadioButtonControl("Line8");
ControlsEntity.ChooseMaterial1 = GetComboBoxControl("ChooseMaterial1");
ControlsEntity.ChooseMaterial2 = GetComboBoxControl("ChooseMaterial2");
ControlsEntity.MaterialWeight1 = GetBaseControl("MaterialWeight1");
ControlsEntity.MaterialWeight2 = GetBaseControl("MaterialWeight2");
ControlsEntity.MaterialTolerance1 = GetBaseControl("MaterialTolerance1");
ControlsEntity.MaterialTolerance2 = GetBaseControl("MaterialTolerance2");
ControlsEntity.GelSpeedSet = GetBaseControl("GelSpeedSet");
ControlsEntity.GelPosTimeA = GetBaseControl("GelPosTimeA");
ControlsEntity.GelNagTimeB = GetBaseControl("GelNagTimeB");
ControlsEntity.GelPosTimeC = GetBaseControl("GelPosTimeC");
ControlsEntity.GelWaterTime = GetBaseControl("GelWaterTime");
ControlsEntity.GelWaitTime = GetBaseControl("GelWaitTime");
ControlsEntity.GelCloseHeatTime = GetBaseControl("GelCloseHeatTime");
ControlsEntity.GelOutDelayTime = GetBaseControl("GelOutDelayTime");
ControlsEntity.WetDryWeight = GetBaseControl("WetDryWeight");
ControlsEntity.WetMixTime = GetBaseControl("WetMixTime");
ControlsEntity.WetOutDelayTime = GetBaseControl("WetOutDelayTime");
}
private IBaseControl GetBaseControl(string name)
{
return McControls.First(x => x.Name == name) as IBaseControl;
}
private MCCombobox GetComboBoxControl(string name)
{
return McControls.First(x => x.Name == name) as MCCombobox;
}
private MCRadioButton GetMCRadioButtonControl(string name)
/// <returns></returns>
private int DrySelect()
{
return McControls.First(x => x.Name == name) as MCRadioButton;
if (Convert.ToBoolean(RadioE.Dry1.MCValue) == true)
{
return 1;
}
else if (Convert.ToBoolean(RadioE.Dry2.MCValue) == true)
{
return 2;
}
else if (Convert.ToBoolean(RadioE.Dry3.MCValue) == true)
{
return 3;
}
else if (Convert.ToBoolean(RadioE.Dry4.MCValue) == true)
{
return 4;
}
else
{
return 0;
}
}
#endregion
}

@ -1,77 +0,0 @@
using DataBlockHelper.DBHelpers;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Controls.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
public class WaterInitAction : ChemicalWeighingAction, IAction
{
DryerWaterControlsEntity ControlsEntity = new DryerWaterControlsEntity();
private List<Control> McControls;
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime); //必须要调用
McControls = GetAllControls();
ControlImport();
ControlInitFromPLC();
}
/// <summary>
/// 控件从Plc初始化
/// </summary>
private void ControlInitFromPLC()
{
DB2104Helper dB2104Helper = new DB2104Helper();
ControlsEntity.ColdValueA.MCValue = dB2104Helper.GetAColWater.Set;
ControlsEntity.ColdValueB.MCValue = dB2104Helper.GetBColWater.Set;
ControlsEntity.HotValueA.MCValue = dB2104Helper.GetAHotWater.Set;
ControlsEntity.HotValueB.MCValue = dB2104Helper.GetBHotWater.Set;
ControlsEntity.ColdToleranceA.MCValue = dB2104Helper.GetAColWater.Tolerance;
ControlsEntity.ColdToleranceB.MCValue = dB2104Helper.GetBColWater.Tolerance;
ControlsEntity.HotToleranceA.MCValue = dB2104Helper.GetAHotWater.Tolerance;
ControlsEntity.HotToleranceB.MCValue = dB2104Helper.GetBHotWater.Tolerance;
}
private void ControlImport()
{
ControlsEntity.WaterConfrim = GetButtonControl("WaterConfrim");
ControlsEntity.ColdValueA = GetBaseControl("ColdValueA");
ControlsEntity.ColdValueB = GetBaseControl("ColdValueB");
ControlsEntity.HotValueA = GetBaseControl("HotValueA");
ControlsEntity.HotValueB = GetBaseControl("HotValueB");
ControlsEntity.ColdToleranceA = GetBaseControl("ColdToleranceA");
ControlsEntity.ColdToleranceB = GetBaseControl("ColdToleranceB");
ControlsEntity.HotToleranceA = GetBaseControl("HotToleranceA");
ControlsEntity.HotToleranceB = GetBaseControl("HotToleranceB");
}
private IBaseControl GetBaseControl(string name)
{
return McControls.First(x => x.Name == name) as IBaseControl;
}
private Button GetButtonControl(string name)
{
return McControls.First(x => x.Name == name) as Button;
}
}
}

@ -71,7 +71,6 @@ namespace Mesnac.Action.ChemicalWeighing
}
#endregion
#region 辅助方法
#region 刷新自定义设备变量

@ -51,7 +51,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
}
begin += 120;
begin += 178;
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -503,7 +503,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
List<Step> lsSteps = new List<Step>();
for (int i = 0; i < 10; i++)
{
var bytes = data.Skip(i * 10).Take(12).ToArray();
var bytes = data.Skip(i * 12).Take(12).ToArray();
Step step = new Step()
{
MixCode = byteTransform.TransInt16(bytes, 0),
@ -617,7 +617,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
begin += 10;
}
begin += 120;
//begin += 120;
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -640,7 +640,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
begin += 10;
}
begin += 20;
//begin += 20;
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];

@ -219,17 +219,15 @@
<Compile Include="Alarm\PmtAlarm\InsertAction.cs" />
<Compile Include="Alarm\PmtAlarm\ModifyAction.cs" />
<Compile Include="Alarm\PmtAlarm\SelectAction.cs" />
<Compile Include="AutoControl\ControlsHelper.cs" />
<Compile Include="AutoControl\DB\Auto_Log.cs" />
<Compile Include="AutoControl\DB\DeviceMaterrial.cs" />
<Compile Include="AutoControl\DB\DeviceMaterrialService.cs" />
<Compile Include="AutoControl\DB\StockMaterrialDBHelp.cs" />
<Compile Include="AutoControl\DryerWaterControl.cs" />
<Compile Include="AutoControl\Entity\DryerWaterControlsEntity.cs" />
<Compile Include="AutoControl\Entity\GelerWeterControlsEntity.cs" />
<Compile Include="AutoControl\GelerWeterControl.cs" />
<Compile Include="AutoControl\AutoControl.cs" />
<Compile Include="AutoControl\InitAction.cs" />
<Compile Include="AutoControl\RefreshAction.cs" />
<Compile Include="AutoControl\WaterInitAction.cs" />
<Compile Include="BaseDataHelper.cs" />
<Compile Include="BasePlcHelper.cs" />
<Compile Include="Basic\BasicHelper.cs" />

@ -2,34 +2,23 @@
<ActionService>
<Design>
<Path path="自动控制">
<Action action="E66872FC1EEB430A9EE462CCB102A87B">
<Caption>水称干混机控制</Caption>
<Remark>水称干混机控制</Remark>
</Action>
<Action action="DBE8193D41604AD5B94AE3C2D34751D2">
<Caption>湿混糊化机控制</Caption>
<Remark>湿混糊化机控制</Remark>
<Caption>自动控制按钮事件</Caption>
<Remark>自动控制按钮事件</Remark>
</Action>
<Action action="8A56C0B7BCE44AE6835221CAA3E1130E">
<Caption>湿混糊化界面初始化</Caption>
<Remark>湿混糊化界面初始化</Remark>
<Caption>自动界面初始化</Caption>
<Remark>自动界面初始化</Remark>
</Action>
<Action action="469F4DDEC2994D568465BEAB6F629E29">
<Caption>刷新事件</Caption>
<Remark>刷新事件</Remark>
</Action>
<Action action="4B774D9DDFA342EAA17F57800177E7DA">
<Caption>干混水称界面初始化</Caption>
<Remark>干混水称界面初始化</Remark>
</Action>
</Path>
</Design>
<DesignToRuntime>
<!--窗体初始化-->
<Design action="E66872FC1EEB430A9EE462CCB102A87B">
<Runtime action="6C980E4993D746979848D94624179632"/>
</Design>
<Design action="DBE8193D41604AD5B94AE3C2D34751D2">
<Runtime action="FBB09CEE7C71473B8717C735C1B7E320"/>
</Design>
@ -39,18 +28,13 @@
<Design action="469F4DDEC2994D568465BEAB6F629E29">
<Runtime action="469EE6B30E114E31B00113D69F86C036"/>
</Design>
<Design action="4B774D9DDFA342EAA17F57800177E7DA">
<Runtime action="2A5DE8E63DC94DFA882F94080FE43845"/>
</Design>
</DesignToRuntime>
<Runtime>
<Import assembly = "Data/Action/ChemicalWeighing/Mesnac.Action.ChemicalWeighing.dll">
<Action action="6C980E4993D746979848D94624179632" class="Mesnac.Action.ChemicalWeighing.AutoControl.DryerWaterControl"/>
<Action action="FBB09CEE7C71473B8717C735C1B7E320" class="Mesnac.Action.ChemicalWeighing.AutoControl.GelerWeterControl"/>
<Action action="FBB09CEE7C71473B8717C735C1B7E320" class="Mesnac.Action.ChemicalWeighing.AutoControl.AutoControl"/>
<Action action="1B0FD7B35DBC4677B4A791B8224C68DA" class="Mesnac.Action.ChemicalWeighing.AutoControl.InitAction"/>
<Action action="469EE6B30E114E31B00113D69F86C036" class="Mesnac.Action.ChemicalWeighing.AutoControl.RefreshAction"/>
<Action action="2A5DE8E63DC94DFA882F94080FE43845" class="Mesnac.Action.ChemicalWeighing.AutoControl.WaterInitAction"/>
</Import>
</Runtime>
</ActionService>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save