| | |
| | | }; |
| | | msgView.AddChidren(btnMsgBg); |
| | | |
| | | |
| | | |
| | | btnMsgIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | |
| | | }; |
| | | msgView.AddChidren(btnMsgIcon); |
| | | |
| | | |
| | | |
| | | btnMsg = new Button() |
| | | { |
| | | X = Application.GetRealWidth(10) + btnMsgIcon.Right, |
| | |
| | | }; |
| | | msgView.AddChidren(btnMsg); |
| | | |
| | | |
| | | |
| | | btnMsgTime = new Button() |
| | | { |
| | | X = Application.GetRealWidth(299), |
| | |
| | | #region ContextView |
| | | contentView = new PageLayout() |
| | | { |
| | | Y = changeView.Bottom , |
| | | Y = changeView.Bottom, |
| | | Height = Application.GetRealHeight(310 + 30 + 10), //20为超出部分 |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | |
| | | functionViews = new List<FrameLayout>(); |
| | | |
| | | deviceFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(deviceFunctionView); |
| | | LoadDeviceFunctionControlZone(); |
| | | sceneFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(sceneFunctionView); |
| | | LoadSceneFunctionControlZone(); |
| | | contentView.PageIndex = 0; |
| | | |
| | | if (!Common.ApiUtlis.Ins.DownloadDataComplete) |
| | | { |
| | | var waitPage = new Loading(); |
| | | MainPage.BaseView.AddChidren(waitPage); |
| | | waitPage.Start(); |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | while (!Common.ApiUtlis.Ins.DownloadDataComplete) |
| | | { |
| | | System.Threading.Thread.Sleep(400); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | |
| | | deviceFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(deviceFunctionView); |
| | | LoadDeviceFunctionControlZone(); |
| | | sceneFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(sceneFunctionView); |
| | | LoadSceneFunctionControlZone(); |
| | | contentView.PageIndex = 0; |
| | | |
| | | |
| | | LoadEvent_ChangeShowedFunctionType(); |
| | | |
| | | // 查询未读消息并显示 |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | |
| | | waitPage.Hide(); |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | else |
| | | { |
| | | |
| | | deviceFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(deviceFunctionView); |
| | | LoadDeviceFunctionControlZone(); |
| | | sceneFunctionView = new VerticalScrolViewLayout(); |
| | | contentView.AddChidren(sceneFunctionView); |
| | | LoadSceneFunctionControlZone(); |
| | | contentView.PageIndex = 0; |
| | | |
| | | |
| | | LoadEvent_ChangeShowedFunctionType(); |
| | | |
| | | // 查询未读消息并显示 |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | LoadEvent_ChangeShowedFunctionType(); |
| | | |
| | | // 查询未读消息并显示 |
| | | GetUnreadPushMessages(); |
| | | RegisterGetPushMessageAction(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"HomePage LoadPage Error : {ex.Message}"); |
| | | } |
| | | |
| | | |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | //DriverLayer.Control.Ins.SearchLoaclGateway(); |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | void LoadDeviceFunctionControlZone() |
| | | { |
| | | |
| | | #region ContextView |
| | | deviceFunctionView.RemoveAll(); |
| | | functionViews.Clear(); |