From 9c6bd67d66859e48f0e794cd2746aef9310ce71d Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期五, 13 十二月 2019 18:01:37 +0800
Subject: [PATCH] 2019-12-13-2

---
 ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs |   44 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
index f78d342..5ee0d16 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -36,14 +36,15 @@
 
             var titleName = new Button
             {
-                TextSize = 16,
+                TextSize = 17,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 TextAlignment = TextAlignment.CenterLeft,
                 X = Application.GetRealWidth(176),
-                Width = Application.GetRealWidth(400),
+                Width = Application.GetRealWidth(600),
                 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,
             });
 
@@ -301,6 +303,7 @@
                         TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                         TextID = MyInternationalizationString.addconditions,
                         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);
+                                                                devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
 
                                                             }
                                                             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.closetime);
+
+                                                                }
+                                                                if (minute != 0 && second == 0)
+                                                                {
+                                                                    devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
+
+                                                                }
+
                                                             }
                                                         }
                                                     }
@@ -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);
@@ -602,6 +617,7 @@
                         TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
                         TextID = MyInternationalizationString.addfunction,
                         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);
 
@@ -1157,6 +1178,7 @@
                 Width = Application.GetRealWidth(300),
                 Height = Application.GetRealHeight(60),
                 Gravity = Gravity.CenterVertical,
+                TextSize = 14,
             };
             custompushRowLayout.AddChidren(btncustompush);
 
@@ -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