From 2bec9c838d2d688025698de8ec1de401ffd7dd1f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 11 八月 2020 14:13:55 +0800 Subject: [PATCH] 20200811 --- HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs index 1b0f8e9..1fdc955 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs @@ -153,7 +153,10 @@ continue; } f.on_off = "off"; - Control.Send(CommandType_A.write, f); + //Control.Send(CommandType_A.write, f); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + d.Add("on_off", f.on_off.ToString()); + Control.SendWriteCommand(f, d); } btn.Visible = false; }; @@ -254,7 +257,10 @@ foreach(var f in DB_ResidenceData.residenceData.functionList.aCs) { f.on_off = btn.IsSelected ? "on" : "off"; - Control.Send(CommandType_A.write, f); + //Control.Send(CommandType_A.write, f); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + d.Add("on_off", f.on_off.ToString()); + Control.SendWriteCommand(f, d); } break; case ShowFunction.Curtain: @@ -264,7 +270,10 @@ foreach (var f in DB_ResidenceData.residenceData.functionList.lights) { f.on_off = btn.IsSelected ? "on" : "off"; - Control.Send(CommandType_A.write, f); + //Control.Send(CommandType_A.write, f); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + d.Add("on_off", f.on_off.ToString()); + Control.SendWriteCommand(f, d); } break; } @@ -289,7 +298,10 @@ foreach (var f in DB_ResidenceData.residenceData.functionList.curtains) { f.on_off = "on"; - Control.Send(CommandType_A.write, f); + //Control.Send(CommandType_A.write, f); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + d.Add("on_off", f.on_off.ToString()); + Control.SendWriteCommand(f, d); } }; @@ -304,7 +316,10 @@ foreach (var f in DB_ResidenceData.residenceData.functionList.curtains) { f.on_off = "off"; - Control.Send(CommandType_A.write, f); + //Control.Send(CommandType_A.write, f); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + d.Add("on_off", f.on_off.ToString()); + Control.SendWriteCommand(f, d); } }; -- Gitblit v1.8.0