| | |
| | | using System; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | /// <param name="updataFunction"></param> |
| | | public void UpdataStates(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView, Room room = null) |
| | | { |
| | | Application.RunOnMainThread((Action)(() => |
| | | Application.RunOnMainThread((() => |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | })); |
| | | } |
| | | |
| | | public void UpdataOnlineStatus(Function updataFunction, FrameLayout view, VerticalScrolViewLayout scrolView, Room room = null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | try |
| | | { |
| | | if (view == null || scrolView == null || updataFunction == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!scrolView.ScrollEnabled) |
| | | { |
| | | return; |
| | | } |
| | | if (room != null) |
| | | { |
| | | if (!updataFunction.roomIds.Contains(room.roomId)) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | for (int i = 0; i < scrolView.ChildrenCount; i++) |
| | | { |
| | | if (scrolView.GetChildren(i).Tag == null || scrolView.GetChildren(i).Tag.ToString() == "") |
| | | { |
| | | continue; |
| | | } |
| | | var viewTag = scrolView.GetChildren(i).Tag.ToString(); |
| | | if (scrolView.GetChildren(i).Tag != null && viewTag == updataFunction.spk + updataFunction.sid) |
| | | { |
| | | if (scrolView.GetChildren(i).GetType() == typeof(FunctionControlZone)) { |
| | | var fcView = scrolView.GetChildren(i) as FunctionControlZone; |
| | | //fcView.UpdataOnline(updataFunction.online); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception ex) |
| | | { |
| | | MainPage.Log("Function Online status error : " + ex.Message); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |