wxr
2020-09-01 7d005a7618e3d7a80d8ede3baf6ecc4bf8019cd5
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -14,7 +14,7 @@
        /// 更新功能状态
        /// </summary>
        /// <param name="updataFunction"></param>
        public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView)
        public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView,Room room=null)
        {
            try
            {
@@ -24,6 +24,14 @@
                    {
                        return;
                    }
                    if (room != null)
                    {
                        if (!updataFunction.roomIdList.Contains(room.sid))
                        {
                            return;
                        }
                    }
                    //if(updataFunction.roomIdList.Contains(Room))
                    for (int i = 0; i < scrolView.ChildrenCount; i++)
                    {
                        if (scrolView.GetChildren(i).Tag == null || scrolView.GetChildren(i).Tag.ToString() == "")
@@ -50,7 +58,7 @@
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.on_off == "on";
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.value.ToString() == "on";
                                                }
                                                catch (Exception ex)
                                                {
@@ -63,7 +71,7 @@
                                            {
                                                try
                                                {
                                                    if (updataFunction.on_off == "on")
                                                    if (updataFunction.trait_on_off.value.ToString() == "on")
                                                    {
                                                        (fcView.GetChildren(j) as DiyImageSeekBar).Progress = (updataFunction as Light).brightness;
                                                        (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
@@ -85,7 +93,7 @@
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.on_off == "on";
                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.value.ToString() == "on";
                                                    (fcView.GetChildren(j) as Button).Text = updataFunction.lastState;
                                                }
                                                catch (Exception ex)
@@ -102,7 +110,7 @@
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = uCurtain.on_off == "off";
                                                    (fcView.GetChildren(j) as Button).IsSelected = uCurtain.trait_on_off.value.ToString() == "off";
                                                }
                                                catch (Exception ex)
                                                {
@@ -113,7 +121,7 @@
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = uCurtain.on_off == "on";
                                                    (fcView.GetChildren(j) as Button).IsSelected = uCurtain.trait_on_off.value.ToString() == "on";
                                                }
                                                catch (Exception ex)
                                                {
@@ -122,6 +130,22 @@
                                            }
                                            #endregion
                                            break;
                                        case FunctionCategory.Music:
                                            #region 音乐更新
                                            var uMusic = updataFunction as Music.A31MusicModel;
                                            if (cTag == updataFunction.functionType + "_State_" + updataFunction.sid)
                                            {
                                                try
                                                {
                                                    (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play" ;
                                                }
                                                catch (Exception ex)
                                                {
                                                    MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
                                                }
                                            }
                                            #endregion
                                            break;
                                    }
                                }
                            }