From 94101f3a1ddd50400032b814ec4be0beadfe0eda Mon Sep 17 00:00:00 2001 From: nodyang Date: Thu, 14 Sep 2023 08:44:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Test/TestAction.cs | 24 ++++++-- Main/MCEdit/Data/MCProject/nodeDataSource.xml | 2 +- Main/MCEdit/Data/MCProject/nodeDevice.xml | 60 +++++++++---------- Main/MCEdit/Data/MCProject/nodeForm/Form1.xml | 2 +- 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs index a6eed98..0a919a3 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs @@ -30,6 +30,13 @@ namespace Mesnac.Action.ChemicalWeighing.Test { public class TestAction : DatabaseAction, IAction { + + public void timer1EventProcessor(object source, EventArgs e) + { + this.startdate.MCValue = DateTime.Now.ToString(); + } + + IBaseControl startdate; public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须调用 @@ -50,21 +57,26 @@ namespace Mesnac.Action.ChemicalWeighing.Test var s1 = BasePlcHelper.Instance.dryerA_dos0_eqNo.LastValue.ToInt(); int[] ssss = new int [] { }; var ss2s = BasePlcHelper.Instance.PlcReadByRunName("BU1BLT01_Set", out ssss); - - FrmWeiRecipeDataAdd Form = new FrmWeiRecipeDataAdd(1); - Form.Show(); - - + List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.None);//获取所有待初始化控件 + + startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "MCLabel153".ToLower()).FirstOrDefault().BaseControl; + + + Timer timer1 = new Timer(); + timer1.Interval = 1000; + timer1.Enabled = true; + timer1.Tick += new EventHandler(timer1EventProcessor);//添加事件 + //ParametersWithPc.B1.FirstWord 256 768 //badc1el26587193265870 - + // // var instanceDryer0Speeds = BasePlcHelper.Instance.Dryer0_speed; // diff --git a/Main/MCEdit/Data/MCProject/nodeDataSource.xml b/Main/MCEdit/Data/MCProject/nodeDataSource.xml index 32d0662..3600a0d 100644 --- a/Main/MCEdit/Data/MCProject/nodeDataSource.xml +++ b/Main/MCEdit/Data/MCProject/nodeDataSource.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml index 74215d3..6718b7e 100644 --- a/Main/MCEdit/Data/MCProject/nodeDevice.xml +++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml @@ -13,7 +13,7 @@ - + @@ -772,35 +772,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3962,7 +3958,7 @@ - + @@ -5295,7 +5291,7 @@ - + diff --git a/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml b/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml index 6474617..e31a537 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/Form1.xml @@ -736,7 +736,7 @@ 1769, 1061 - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsI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