wxr
2023-04-07 a3313818a548d51777ae4e6cc006e9d1e2c1036e
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using HDL_ON.Common;
using HDL_ON.DAL.Server;
using Shared;
namespace HDL_ON.Entity
@@ -86,8 +88,6 @@
        /// </summary>
        public List<GroupControlFunction> sids = new List<GroupControlFunction>();
        ///// <summary>
        ///// 获取设备添加到房间的房间名称
        ///// </summary>
@@ -114,6 +114,38 @@
        //    }
        //    return roomNameList;
        //}
        /// <summary>
        /// 群控控制
        /// </summary>
        /// <param name="pairs"></param>
        public void Control(Dictionary<string,object> pairs)
        {
            try
            {
                var controlValues = new Dictionary<string, object>();
                foreach(var p in pairs)
                {
                    controlValues.Add("key", p.Key);
                    controlValues.Add("value", p.Value);
                }
                var pack = ApiUtlis.Ins.HttpRequest.ControlGroupControl(userDeviceGroupControlId, controlValues);
                if (pack != null)
                {
                    if (pack.Code == StateCode.SUCCESS)
                    {
                        //DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl.
                    }
                    else
                    {
                        MainPage.Log($"群控控制失败,Code: {pack.Code}");
                    }
                }
            }
            catch (Exception ex){
                MainPage.Log($"群控控制失败: {ex.Message}");
            }
        }
    }
    public class GroupControlFunction
@@ -126,6 +158,8 @@
        /// 功能spk
        /// </summary>
        public string spk = string.Empty;
    }