From c29cd36f584338731704b1eaf3d34ea47908e0e5 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 22 十二月 2020 13:38:39 +0800 Subject: [PATCH] 2020-12-22-3 --- HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 30 +++++---------- .vs/HDL_APP_Project/xs/sqlite3/storage.ide | 0 .vs/HDL_APP_Project/xs/UserPrefs.xml | 3 - HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 36 ++++++++++++++++-- .vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal | 0 5 files changed, 43 insertions(+), 26 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 851e97e..ae3eaf0 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -2,7 +2,7 @@ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs"> <Files> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="475" Column="48" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs" Line="507" Column="49" /> <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="1" Column="1" /> </Files> <Pads> @@ -20,7 +20,6 @@ <Node name="UI2" expanded="True"> <Node name="3-Intelligence" expanded="True"> <Node name="Automation" expanded="True"> - <Node name="LogicView" expanded="True" /> <Node name="InpOrOutLogicMethod.cs" selected="True" /> </Node> </Node> diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide index f04cb7c..bddde4a 100644 --- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide +++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide Binary files differ diff --git a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal index 3f90d17..5807bb3 100644 --- a/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal +++ b/.vs/HDL_APP_Project/xs/sqlite3/storage.ide-wal Binary files differ diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 2968b81..350280b 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -173,7 +173,7 @@ /// <param name="viewLayout">涓婁笅婊戝姩鎺т欢</param> public static void OutputTarget(FrameLayout thisView, VerticalScrolViewLayout viewLayout) { - + for (int i = 0; i < Logic.currlogic.output.Count; i++) { Output outputTarget = Logic.currlogic.output[i]; @@ -230,33 +230,23 @@ { string on_off = GetKeyValue("on_off", dicList); string brightness = GetKeyValue("brightness", dicList); - if (on_off != "") + if (on_off == "on" && brightness != "") { - if (on_off == "on") - { - stateStr = Language.StringByID(StringId.onLogic); - - } - else - { - stateStr = Language.StringByID(StringId.offLogic); - - } + stateStr = Language.StringByID(StringId.onLogic) + brightness + "%"; } - if (brightness != "") + else if (on_off == "on") { - stateStr += brightness + "%"; + stateStr = Language.StringByID(StringId.onLogic); } - if (on_off != "" && on_off == "off") + else if (on_off == "off") { - targetView.btnState.Text = Language.StringByID(StringId.offLogic); + stateStr = Language.StringByID(StringId.offLogic); } - else + else if (brightness != "") { - targetView.btnState.Text = stateStr; - + stateStr = brightness + "%"; } - + targetView.btnState.Text = stateStr; } break; case FunctionType.Curtain: diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs index a7be412..010aa10 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs @@ -481,10 +481,10 @@ { //绉婚櫎鍒楄〃鎵�鏈夋暟鎹� dicSateteList.Clear(); - //閲嶆柊娣诲姞寮�鍏夊睘鎬ф暟鎹� + //閲嶆柊娣诲姞-鍏�-灞炴�ф暟鎹� Dictionary<string, string> diction = new Dictionary<string, string>(); diction.Add("key", "on_off"); - diction.Add("value", "on_off"); + diction.Add("value", "off"); dicSateteList.Add(diction); break; } @@ -493,6 +493,34 @@ } break; } + case FunctionType.AC: + case FunctionType.FloorHeating: + { + + //(绌鸿皟/鍦扮儹)鍋氫簡涓�涓壒娈婂鐞嗭紱 + bool _bool = false; + for (int i = 0; i < dicSateteList.Count; i++) + { + var dic = dicSateteList[i]; + if (dic.ContainsValue("on_off")) + { + //鍒ゆ柇鏄惁瀛樺湪 + _bool = true; + break; + } + } + if (!_bool) + { + //娌℃湁寮�鍏冲氨榛樿娣诲姞-寮�-灞炴�� + Dictionary<string, string> diction = new Dictionary<string, string>(); + diction.Add("key", "on_off"); + diction.Add("value", "on"); + dicSateteList.Add(diction); + } + + + } + break; } outputDevice.status = dicSateteList; @@ -739,7 +767,7 @@ LogicView.BrightnessView brightness = new LogicView.BrightnessView(); brightness.FLayoutView(frame, titleName, button.Text, (brightnesValue) => { - button.Text = brightnesValue; + button.Text = brightnesValue+"%"; Dictionary<string, string> dic = new Dictionary<string, string>(); string keyVlaue = ""; switch (device.functionType) @@ -841,7 +869,7 @@ case "brightness": { - button2.Text = value; + button2.Text = value+"%"; } break; } -- Gitblit v1.8.0