From 2ec9898778d3beda89278e2a53ac0e68b3035d29 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 01 七月 2020 15:06:24 +0800
Subject: [PATCH] 2020-7-1-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs |   44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
index 57045c8..d937307 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -426,6 +426,44 @@
 
                                                     }
                                                     break;
+                                                case 541:
+                                                    {
+                                                        if (conditions["Cluster_ID"] == "1024") {
+                                                            state = Language.StringByID(MyInternationalizationString.ambientLight)+"<"+conditions["AttriButeData1"]+"lux"+ Language.StringByID(MyInternationalizationString.hour1);
+                                                        }
+                                                        else
+                                                        {
+                                                            if (conditions.ContainsKey("IgnoreTime"))
+                                                            {
+                                                                int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+                                                                int second = int.Parse(conditions["IgnoreTime"]) % 60;
+                                                                if (minute != 0 && second != 0)
+                                                                {
+                                                                    state = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+                                                                else
+                                                                {
+                                                                    if (minute == 0 && second != 0)
+                                                                    {
+                                                                        state = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                    }
+                                                                    if (minute != 0 && second == 0)
+                                                                    {
+                                                                        state = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                    }
+
+                                                                }
+                                                            }
+                                                            else
+                                                            {
+                                                                state = Language.StringByID(MyInternationalizationString.someone);
+                                                            }
+                                                        }
+                                                    }
+                                                    break;
                                                 default:
                                                     {
                                                         if (intvalue == "1")
@@ -593,6 +631,7 @@
                         selecteddevice.selecetddevicestateBtn.Text = state;
                     }
                     ///缂栬緫
+                    selecteddevice.edit.Tag = i.ToString();
                     selecteddevice.edit.MouseUpEventHandler += (sender, e) =>
                     {
                         switch (Type)
@@ -625,7 +664,7 @@
                                     {
                                         var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                                         this.AddChidren(flMain);
-                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_logic");
+                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "condition_logic",int.Parse(selecteddevice.edit.Tag.ToString()));
                                     }
                                     else
                                     {
@@ -1193,6 +1232,7 @@
                         actiondevice.selecetddevicestateBtn.Text = state;
                     }
                     ///缂栬緫
+                    actiondevice.edit.Tag = i.ToString();
                     actiondevice.edit.MouseUpEventHandler += (sender, e) =>
                     {
                         switch (linkType)
@@ -1205,7 +1245,7 @@
                                     {
                                         var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
                                         this.AddChidren(flMain);
-                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_logic");
+                                        CurrentDeviceState.CurrentDeviceView(flMain, deviceinof, true, "action_logic",int.Parse(actiondevice.edit.Tag.ToString()));
                                     }
                                     else
                                     {

--
Gitblit v1.8.0