diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/ControlBoardButtonAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/ControlBoardButtonAction.cs index 63d77dd..4773892 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/ControlBoardButtonAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/ControlBoardButtonAction.cs @@ -240,7 +240,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard { string name = MotorSelect.Text; string str = MotorSelect.MCValue.ToString(); - byte byt = ControlsHelper.ReadMode(name); + byte byt = ControlsHelper.ReadMode(str); int value = Convert.ToInt32(str); if (value <= 32) { @@ -281,60 +281,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard } } - - - } - - if (runtime.Sender == ButtonE.AutoModeOnOff) - { - string name = MotorSelect.Text; - string str = MotorSelect.MCValue.ToString(); - byte byt = ControlsHelper.ReadMode(name); - int value = Convert.ToInt32(str); - if (value <= 32) - { - if (byt.GetBit(5)) - { - if (MessageBox.Show($"确认开启{name}的自动模式?", "电机模式切换确认", MessageBoxButtons.YesNo) == DialogResult.No) - { - return; - } - ControlsHelper.WriteModeP2(str, true); - } - else - { - if (MessageBox.Show($"确认关闭{name}的自动模式?", "电机模式切换确认", MessageBoxButtons.YesNo) == DialogResult.No) - { - return; - } - ControlsHelper.WriteModeP2(str, false); - } - } - else - { - if (byt.GetBit(3)) - { - if (MessageBox.Show($"确认开启{name}的自动模式?", "电机模式切换确认", MessageBoxButtons.YesNo) == DialogResult.No) - { - return; - } - ControlsHelper.WriteModeP1(str, true); - } - else - { - if (MessageBox.Show($"确认关闭{name}的自动模式?", "电机模式切换确认", MessageBoxButtons.YesNo) == DialogResult.No) - { - return; - } - ControlsHelper.WriteModeP1(str, false); - } - } - - - } - } private void SetAllControls() diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/Entity/ControlBoardEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/Entity/ControlBoardEntity.cs index 857422b..d9e16d0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/Entity/ControlBoardEntity.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/Entity/ControlBoardEntity.cs @@ -28,14 +28,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard.Entity public MCButton SwitchAutoMode { get; set; } public MCButton SwitchManualMode { get; set; } public MCButton ManualModeOnOff { get; set; } - public MCButton AutoModeOnOff { get; set; } + //public MCButton AutoModeOnOff { get; set; } } public class MCLabelEntity { public MCLabel NowMode { get; set; } - public MCLabel NowAuto { get; set; } + //public MCLabel NowAuto { get; set; } public MCLabel NowManual { get; set; } } diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/InitAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/InitAction.cs index 91b8acf..3ff4bf1 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/InitAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDeliverControlBoard/InitAction.cs @@ -239,28 +239,28 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard dataTable.Rows.Add(dr); dr = dataTable.NewRow(); dr[0] = "22"; - dr[1] = "磨粉主机电机主接触器"; - dataTable.Rows.Add(dr); - dr = dataTable.NewRow(); - dr[0] = "24"; - dr[1] = "磨粉主机电机星型接触器"; - dataTable.Rows.Add(dr); - dr = dataTable.NewRow(); - dr[0] = "26"; - dr[1] = "磨粉主机电机三角型接触器"; + dr[1] = "磨粉主机电机"; //主接触器 dataTable.Rows.Add(dr); + //dr = dataTable.NewRow(); + //dr[0] = "24"; + //dr[1] = "磨粉主机电机星型接触器"; + //dataTable.Rows.Add(dr); + //dr = dataTable.NewRow(); + //dr[0] = "26"; + //dr[1] = "磨粉主机电机三角型接触器"; + //dataTable.Rows.Add(dr); dr = dataTable.NewRow(); dr[0] = "28"; - dr[1] = "磨粉风机机电机主接触器"; - dataTable.Rows.Add(dr); - dr = dataTable.NewRow(); - dr[0] = "30"; - dr[1] = "磨粉风机机电机星型接触器"; - dataTable.Rows.Add(dr); - dr = dataTable.NewRow(); - dr[0] = "32"; - dr[1] = "磨粉风机机电机三角型接触器"; + dr[1] = "磨粉风机电机"; //主接触器 dataTable.Rows.Add(dr); + //dr = dataTable.NewRow(); + //dr[0] = "30"; + //dr[1] = "磨粉风机机电机星型接触器"; + //dataTable.Rows.Add(dr); + //dr = dataTable.NewRow(); + //dr[0] = "32"; + //dr[1] = "磨粉风机机电机三角型接触器"; + //dataTable.Rows.Add(dr); dr = dataTable.NewRow(); dr[0] = "34"; dr[1] = "筛分机 A 电机"; @@ -325,18 +325,18 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard LabelE.NowManual.MCValue = "未设置"; } - if (!byt.GetBit(4) && byt.GetBit(5)) - { - LabelE.NowAuto.MCValue = "关闭"; - } - else if (byt.GetBit(4) && !byt.GetBit(5)) - { - LabelE.NowAuto.MCValue = "开启"; - } - else - { - LabelE.NowAuto.MCValue = "未设置"; - } + //if (!byt.GetBit(4) && byt.GetBit(5)) + //{ + // LabelE.NowAuto.MCValue = "关闭"; + //} + //else if (byt.GetBit(4) && !byt.GetBit(5)) + //{ + // LabelE.NowAuto.MCValue = "开启"; + //} + //else + //{ + // LabelE.NowAuto.MCValue = "未设置"; + //} } else { @@ -353,18 +353,18 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliverControlBoard LabelE.NowMode.MCValue = "未设置"; } - if (!byt.GetBit(2) && byt.GetBit(3)) - { - LabelE.NowAuto.MCValue = "关闭"; - } - else if (byt.GetBit(2) && !byt.GetBit(3)) - { - LabelE.NowAuto.MCValue = "开启"; - } - else - { - LabelE.NowAuto.MCValue = "未设置"; - } + //if (!byt.GetBit(2) && byt.GetBit(3)) + //{ + // LabelE.NowAuto.MCValue = "关闭"; + //} + //else if (byt.GetBit(2) && !byt.GetBit(3)) + //{ + // LabelE.NowAuto.MCValue = "开启"; + //} + //else + //{ + // LabelE.NowAuto.MCValue = "未设置"; + //} if (!byt.GetBit(4) && byt.GetBit(5)) { diff --git a/Main/MCEdit/Data/MCProject/nodeForm/DeliverControlBoard.xml b/Main/MCEdit/Data/MCProject/nodeForm/DeliverControlBoard.xml index 4b378d8..9ab25b8 100644 --- a/Main/MCEdit/Data/MCProject/nodeForm/DeliverControlBoard.xml +++ b/Main/MCEdit/Data/MCProject/nodeForm/DeliverControlBoard.xml @@ -17,7 +17,7 @@ True 未设置 宋体, 12pt - 212, 238 + 212, 187 NowManual 56, 16 @@ -37,30 +37,10 @@ True 当前状态: 宋体, 12pt - 134, 238 + 134, 187 MCLabel77 88, 16 - - - - Red - DarkGray - - - False - - - - None - True - True - 未设置 - 宋体, 12pt - 212, 186 - NowAuto - 56, 16 - AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAAC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mFja2luZ0ZpZWxkFzxSZW1hcms+a19fQmFja2luZ0ZpZWxkAQEBAgAAAAYFAAAAIDZCOEFDN0I0QjQ2QzQxMjZBMjk1RjVCQzJCQkIyQzAyBgYAAAAM5oyJ6ZKu5LqL5Lu2BgcAAAAM5oyJ6ZKu5LqL5Lu2Cw== - - - - False - - - - None - True - True - False - - - Red - DarkGray - MiddleRight - 自动模式开关 - 宋体, 12pt - 6, 171 - AutoModeOnOff - 122, 46 - 127 - - - - - Red - DarkGray - - - False - - - - None - True - True - 当前状态: - 宋体, 12pt - 134, 186 - MCLabel79 - 88, 16 - @@ -200,7 +134,7 @@ 124 - True + False AAEAAAD/////AQAAAAAAAAAMAgAAAE5NZXNuYWMuQ29udHJvbHMuRGVmYXVsdCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuRGVmYXVsdC5Db21ib2JveEl0ZW1zLCBNZXNuYWMuQ29udHJvbHMuRGVmYXVsdCwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAJ01lc25hYy5Db250cm9scy5EZWZhdWx0LkNvbWJvYm94SXRlbXNbXQIAAAAICAkDAAAAAAAAAAAAAAAHAwAAAAABAAAAAAAAAAQlTWVzbmFjLkNvbnRyb2xzLkRlZmF1bHQuQ29tYm9ib3hJdGVtcwIAAAAL @@ -256,7 +190,7 @@ 电机手动控制 1403, 13 GroupBox13 - 285, 275 + 285, 224 115