| | |
| | | /// <param name="updataFunction"></param> |
| | | public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView, Room room = null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | Application.RunOnMainThread((Action)(() => |
| | | { |
| | | |
| | | try |
| | |
| | | if (fcView.GetChildren(j).Tag == null) |
| | | continue; |
| | | var cTag = fcView.GetChildren(j).Tag.ToString(); |
| | | switch (updataFunction.functionCategory) |
| | | switch (updataFunction.Spk_Prefix) |
| | | { |
| | | case FunctionCategory.Light: |
| | | case FunctionCategory.Thermostat: |
| | | case FunctionCategory.AC: |
| | | case FunctionCategory.FloorHeat: |
| | | #region 按钮状态更新 |
| | | if (cTag == updataFunction.sid + "_Switch") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | #region 功能状态信息更新 |
| | | else if (cTag == updataFunction.functionType + "_laststates_" + updataFunction.sid) |
| | | else if (cTag == updataFunction.spk + "_laststates_" + updataFunction.sid) |
| | | { |
| | | try |
| | | { |
| | |
| | | case FunctionCategory.Music: |
| | | #region 音乐更新 |
| | | var uMusic = updataFunction as Music.A31MusicModel; |
| | | if (cTag == updataFunction.functionType + "_State_" + updataFunction.sid) |
| | | if (cTag == updataFunction.spk + "_State_" + updataFunction.sid) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | MainPage.Log($"RoomControlZone Updata States error : {ex.Message}"); |
| | | } |
| | | }); |
| | | })); |
| | | } |
| | | } |
| | | } |