From 0480792bde7bcf770290ba3414bd615e563e7b43 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 24 十二月 2019 15:46:00 +0800
Subject: [PATCH] 2019-12-24-02

---
 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs |   74 +++++++++++++++++++++++++------------
 1 files changed, 50 insertions(+), 24 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
index b761c62..0bb6882 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -36,7 +36,7 @@
 
             var titleName = new Button
             {
-                TextSize = 16,
+                TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth(176),
@@ -44,6 +44,7 @@
                 Height = Application.GetRealHeight(69),
                 Y = Application.GetRealHeight(92),
                 TextID = MyInternationalizationString.selection,
+                IsBold = true,
             };
             topRowLayout.AddChidren(titleName);
             if (Common.Logic.CurrentLogic.LogicId != 0)
@@ -131,18 +132,19 @@
                 TextID = MyInternationalizationString.automationname,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 Y = Application.GetRealHeight(35),
+                TextSize = 15,
             };
             logicnamefl.AddChidren(text);
 
             logicTextBox = new EditText
             {
                 Y = Application.GetRealHeight(35),
-                Width = Application.GetRealWidth(900),
+                Width = Application.GetRealWidth(1080 - 58 - 300),
                 Height = Application.GetRealHeight(60),
                 X = text.Right,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
-                TextSize = 13,
+                TextSize = 14,
                 Text = Common.Logic.CurrentLogic.LogicName,
                 //TextID=MyInternationalizationString.automation1,
             };
@@ -185,7 +187,7 @@
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 Width = Application.GetRealWidth(300),
                 Height = Application.GetRealHeight(60),
-                TextSize = 16,
+                TextSize = 15,
                 Gravity = Gravity.CenterVertical,
             });
 
@@ -299,8 +301,9 @@
                         Width = Application.GetRealWidth(300),
                         Y = Application.GetRealHeight(45 + 30),
                         TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-                        TextID = MyInternationalizationString.addconditions,
+                        TextID = MyInternationalizationString.addsensor,
                         X = Application.GetRealWidth(390),
+                        TextSize = 14,
                     };
                     addfl.AddChidren(addtextbtn);
 
@@ -374,6 +377,7 @@
                                     TextAlignment = TextAlignment.CenterLeft,
                                     Text = deviceinof.DeviceEpointName,
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                                    TextSize = 14,
                                 };
                                 conditionsRowLayout.AddChidren(btndevice);
 
@@ -416,6 +420,7 @@
                                     TextAlignment = TextAlignment.CenterRight,
                                     X = Application.GetRealWidth(400),
                                     TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                                    TextSize = 14,
                                 };
                                 conditionsRowLayout.AddChidren(devicestatus);
 
@@ -437,14 +442,24 @@
                                                         {
                                                             int minute = int.Parse(conditions["IgnoreTime"]) / 60;
                                                             int second = int.Parse(conditions["IgnoreTime"]) % 60;
-                                                            if (second != 0)
+                                                            if (minute != 0 && second != 0)
                                                             {
                                                                 devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
 
                                                             }
                                                             else
                                                             {
-                                                                devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+                                                                if (minute == 0 && second != 0)
+                                                                {
+                                                                    devicestatus.Text = second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+                                                                if (minute != 0 && second == 0)
+                                                                {
+                                                                    devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+                                                                }
+
                                                             }
                                                         }
                                                     }
@@ -532,7 +547,7 @@
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 Width = Application.GetRealWidth(300),
                 Height = Application.GetRealHeight(60),
-                TextSize = 16,
+                TextSize = 15,
                 Gravity = Gravity.CenterVertical,
             };
             targetRowLayout.AddChidren(btntargettitle);
@@ -600,8 +615,9 @@
                         Width = Application.GetRealWidth(300),
                         Y = Application.GetRealHeight(45 + 30),
                         TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
-                        TextID = MyInternationalizationString.addfunction,
+                        TextID = MyInternationalizationString.addlighting,
                         X = Application.GetRealWidth(390),
+                        TextSize = 14,
                     };
                     addfl.AddChidren(addtextbtn);
                     EventHandler<MouseEventArgs> addfunctionclick = (sender, e) =>
@@ -672,6 +688,7 @@
                                     TextAlignment = TextAlignment.CenterLeft,
                                     Text = deviceinof.DeviceEpointName,
                                     TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                                    TextSize = 14,
                                 };
                                 actionsrowLayout.AddChidren(btndevicename);
 
@@ -697,6 +714,7 @@
                                     TextAlignment = TextAlignment.CenterRight,
                                     X = Application.GetRealWidth(450),
                                     TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                                    TextSize = 14,
                                 };
                                 actionsrowLayout.AddChidren(devicestatus);
 
@@ -1033,6 +1051,7 @@
                 Width = Application.GetRealWidth(300),
                 Height = Application.GetRealHeight(60),
                 Gravity = Gravity.CenterVertical,
+                TextSize = 14,
             };
             weekRowLayout.AddChidren(settxet);
             var btnweektext = new Button
@@ -1045,6 +1064,7 @@
                 TextID = MyInternationalizationString.everyday,
                 Y = Application.GetRealHeight(35),
                 X = settxet.Right,
+                TextSize = 14,
             };
             weekRowLayout.AddChidren(btnweektext);
 
@@ -1105,6 +1125,7 @@
                 Height = Application.GetRealHeight(60),
                 Gravity = Gravity.CenterVertical,
                 TextID = MyInternationalizationString.pushswitch,
+                TextSize = 14,
             };
             pushswitchRowlayout.AddChidren(btnswitchtxet);
 
@@ -1118,23 +1139,12 @@
                 Gravity = Gravity.CenterVertical,
             };
             pushswitchRowlayout.AddChidren(btnswitch);
-            btnswitch.MouseUpEventHandler += (sender1, e1) =>
-            {
-                btnswitch.IsSelected = !btnswitch.IsSelected;
-                if (btnswitch.IsSelected)
-                {
-
-                }
-                else
-                {
-
-                }
-            };
+          
 
 
             var custompushFrameLayout = new FrameLayout
             {
-                Height = Application.GetRealHeight(160),
+                Height = Application.GetRealHeight(0),
                 BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
             };
             middle.AddChidren(custompushFrameLayout);
@@ -1157,6 +1167,7 @@
                 Width = Application.GetRealWidth(300),
                 Height = Application.GetRealHeight(60),
                 Gravity = Gravity.CenterVertical,
+                TextSize = 14,
             };
             custompushRowLayout.AddChidren(btncustompush);
 
@@ -1184,7 +1195,18 @@
 
             #endregion
 
-
+            btnswitch.MouseUpEventHandler += (sender1, e1) =>
+            {
+                btnswitch.IsSelected = !btnswitch.IsSelected;
+                if (btnswitch.IsSelected)
+                {
+                    custompushFrameLayout.Height = Application.GetRealHeight(160);
+                }
+                else
+                {
+                    custompushFrameLayout.Height = Application.GetRealHeight(0);
+                }
+            };
             var saveFrameLayout = new FrameLayout
             {
                 Y = middle.Bottom,
@@ -1200,7 +1222,7 @@
                 Width = Application.GetRealWidth(910),
                 Radius = (uint)Application.GetRealHeight(60),
                 BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
-                TextID = MyInternationalizationString.Save,
+                TextID = MyInternationalizationString.application,
                 TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
             };
             saveFrameLayout.AddChidren(btnsave);
@@ -1559,6 +1581,7 @@
                 Width = Application.GetRealWidth(200),
                 X = Application.GetRealWidth(80),
                 TextAlignment = TextAlignment.CenterLeft,
+                TextSize = 14,
             };
             timetype.AddChidren(Btncancel);
             Btncancel.MouseUpEventHandler += (sender16, e16) =>
@@ -1586,6 +1609,7 @@
                 Width = Application.GetRealWidth(200),
                 TextAlignment = TextAlignment.CenterRight,
                 X = Btntitle.Right + Application.GetRealWidth(100),
+                TextSize = 14,
 
             };
             timetype.AddChidren(Btncomplete);
@@ -1621,6 +1645,7 @@
                 TextID = MyInternationalizationString.Allconditions,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+                TextSize = 14,
 
             };
             androw.AddChidren(andbtn);
@@ -1656,6 +1681,7 @@
                 TextID = MyInternationalizationString.anycondition,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+                TextSize = 14,
             };
             orrow.AddChidren(orbtn);
 

--
Gitblit v1.8.0