| | |
| | | using System;
|
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | IsBold = true |
| | | }; |
| | | topView.AddChidren(btnResidenceName); |
| | | |
| | | #if DEBUG |
| | | btnResidenceName.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | System.Threading.Tasks.Task.Run( |
| | | async () => { await DAL.Net.MqttCommon.StartMqtt(); |
| | | }); |
| | | }; |
| | | |
| | | #endif |
| | | |
| | | |
| | | environmentalView = new FrameLayout() |
| | | { |
| | |
| | | view.AddChidren(btnCurtainOpen); |
| | | |
| | | LoadEvent_ControlCurtain(function as Curtain, btnCurtainClose, btnCurtainOpen); |
| | | }else if(function.functionType== FunctionType.TV) |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/TVIcon.png"; |
| | | Button btnPower; |
| | | btnPower = new Button() |
| | | { |
| | | X = Application.GetRealWidth(131), |
| | | Y = Application.GetRealHeight(86), |
| | | Width = Application.GetRealWidth(32), |
| | | Height = Application.GetRealWidth(32), |
| | | UnSelectedImagePath = "Public/PowerClose.png", |
| | | }; |
| | | view.AddChidren(btnPower); |
| | | LoadEvent_ControlTV(function as TV, btnPower); |
| | | } |
| | | else |
| | | { |
| | |
| | | btnName.MouseUpEventHandler = skipControlPageEvent; |
| | | btnIcon.MouseUpEventHandler = skipControlPageEvent; |
| | | btnState.MouseUpEventHandler = skipControlPageEvent; |
| | | //电视不需要更新状态 |
| | | if(function.functionType!= FunctionType.TV) |
| | | { |
| | | UpdataFunctionStates(function); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("homepage LoadControlView error : " + ex.Message); |