From 2e12a9190f431565e576d0b05866366d15bcc9ae Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 23 六月 2022 11:07:37 +0800 Subject: [PATCH] 修复场景闪退问题 --- HDL_ON/Entity/Function/Scene.cs | 4 ++ HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs | 32 +++++++++------ HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL-ON_Android/SplashActivity.cs | 30 +++++++++++++++ HDL-ON_iOS/Info.plist | 4 +- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 7 +++ 6 files changed, 63 insertions(+), 16 deletions(-) diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index df50bad..60e2068 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.7" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206151"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.7" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202206231"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index ac78c22..3c6626e 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -46,6 +46,8 @@ { base.OnCreate(savedInstanceState); + + //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class); //StartActivityForResult(i, 1); //OverridePendingTransition(0, 0); @@ -107,6 +109,9 @@ BaseActivity.KeepScreenON = false; //闅愯棌铏氭嫙鎸夐敭 BaseActivity.IsHideVirualButtons = true; + + + //瀹炵幇瀹夊崜杩斿洖鎸夐敭 BaseActivity.BackKeyAction = () => { @@ -138,6 +143,7 @@ Language.CurrentLanguage = "Chinese"; Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; + Console.WriteLine("999999999999999999999999999999999999999999999"+ localeList.Language); if (localeList.Language == "zh") { Language.CurrentLanguage = "Chinese"; @@ -145,6 +151,10 @@ else if(localeList.Language == "es") { Language.CurrentLanguage = "Spanish"; + } + else if (localeList.Language == "ru") + { + Language.CurrentLanguage = "russian"; } else { @@ -175,6 +185,26 @@ }; BaseActivity.RefreshUIAction = (activity) => { + Language.CurrentLanguage = "Chinese"; + Locale locale1 = Locale.Default; + var localeList = Resources.Configuration.Locale; + Console.WriteLine("999999999999999999999999999999999999999999999" + localeList.Language); + if (localeList.Language == "zh") + { + Language.CurrentLanguage = "Chinese"; + } + else if (localeList.Language == "es") + { + Language.CurrentLanguage = "Spanish"; + } + else if (localeList.Language == "ru") + { + Language.CurrentLanguage = "russian"; + } + else + { + Language.CurrentLanguage = "English"; + } MainPage.Show(); checkSomeInfo(); }; diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 253afed..971d629 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -100,9 +100,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.5.502206151</string> + <string>1.5.502206231</string> <key>CFBundleVersion</key> - <string>1.5.506151</string> + <string>1.5.506231</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Use geographic location to provide services such as weather</string> <key>NSAppleMusicUsageDescription</key> diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs index 86309f8..75742dc 100644 --- a/HDL_ON/Entity/Function/Scene.cs +++ b/HDL_ON/Entity/Function/Scene.cs @@ -540,6 +540,10 @@ public int min = 0; /// <summary> + /// 灞炴�х殑鍊煎垪琛� + /// </summary> + public List<string> valueList = new List<string>(); + /// <summary> /// 灞炴�у悕绉版樉绀烘枃鏈� /// 涓嫳鏂囨樉绀� /// </summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index 9f22925..0196aa6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -482,6 +482,13 @@ scene.functions.Remove(scenefunction); continue; } + //灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45 + foreach (var tt in scenefunction.status) { + tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; + tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; + tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; + } + i++; var row = new RowLayout() { diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs index 8f089d6..cc40903 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs @@ -165,22 +165,28 @@ else { var selectedRoom = Room.CurrentSpatial.RoomList.Find((obj) => obj.uid == DB_ResidenceData.Instance.sceneChooseRoomId); - - var listAllFun = new List<Function>(); - var listFun = new List<Function>(); - listAllFun.AddRange(unallocatedList); - listAllFun.AddRange(allocatedList); - - btnFloor.Text = selectedRoom.floorRoomName; - foreach(var funtion in listAllFun) + if (selectedRoom == null) { - if (funtion.roomIds.Contains(selectedRoom.roomId)) - { - listFun.Add(funtion); - } + LoadFunctionListRow(null); } - LoadFunctionListRow(listFun); + else + { + var listAllFun = new List<Function>(); + var listFun = new List<Function>(); + listAllFun.AddRange(unallocatedList); + listAllFun.AddRange(allocatedList); + + btnFloor.Text = selectedRoom.floorRoomName; + foreach (var funtion in listAllFun) + { + if (funtion.roomIds.Contains(selectedRoom.roomId)) + { + listFun.Add(funtion); + } + } + LoadFunctionListRow(listFun); + } } -- Gitblit v1.8.0