| | |
| | | case ShowFunction.EnergyMonitoring: |
| | | #region 能源监测 |
| | | btnName.TextID = StringId.EnergyMonitoring; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var skipView = new EnergyMainPage(); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | functionPageTitleId = StringId.EnergyMonitoring; |
| | | |
| | | //btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | //{ |
| | | // var skipView = new EnergyMainPage(); |
| | | // MainPage.BasePageView.AddChidren(skipView); |
| | | // skipView.LoadPage(); |
| | | // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | //}; |
| | | #endregion |
| | | break; |
| | | case ShowFunction.Environmental: |
| | |
| | | && item != ShowFunction.Environmental |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.DoorLock |
| | | && ShowFunction.EnergyMonitoring != item |
| | | //&& ShowFunction.EnergyMonitoring != item |
| | | && ShowFunction.VideoIntercom != item |
| | | && ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Series != item |
| | |
| | | int count = 0; |
| | | foreach (var temp in FunctionList.List.InverterList()) |
| | | { |
| | | if (temp.online) |
| | | if (temp.isOnline()) |
| | | { |
| | | if (temp.trait_on_off.state.ToString() == "on") |
| | | { |
| | |
| | | string url = $"h5/index.html?homeId={DB_ResidenceData.Instance.CurrentRegion.id}&token={UserInfo.Current.AccessToken}&refresh_token={UserInfo.Current.RefreshToken}&url={OnAppConfig.Instance.RequestHttpsHost}&language={lz}"; |
| | | Inverter.Ins.ShowWebviewFormUrl(url); |
| | | |
| | | //new System.Threading.Thread(() => |
| | | //{ |
| | | // System.Threading.Thread.Sleep(2000); |
| | | // var status = new Dictionary<string, object> { ["method"] = "weather", ["data"] = "MainPage.cityInfo.weather" }; |
| | | // Inverter.Ins.H5Page.CallJS($"nativeToJs(\'{Newtonsoft.Json.JsonConvert.SerializeObject(status)}\')"); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(2000); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var status = new Dictionary<string, object> { ["method"] = "weather", ["data"] = MainPage.cityInfo.weather }; |
| | | Inverter.Ins.H5Page.CallJS($"nativeToJs(\'{Newtonsoft.Json.JsonConvert.SerializeObject(status)}\')"); |
| | | }); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | Inverter.Ins.H5Page.JSToNativeAction = (dictionary) => |
| | | { |
| | | #if __IOS__ |