wxr
2022-10-26 23ad902a6844438966d48deb25a89614c6ee5477
金茂绿建科技系统更新
9个文件已修改
279 ■■■■ 已修改文件
HDL-ON_Android/Assets/Language.ini 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini
@@ -555,6 +555,11 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
@@ -1775,6 +1780,11 @@
568=运行数量/总数量: --/--
569=人居环境
570=室外:{0}°/室内:{1}°
571=睡眠
572=离家
573=在家
574=制热除湿
575=选择模式
 
@@ -2971,6 +2981,13 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
2532=Visitor Invitation Record
2533=Visitor management
@@ -4174,6 +4191,13 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
2532=Visitor Invitation Record
@@ -5364,6 +5388,11 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
HDL-ON_iOS/Resources/Language.ini
@@ -555,6 +555,11 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
@@ -1775,6 +1780,11 @@
568=运行数量/总数量: --/--
569=人居环境
570=室外:{0}°/室内:{1}°
571=睡眠
572=离家
573=在家
574=制热除湿
575=选择模式
 
@@ -2971,6 +2981,13 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
2532=Visitor Invitation Record
2533=Visitor management
@@ -4174,6 +4191,13 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
2532=Visitor Invitation Record
@@ -5364,6 +5388,11 @@
567=Battery SOC: --%
568=Running/Total:--/--
570=Out:{0}°/In:{1}°
571=Sleep
572=Away
573=At home
574=Heating and dehumidification
575=Select Mode
HDL_ON/Common/R.cs
@@ -5,6 +5,26 @@
    public static class StringId
    {
        /// <summary>
        /// 选择模式
        /// </summary>
        public const int SelectMode = 575;
        /// <summary>
        /// 制热除湿
        /// </summary>
        public const int HeatingAndDehumidification = 574;
        /// <summary>
        /// 在家
        /// </summary>
        public const int AtHome = 573;
        /// <summary>
        /// 离家
        /// </summary>
        public const int AwayHome = 572;
        /// <summary>
        /// 睡眠
        /// </summary>
        public const int Sleep = 571;
        /// <summary>
        /// 室外:27°/室内:27°
        /// </summary>
        public const int IndoorTempOutdoorTemp = 570;
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1257,31 +1257,31 @@
            };
            Button btnAcstPower = new Button()
            {
                X = Application.GetRealWidth(115),
                Y = Application.GetRealHeight(70),
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                SelectedImagePath = "Public/PowerOpen.png",
                UnSelectedImagePath = "Public/PowerClose.png",
                IsSelected = function.trait_on_off.curValue.ToString() == "on",
            };
            view.AddChidren(btnAcstPower);
            btnAcstPower.MouseUpEventHandler = (sender, e) => {
                btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
                new System.Threading.Thread(() =>
                {
                    string onoff = btnAcstPower.IsSelected ? "on" : "off";
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.OnOff, onoff);
                    foreach (var temp in FunctionList.List.GetAcstParentList())
                    {
                        Control.Ins.SendWriteCommand(temp, d);
                    }
                })
                { IsBackground = true }.Start();
            };
            //Button btnAcstPower = new Button()
            //{
            //    X = Application.GetRealWidth(115),
            //    Y = Application.GetRealHeight(70),
            //    Width = Application.GetRealWidth(32),
            //    Height = Application.GetRealWidth(32),
            //    SelectedImagePath = "Public/PowerOpen.png",
            //    UnSelectedImagePath = "Public/PowerClose.png",
            //    IsSelected = function.trait_on_off.curValue.ToString() == "on",
            //};
            //view.AddChidren(btnAcstPower);
            //btnAcstPower.MouseUpEventHandler = (sender, e) => {
            //    btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
            //    new System.Threading.Thread(() =>
            //    {
            //        string onoff = btnAcstPower.IsSelected ? "on" : "off";
            //        Dictionary<string, string> d = new Dictionary<string, string>();
            //        d.Add(FunctionAttributeKey.OnOff, onoff);
            //        foreach (var temp in FunctionList.List.GetAcstParentList())
            //        {
            //            Control.Ins.SendWriteCommand(temp, d);
            //        }
            //    })
            //    { IsBackground = true }.Start();
            //};
           
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1073,30 +1073,29 @@
                        };
                        functionView.AddChidren(btnJMLogo);
                        Button btnAcstPower = new Button()
                        {
                            X = Application.GetRealWidth(120),
                            Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117),
                            Width = Application.GetRealWidth(32),
                            Height = Application.GetRealWidth(32),
                            SelectedImagePath = "Public/PowerOpen.png",
                            UnSelectedImagePath = "Public/PowerClose.png",
                            IsSelected = functionOnCount > 0,
                            Tag = item + "_AllControl",
                        };
                        functionView.AddChidren(btnAcstPower);
                        btnAcstPower.MouseUpEventHandler = (sender, e) =>
                        {
                            btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
                            string onoff = btnAcstPower.IsSelected ? "on" : "off";
                            Dictionary<string, string> d = new Dictionary<string, string>();
                            d.Add(FunctionAttributeKey.OnOff, onoff);
                            foreach (var temp in FunctionList.List.GetAcstParentList())
                            {
                                Control.Ins.SendWriteCommand(temp, d);
                            }
                        };
                        //Button btnAcstPower = new Button()
                        //{
                        //    X = Application.GetRealWidth(120),
                        //    Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117),
                        //    Width = Application.GetRealWidth(32),
                        //    Height = Application.GetRealWidth(32),
                        //    SelectedImagePath = "Public/PowerOpen.png",
                        //    UnSelectedImagePath = "Public/PowerClose.png",
                        //    IsSelected = functionOnCount > 0,
                        //    Tag = item + "_AllControl",
                        //};
                        //functionView.AddChidren(btnAcstPower);
                        //btnAcstPower.MouseUpEventHandler = (sender, e) =>
                        //{
                        //    btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
                        //    string onoff = btnAcstPower.IsSelected ? "on" : "off";
                        //    Dictionary<string, string> d = new Dictionary<string, string>();
                        //    d.Add(FunctionAttributeKey.OnOff, onoff);
                        //    foreach (var temp in FunctionList.List.GetAcstParentList())
                        //    {
                        //        Control.Ins.SendWriteCommand(temp, d);
                        //    }
                        //};
                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
@@ -180,7 +180,7 @@
                if(view!= null)
                {
                    view.btnSubHumidityValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%";
                    view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString()) + "%";
                    view.btnSubTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString()) + "°";
                    view.btnSubPower.IsSelected = temp.GetAttrState(AcstSub_AttrEnum.on_off.ToString()) == "on";
                }
            });
@@ -190,21 +190,38 @@
        {
            var curTime = DateTime.Now;
            string helloText = "上午好";
            if (Language.CurrentLanguage != "Chinese")
            {
                helloText = "Good morning";
            }
            if (curTime.Hour >= 8 && curTime.Hour < 12)
            {
                helloText = "上午好";
                if (Language.CurrentLanguage != "Chinese")
                {
                    helloText = "Good morning";
                }
                curColor = CSS.CSS_Color.MainColor;
                imageFolder = "blue";
            }
            else if (curTime.Hour >= 12 && curTime.Hour < 18)
            {
                helloText = "下午好";
                if (Language.CurrentLanguage != "Chinese")
                {
                    helloText = "Good afternoon";
                }
                curColor = 0xFFE7914F;
                imageFolder = "orange";
            }
            else
            {
                helloText = "晚上好";
                if (Language.CurrentLanguage != "Chinese")
                {
                    helloText = "Good evening";
                }
                curColor = 0xFF9175F3;
                imageFolder = "purple";
            }
@@ -392,16 +409,18 @@
                Width = Application.GetRealWidth(60 * sensorCount),
                Gravity = Gravity.Center,
            };
            if (sensorCount > 0)
            {
            infoContentView.AddChidren(sensorListView);
            }
            if (tempObj != null)
            {
                sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state, "°", "温度");
                sensorDiyView_Temp = new SensorDiyView(sensorListView, curColor, tempObj.state == "" ? "--" : tempObj.state, "°", Language.StringByID(StringId.Temp));
            }
            if (humiObj != null)
            {
                sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state, "%", "湿度");
                sensorDiyView_Humi = new SensorDiyView(sensorListView, curColor, humiObj.state == "" ? "--" : humiObj.state, "%", Language.StringByID(StringId.Humidity));
            }
            if (pm25Obj != null)
            {
@@ -434,26 +453,45 @@
            {
                energyCount++;
            }
            var energyListView = new HorizontalScrolViewLayout()
            {
                Width = Application.GetRealWidth(100 * energyCount),
                Gravity = Gravity.Center,
                Visible = false,
            };
            if (energyCount > 0)
            {
            infoContentView.AddChidren(energyListView);
            }
            if (totalObj != null)
            {
                sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state , "KW", "用电功率", 100);
                string text = "用电功率";
                if (Language.CurrentLanguage != "Chinese")
                {
                    text = "Power";
                }
                sensorDiyView_EleActivePower = new SensorDiyView(energyListView, curColor, totalObj.state == "" ? "--" : totalObj.state , "KW", text, 100);
            }
            if (dayObj != null)
            {
                sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state , "KW", "今日耗电",100);
                string text = "今日耗电";
                if (Language.CurrentLanguage != "Chinese")
                {
                    text = "Power of today";
                }
                sensorDiyView_EleDay = new SensorDiyView(energyListView, curColor, dayObj.state == "" ? "--" : dayObj.state , "KW", text,100);
            }
            if (monthObj != null)
            {
                sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state , "KWh", "本月耗电", 100);
                string text = "本月耗电";
                if (Language.CurrentLanguage != "Chinese")
                {
                    text = "Power of month";
            }
                sensorDiyView_EleMonth = new SensorDiyView(energyListView, curColor, monthObj.state == "" ? "--" : monthObj.state , "KWh", text, 100);
            }
            var btnChangeClick = new Button();
            infoView.AddChidren(btnChangeClick);
@@ -473,8 +511,10 @@
                    energyListView.Visible = false;
                }
            };
            if (sensorCount > 0 && energyCount > 0)
            {
            btnChangeClick.MouseUpEventHandler = changeInfoEvent;
            }
            #endregion
@@ -521,6 +561,10 @@
                Height = Application.GetRealHeight(54),
            };
            subTitleView.AddChidren(btnTitleText2);
            if(Language.CurrentLanguage != "Chinese")
            {
                btnTitleText2.Text = "My Home";
            }
            int subFunctionCount = 0;
@@ -620,7 +664,7 @@
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(100),
                    Text = "选择模式",
                    TextID = StringId.SelectScene,
                    TextSize = 16,
                    TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                    IsBold = true,
@@ -769,7 +813,7 @@
                    BackgroundColor = CSS.CSS_Color.DividingLineColor,
                });
                IconButton heatHumiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHeatHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon.png",
                    "制热除湿", curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.heat_humidity.ToString());
                    Language.StringByID(StringId.HeatingAndDehumidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.heat_humidity.ToString());
                heatHumiIconButton.Click(() => {
                    btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHeatHumiIcon2.png";
                    dialog.Close();
@@ -800,7 +844,7 @@
                    BackgroundColor = CSS.CSS_Color.DividingLineColor,
                });
                IconButton humiIconButton = new IconButton("FunctionIcon/Acst/grey/ModeHumiIcon.png", $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon.png",
                    "加湿", curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.humidity.ToString());
                    Language.StringByID(StringId.Humidification), curColor, function.GetAttrState(AcstParent_AttrEnum.mode.ToString()) == AcstParent_Attr_ModeValueEnum.humidity.ToString());
                humiIconButton.Click(() => {
                    btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/ModeHumiIcon2.png";
                    dialog.Close();
@@ -828,15 +872,21 @@
                IsSelected = function.trait_on_off.state == "on"
            };
            bottomView.AddChidren(btnPowerControl);
            btnPowerControl.MouseUpEventHandler = (sender, e) => {
            btnPowerControl.MouseUpEventHandler = (sender, e) =>
            {
                string msg = btnPowerControl.IsSelected ? "确定关闭总开关吗?" : "确定打开总开关吗?";
                new PublicAssmebly().TipOptionMsg(StringId.Tip, msg, () =>
                {
                btnPowerControl.IsSelected = !btnPowerControl.IsSelected;
                new System.Threading.Thread(() => {
                    new System.Threading.Thread(() =>
                    {
                    Dictionary<string, string> d = new Dictionary<string, string>();
                    d.Add(FunctionAttributeKey.OnOff, btnPowerControl.IsSelected ? "on" : "off");
                    Control.Ins.SendWriteCommand(function, d);
                })
                { IsBackground = true }.Start();
                });
            };
@@ -890,7 +940,7 @@
                {
                    X = Application.GetRealWidth(16),
                    Width = Application.GetRealWidth(100),
                    Text = "选择场景",
                    TextID = StringId.SelectScene,
                    TextSize = 16,
                    TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                    IsBold = true,
@@ -915,7 +965,7 @@
                    BackgroundColor = CSS.CSS_Color.DividingLineColor,
                });
                IconButton atHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAtHome.png", $"FunctionIcon/Acst/{imageFolder}/SceneAtHome.png",
                    "在家", curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.at_home.ToString());
                    Language.StringByID(StringId.AtHome), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.at_home.ToString());
                atHomeIconButton.Click(() => {
                    btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAtHome2.png";
                    dialog.Close();
@@ -947,7 +997,7 @@
                    BackgroundColor = CSS.CSS_Color.DividingLineColor,
                });
                IconButton awayHomeIconButton = new IconButton("FunctionIcon/Acst/grey/SceneAwayHomeIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon.png",
                    "离家", curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.leave_home.ToString());
                    Language.StringByID(StringId.AwayHome), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.leave_home.ToString());
                awayHomeIconButton.Click(() => {
                    btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneAwayHomeIcon2.png";
                    dialog.Close();
@@ -978,7 +1028,7 @@
                    BackgroundColor = CSS.CSS_Color.DividingLineColor,
                });
                IconButton sleepIconButton = new IconButton("FunctionIcon/Acst/grey/SceneSleepIcon.png", $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon.png",
                    Language.StringByID(StringId.Humidity), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.sleep.ToString());
                    Language.StringByID(StringId.Sleep), curColor, function.GetAttrState(AcstParent_AttrEnum.scene.ToString()) == AcstParent_Attr_SceneValueEnum.sleep.ToString());
                sleepIconButton.Click(() => {
                    btnModeControl.SelectedImagePath = $"FunctionIcon/Acst/{imageFolder}/SceneSleepIcon2.png";
                    dialog.Close();
@@ -1098,7 +1148,7 @@
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = 0xFF1b3053,
                TextSize = 13,
                Text = sub.GetRoomListName(),
                Text = sub.name,
            };
            subFunctionView.AddChidren(btnRoomInfo);
@@ -1170,7 +1220,9 @@
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
                var page = new AcstSubPage(sub,imageFolder);
                MainPage.BasePageView.AddChidren(page);
                page.LoadPage();
                page.LoadPage(()=> {
                    btnRoomInfo.Text = sub.name;
                });
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -83,9 +83,9 @@
            bodyView = this;
        }
        public void LoadPage()
        public void LoadPage(Action action)
        {
            new TopViewDiv(bodyView, function.GetRoomListName()).LoadTopView();
            new TopViewDiv(bodyView, function.name).LoadTopView_FunctionTop(function,action);
            var contentView = new FrameLayout()
            {
SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>