From f6b3446e3a4afc0f65814be87aaa0f5ea0c62d69 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 28 十月 2019 10:50:30 +0800
Subject: [PATCH] 2019.10.28

---
 ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs |   58 +++++++++++++++++++++++-----------------------------------
 1 files changed, 23 insertions(+), 35 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
index 8a34d39..dac1b70 100644
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectDelayTime.cs
@@ -15,7 +15,7 @@
         /// <summary>
         /// totalSecond
         /// </summary>
-        private int totalSecond;
+        public int totalSecond;
         /// <summary>
         /// selectedTimeAction
         /// </summary>
@@ -23,52 +23,38 @@
 
         #endregion
 
+        /// <summary>
+        /// SelectDelayTime
+        /// </summary>
         public SelectDelayTime()
         {
             BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
-            Tag = "categoryAddScene";
+            //Tag = "categoryAddScene";
         }
+        /// <summary>
+        /// RemoveFromParent
+        /// </summary>
         public override void RemoveFromParent()
         {
             base.RemoveFromParent();
         }
-
+        /// <summary>
+        /// sceneTargetDevice
+        /// </summary>
         public SceneTargetDeviceUI sceneTargetDevice;
 
-
+        /// <summary>
+        /// Show
+        /// </summary>
         public void Show()
         {
             if (sceneTargetDevice == null)
             {
-                sceneTargetDevice = new SceneTargetDeviceUI { Type = 1 };
+                sceneTargetDevice = new SceneTargetDeviceUI { Type = 2 };
             }
             AddTop();
 
             AddBodyView();
-
-
-
-            void selectTimeMouseUpEvent(object sender, MouseEventArgs e)
-            {
-                //if (!string.IsNullOrEmpty(targetDeviceID))
-                //{
-                //var targetDeviceUI = CategoryAddScene.sceneTargetDevicesList.Find((obj) => obj.SceneTargetDeviceUIID == targetDeviceID);
-                //    if (targetDeviceUI != null)
-                //    {
-                //        targetDeviceUI.DelayTime= SceneTargetDevice.DelayTime;
-                //        targetDeviceUI.Type = SceneTargetDevice.Type;
-                //    }
-                //}
-                //UserView.HomePage.Instance.RemoveViewByTag("categoryAddScene");
-                //var categoryAddScene = new CategoryAddScene();
-                //UserView.HomePage.Instance.AddChidren(categoryAddScene);
-                //UserView.HomePage.Instance.PageIndex += 1;
-                //categoryAddScene.Show();
-            }
-
-
-
-
         }
 
 
@@ -104,20 +90,20 @@
             var bg1 = new FrameLayout
             {
                 Y = Application.GetRealHeight(118),
-                Height = Application.GetRealHeight(207),
-                Width = Application.GetRealWidth(207),
+                Height = Application.GetMinRealAverage(207),
+                Width = Application.GetMinRealAverage(207),
                 Gravity = Gravity.CenterHorizontal,
-                Radius = (uint)Application.GetRealHeight(207 / 2),
+                Radius = (uint)Application.GetMinRealAverage(207 / 2),
                 BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
             };
             bodyFrameLayout.AddChidren(bg1);
 
             var bg2 = new FrameLayout
             {
-                Height = Application.GetRealHeight(184),
-                Width = Application.GetRealWidth(184),
+                Height = Application.GetMinRealAverage(184),
+                Width = Application.GetMinRealAverage(184),
                 Gravity = Gravity.Center,
-                Radius = (uint)Application.GetRealHeight(184 / 2),
+                Radius = (uint)Application.GetMinRealAverage(184 / 2),
                 BackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
             };
             bg1.AddChidren(bg2);
@@ -181,6 +167,8 @@
 
             pickView.setNPicker(minuStrList, secStrList, null);
 
+            pickView.setCurrentItems(totalSecond / 60, totalSecond % 60, 0);
+
             pickView.OnSelectChangeEvent += (l1, l2, l3) =>
             {
                 totalSecond = minuList[l1] * 60 + secList[l2];

--
Gitblit v1.8.0