From bb6ad792b598927a5459a5fb6f6c27fb1aa9e94e Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 17 十二月 2020 14:06:36 +0800
Subject: [PATCH] 20201217-1

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 6699d3e..3131df6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -136,12 +136,17 @@
                     if (result == DAL.Server.StateCode.SUCCESS)
                     {
                         refreshAction();
-                        this.RemoveFromParent();
+                    this.RemoveFromParent();
                     }
                     else
                     {
                         DAL.Server.IMessageCommon.Current.ShowErrorInfoAlter(result);
                     }
+                }
+                else
+                {
+                        refreshAction();
+                    this.RemoveFromParent();
                 }
             };
         }
@@ -407,6 +412,10 @@
         /// <param name="btn"></param>
         void LoadEditDialog_Temp(SceneFunctionStatus trait, Button btn)
         {
+            double temp = 16;
+            double.TryParse(trait.value, out temp);
+            trait.value = temp.ToString();
+
             List<string> pickerItems = new List<string>();
             if(trait == null)
             {
@@ -479,7 +488,12 @@
             uIPickerView.setNPicker(pickerItems, null, null);
             optionBaseView.AddChidren(uIPickerView);
             uIPickerView.setCurrentItems(pickerItems.IndexOf(trait.value.ToString()), 4, 5);
-            string selectItem = trait.value.ToString() + FunctionList.List.GetUintString(trait.key);
+
+            string selectItem = pickerItems[0];
+            if (pickerItems.Contains(trait.value + FunctionList.List.GetUintString(trait.key)))
+            {
+                selectItem = trait.value.ToString() + FunctionList.List.GetUintString(trait.key);
+            }
 
             dialog.Show();
 

--
Gitblit v1.8.0