From f6e34a69f1d1e0b0b3a6252fe20acddca7fe56e5 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期二, 17 三月 2020 15:43:44 +0800
Subject: [PATCH] 2020-03-17-1

---
 ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs |   77 ++++++++------------------------------
 1 files changed, 17 insertions(+), 60 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
old mode 100644
new mode 100755
index 63dae7a..867e73b
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
@@ -17,67 +17,24 @@
             Tag = "Logic";
         }
 
-        public void Show(int isInt=0, bool edit=false)
+        public void Show(int isInt = 0, bool edit = false)
         {
 
-            #region  鏈�涓婇潰鐨勫竷灞�浠g爜
-            var topRowLayout = new RowLayout
-            {
-                BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
-                Height = Application.GetRealHeight(184),
-                LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
-            };
-            this.AddChidren(topRowLayout);
 
-            var titleName = new Button
-            {
-                TextSize = 17,
-                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-                TextAlignment = TextAlignment.CenterLeft,
-                X = Application.GetRealWidth(176),
-                Width = Application.GetRealWidth(400),
-                Height = Application.GetRealHeight(69),
-                Y = Application.GetRealHeight(92),
-                TextID = MyInternationalizationString.adddelay,
-            };
-            topRowLayout.AddChidren(titleName);
-
-            var clickBtn = new Button
-            {
-                Width = Application.GetRealWidth(81 + 51),
-                Height = Application.GetRealHeight(58 + 40),
-                Y = Application.GetRealHeight(98 - 40),
-            };
-            topRowLayout.AddChidren(clickBtn);
-            clickBtn.MouseDownEventHandler += (sender, e) =>
-            {
-                RemoveFromParent();
-            };
-
-            var back = new Button
-            {
-                Width = Application.GetRealWidth(30),
-                Height = Application.GetRealHeight(51),
-                X = Application.GetRealWidth(81),
-                Y = Application.GetRealHeight(98),
-                //Gravity = Gravity.CenterVertical;
-                UnSelectedImagePath = "ZigeeLogic/back.png",
-            };
-            topRowLayout.AddChidren(back);
-            back.MouseDownEventHandler += (sender, e) =>
-            {
-                RemoveFromParent();
-            };
+            #region  涓婇潰鐨勫竷灞�浠g爜
+            TopView view = new TopView();
+            this.AddChidren(view.TopRowView());
+            view.toptitleNameBtn.TextID = MyInternationalizationString.adddelay;
+            view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
             #endregion
 
             var middle = new FrameLayout
             {
-                Y = topRowLayout.Bottom,
+                Y = view.topRowLayout.Bottom,
                 Height = Application.GetRealHeight(1920 - 184),
                 BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
             };
             this.AddChidren(middle);
-
 
             var blancolor = new FrameLayout
             {
@@ -110,11 +67,11 @@
             color.AddChidren(btnicon);
             var titleText = new Button
             {
-                Width = Application.GetMinRealAverage(480),
+                Width = Application.GetMinRealAverage(580),
                 Height = Application.GetMinRealAverage(60),
-                X = Application.GetRealWidth(300),
+                X = Application.GetRealWidth(250),
                 Y = blancolor.Bottom + Application.GetRealHeight(50),
-                TextID =MyInternationalizationString.createtimetext,
+                TextID = MyInternationalizationString.createtimetext,
                 TextColor = ZigbeeColor.Current.LogicTextBlackColor,
                 TextSize = 15,
 
@@ -129,7 +86,6 @@
             };
             middle.AddChidren(PickerViewfra);
             PickerViewfra.SetCornerWithSameRadius(Application.GetRealHeight(50), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
-            
 
             var mUIPickerView = new UIPickerView
             {
@@ -162,7 +118,7 @@
             int value = 0;
             if (edit)
             {
-                
+
                 timevalue = int.Parse(Common.Logic.CurrentLogic.Actions[isInt]["DelayTime"].ToString());
                 if (timevalue > 3600)
                 {
@@ -177,7 +133,7 @@
                     //鏇存柊鏈�鏂扮姸鎬�
                     mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0);
                 }
-             
+
                 value = timevalue;
             }
             string selectde = "";
@@ -190,7 +146,6 @@
 
             };
 
-
             var btnsave = new Button
             {
                 Y = PickerViewfra.Height - Application.GetRealHeight(260),
@@ -201,6 +156,7 @@
                 BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
                 TextID = MyInternationalizationString.Save,
                 TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+                TextSize=16,
             };
             PickerViewfra.AddChidren(btnsave);
 
@@ -211,7 +167,7 @@
                 {
                     return;
                 }
-                if (selectde != ""|| timevalue==5)
+                if (selectde != "" || timevalue == 5)
                 {
                     Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
                     actionsInfo.Add("LinkType", 7);
@@ -232,8 +188,8 @@
                     if (!edit)
                     {
                         var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
-                                              Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
-                                              Language.StringByID(MyInternationalizationString.complete));
+                                               Language.StringByID(MyInternationalizationString.delaytip),
+                                               Language.StringByID(MyInternationalizationString.confrim));
                         alert.Show();
                         return;
                     }
@@ -243,6 +199,7 @@
                 UserView.HomePage.Instance.PageIndex += 1;
                 logicCommunalPage.Show(() => { });
             };
+
         }
     }
 }

--
Gitblit v1.8.0