diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DryerWaterControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DryerWaterControl.cs index df308c8..26cbe9a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DryerWaterControl.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DryerWaterControl.cs @@ -49,6 +49,11 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl { 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(); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs index 761b0d0..527fe78 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs @@ -41,6 +41,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity public IBaseControl WetOutDelayTime { get; set; } public IBaseControl ManualWeight { get; set; } public IBaseControl ManualTolerance { get; set; } + public IBaseControl State1 { get; set; } + public IBaseControl State2 { get; set; } + public IBaseControl State3 { get; set; } + public IBaseControl State4 { get; set; } + public IBaseControl State5 { get; set; } + public IBaseControl State6 { get; set; } + public IBaseControl State7 { get; set; } + public IBaseControl State8 { get; set; } public Button WetManualControl { get; set; } public Button Download { get; set; } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs index 06f69bf..21b06b6 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/InitAction.cs @@ -24,6 +24,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl private List McControls; Color backColor = Color.Transparent; + public Timer timer; + public void Run(RuntimeParameter runtime) { @@ -46,6 +48,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl ControlInitFromPLC(); + timer = new Timer(); + timer.Interval = 1000; + timer.Enabled = true; + //timer.Tick += new EventHandler(StateRefresh);//添加事件 + } + + private void StateRefresh(object sender, EventArgs e) + { + if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0) + { + timer.Stop(); + timer.Dispose(); + } + + } private void Mcradion_CheckedChanged(object sender, EventArgs e) diff --git a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml index d7e7def..284e928 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml @@ -20,7 +20,7 @@ DarkGray 停止 宋体, 12pt - 733, 500 + 733, 533 LineStop 168, 56 7 @@ -45,7 +45,7 @@ DarkGray 开始 宋体, 12pt - 733, 438 + 733, 471 LineStart 168, 56 6 @@ -70,12 +70,332 @@ DarkGray 下传 宋体, 12pt - 733, 94 + 733, 127 Download 168, 56 8 + + + + + Red + DarkGray + + + False + + + + None + True + True + + 825, 61 + State8 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 776, 61 + MCLabel37 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 715, 61 + State7 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 666, 61 + MCLabel39 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 605, 61 + State6 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 556, 61 + MCLabel41 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 495, 61 + State5 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 446, 61 + MCLabel43 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 385, 61 + State4 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 336, 61 + MCLabel45 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 275, 61 + State3 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 226, 61 + MCLabel47 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + + 165, 61 + State2 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 116, 61 + MCLabel49 + 56, 16 + + + + + + Red + DarkGray + + + False + + + + QueryAndModify + True + True + + 55, 61 + State1 + 24, 16 + + + + + + Red + DarkGray + + + False + + + + None + True + True + 状态: + 6, 61 + MCLabel52 + 56, 16 + AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAEAAAAEAAAABwMAAAAAAQAAAAQAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAJBAAAAA0DBQQAAAAhTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uAwAAABU8R1VJRD5rX19CYWNraW5nRmllbGQVPE5hbWU+a19fQmFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDQ2OUY0RERFQzI5OTRENTY4NDY1QkVBQjZGNjI5RTI5BgYAAAAM5Yi35paw5LqL5Lu2BgcAAAAM5Yi35paw5LqL5Lu2Cw== @@ -249,7 +569,7 @@ 宋体, 12pt 12, 12 GroupBox34 - 889, 65 + 889, 98 10 @@ -1384,7 +1704,7 @@ False 产线 宋体, 12pt - 12, 83 + 12, 116 GroupBox1 715, 478 9 @@ -1405,7 +1725,7 @@ False False Control - 928, 610 + 928, 641 WindowsDefaultLocation 湿混糊化自动参数控制 Normal