wxr
2022-06-23 2e12a9190f431565e576d0b05866366d15bcc9ae
修复场景闪退问题

记录的选中房间被删除之后导致空异常
6个文件已修改
79 ■■■■ 已修改文件
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/SplashActivity.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Scene.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneFunctionListChoosePage.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>-->
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();
            };
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>
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>
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -482,6 +482,13 @@
                    scene.functions.Remove(scenefunction);
                    continue;
                }
                //将spk实体里面的min 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()
                {
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);
                }
            }