From d9ec9be857367028edaeffb6092b141664a81c45 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期日, 23 一月 2022 11:30:46 +0800
Subject: [PATCH] 房间设备刷新

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs                                      |    2 
 HDL-ON_Android/SplashActivity.cs                                                                 |   12 ++----
 HDL_ON/Entity/Function/Function.cs                                                               |    7 +++
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs |    4 +-
 HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs                                                 |   18 +++++++++
 HDL_ON/UI/UI2/2-Classification/RoomPage.cs                                                       |   11 +++--
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs     |    4 +-
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs          |    6 +-
 8 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs
index 680bb95..b12d59a 100644
--- a/HDL-ON_Android/SplashActivity.cs
+++ b/HDL-ON_Android/SplashActivity.cs
@@ -28,10 +28,6 @@
                 {
                     if (!OnAppConfig.Instance.FirstRunApp)
                     {
-                        //鍒濆鍖栧弸鐩焥dk
-                        Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android");
-                        //鍒濆鍖栧弸鐩焥dk config
-                        Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android", "");
                         ////鎵撳紑baseActivity
                         Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
                         StartActivityForResult(i, 1);
@@ -65,10 +61,6 @@
             }
             else
             {
-                //鍒濆鍖栧弸鐩焥dk
-                Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android");
-                //鍒濆鍖栧弸鐩焥dk config
-                Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android","");
                 ////鎵撳紑baseActivity
                 Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
                 StartActivityForResult(i, 1);
@@ -99,6 +91,10 @@
 
             };
 
+            //鍒濆鍖栧弸鐩焥dk
+            Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android");
+            //鍒濆鍖栧弸鐩焥dk config
+            Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android", "");
 
         }
 
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 3772dc2..ca8413a 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -556,6 +556,13 @@
                 SaveFunctionFile();
                 if (pack.Code == StateCode.SUCCESS)
                 {
+                    if (UI.RoomPage.bodyView != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            UI.RoomPage.bodyView.ReLoadPage();
+                        });
+                    }
                 }
                 else
                 {
diff --git a/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs b/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
index e3d96a7..b4f5d8b 100644
--- a/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
+++ b/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
@@ -1,4 +1,6 @@
 锘縰sing System;
+using Shared;
+
 namespace HDL_ON.Entity
 {
     /// <summary>
@@ -42,6 +44,22 @@
         /// 浜у搧鍚嶇О
         /// </summary>
         public string productName;
+        public string productNameEn;
+
+        public string ProductShowName
+        {
+            get
+            {
+                if(Language.CurrentLanguage == "Chinese")
+                {
+                    return productName;
+                }
+                else
+                {
+                    return productNameEn;
+                }
+            }
+        }
 
         /// <summary>
         /// 浜у搧鍘傚晢
diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
index b2138df..ab78fd4 100644
--- a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -12,7 +12,7 @@
         /// <summary>
         /// 褰撳墠绐椾綋
         /// </summary>
-        static FrameLayout bodyView;
+        public static RoomPage bodyView;
         /// <summary>
         /// 鍔熻兘鍒楄〃闆嗗悎鏄剧ず鍖哄煙
         /// </summary>
@@ -56,10 +56,13 @@
         /// <summary>
         /// 閲嶈浇鐣岄潰
         /// </summary>
-        void ReLoadPage()
+        public void ReLoadPage()
         {
-            bodyView.RemoveAll();
-            LoadPage();
+            if (bodyView != null)
+            {
+                bodyView.RemoveAll();
+                LoadPage();
+            }
         }
 
         public void LoadPage()
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs
index 9d62c19..85e8739 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs
@@ -29,11 +29,11 @@
             if (Language.CurrentLanguage == "Chinese")
             {
                 //璁剧疆澶撮儴淇℃伅
-                base.SetTitleText(Language.StringByID(StringId.Add) + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + device.ProductShowName);
             }
             else
             {
-                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.ProductShowName);
             }
             //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹�
             bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
index e5fae96..e4130c3 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs
@@ -32,11 +32,11 @@
             if (Language.CurrentLanguage == "Chinese")
             {
                 //璁剧疆澶撮儴淇℃伅
-                base.SetTitleText(Language.StringByID(StringId.Add) + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + device.ProductShowName);
             }
             else
             {
-                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.ProductShowName);
             }
             //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹�
             bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
@@ -160,7 +160,7 @@
                         try
                         {
                             var pm = new HttpServerRequest();
-                            var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode,integratedDevice.productName,pairString);// Language.StringByID(StringId.SensorEnvironment)
+                            var pack = pm.IndependentRegister3TyDevcie(integratedDevice.spk, snCode,integratedDevice.ProductShowName, pairString);// Language.StringByID(StringId.SensorEnvironment)
                             if (pack.Code == StateCode.SUCCESS)
                             {
                                 //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString());
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
index 0cf3b86..d4501dc 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -31,11 +31,11 @@
             if (Language.CurrentLanguage == "Chinese")
             {
                 //璁剧疆澶撮儴淇℃伅
-                base.SetTitleText(Language.StringByID(StringId.Add) + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + device.ProductShowName);
             }
             else
             {
-                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.productName);
+                base.SetTitleText(Language.StringByID(StringId.Add) + " " + device.ProductShowName);
             }
             //杩欎釜鐣岄潰鐨勮儗鏅渶瑕佺櫧鑹�
             bodyFrameLayout.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index 68ac66b..cc9e0f0 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -139,7 +139,7 @@
                     TextAlignment = TextAlignment.CenterLeft,
                     TextColor = CSS_Color.FirstLevelTitleColor,
                     TextSize = CSS_FontSize.TextFontSize,
-                    Text = device.productName,
+                    Text = device.ProductShowName,
                 };
                 row.AddChidren(btnName);
 

--
Gitblit v1.8.0