| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | } |
| | | } |
| | | |
| | | var btnEnvirValuesTitle = new Button() { |
| | | var btnEnvirValuesTitle = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Gravity = Gravity.CenterVertical, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | } |
| | | } |
| | | |
| | | btnSecurityStatus.MouseUpEventHandler = (sender, e) => { |
| | | btnSecurityStatus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new ArmCenterPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | |
| | | #endregion |
| | | |
| | | #if DEBUG |
| | | btnResidenceName.MouseUpEventHandler = (envent, ee) => { |
| | | MainPage.Log("sss"); |
| | | new System.Threading.Thread(async() => |
| | | btnResidenceName.MouseUpEventHandler = (envent, ee) => |
| | | { |
| | | await Common.AliyunLog.AliyunLogClient.PostLogs("告警测试", "测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息"); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | MainPage.Log("sss"); |
| | | |
| | | #if __ANDROID__ |
| | | //HDLLinphoneKit.Instance.MediaPlayerLooping(true); |
| | | Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.PlayRingtone(); |
| | | #elif __IOS__ |
| | | |
| | | //if (isPlay) |
| | | //{ |
| | | // isPlay = false; |
| | | // soundPlayer.StopSound(); |
| | | //} |
| | | //else |
| | | //{ |
| | | // isPlay = true; |
| | | // soundPlayer.PlaySound(); |
| | | //} |
| | | |
| | | #endif |
| | | //PlaySystemRingtone playSystemRingtone = new PlaySystemRingtone(); |
| | | //playSystemRingtone.Play(); |
| | | //new System.Threading.Thread(async() => |
| | | //{ |
| | | // await Common.AliyunLog.AliyunLogClient.PostLogs("告警测试", "测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息"); |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | }; |
| | | #endif |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeGroupControl.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeFunction.IsSelected = false; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeFunction.IsBold = false; |
| | |
| | | contentView.PageIndex = 2; |
| | | }; |
| | | |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeFunction.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeFunction.IsSelected = true; |
| | | btnChangeFunction.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeFunction.IsBold = true; |
| | |
| | | btnChangeGroupControl.TextSize = CSS.CSS_FontSize.TextFontSize; |
| | | btnChangeGroupControl.IsBold = false; |
| | | }; |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => { |
| | | btnChangeScene.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnChangeScene.IsSelected = true; |
| | | btnChangeScene.TextSize = CSS.CSS_FontSize.HeadlineFontSize; |
| | | btnChangeScene.IsBold = true; |
| | |
| | | } |
| | | }); |
| | | } |
| | | catch (Exception ex) { |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"刷新主页异常:{ex.Message}"); |
| | | } |
| | | finally { } |
| | |
| | | //} |
| | | //else |
| | | { |
| | | if (!function.collect) |
| | | if (!function.collect&& function.spk != SPK.InverterJinmao) |
| | | continue; |
| | | } |
| | | if (index % 2 == 0) |
| | |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | functionViews.Add(functionView); |
| | | //绿建人居环境,科技系统 |
| | | if (function.spk == SPK.AcstParent) |
| | | //绿建人居环境,科技系统,金茂光伏储能 |
| | | if (function.spk == SPK.AcstParent || function.spk == SPK.InverterJinmao) |
| | | { |
| | | LoadAcstDiv(functionView, function); |
| | | } |
| | |
| | | view.AddChidren(btnClose); |
| | | |
| | | |
| | | btnClose.MouseDownEventHandler = (sender, e) => { |
| | | btnClose.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = true; |
| | | }; |
| | | |
| | | btnClose.MouseUpEventHandler = (sender, e) => { |
| | | btnClose.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnClose.IsSelected = false; |
| | | if (function.spk == SPK.GroupControl) |
| | | { |
| | |
| | | (function as GroupControl).Control(d); |
| | | } |
| | | }; |
| | | btnOpen.MouseDownEventHandler = (sender, e) => { |
| | | btnOpen.MouseDownEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = true; |
| | | }; |
| | | btnOpen.MouseUpEventHandler = (sender, e) => { |
| | | btnOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnOpen.IsSelected = false; |
| | | if (function.spk == SPK.GroupControl) |
| | | { |
| | |
| | | LoadEvent_SwitchFunction(function, btnSwitch); |
| | | } |
| | | //取消收藏事件 |
| | | Action cannelCollect = () => { |
| | | Action cannelCollect = () => |
| | | { |
| | | function.collect = false; |
| | | //if (SPK.MusicSpkList().Contains(function.spk))//处理音乐主从关系 |
| | | //{ |
| | |
| | | { |
| | | X = Application.GetRealWidth(11), |
| | | Y = Application.GetRealWidth(10), |
| | | TextID = StringId.Acst, |
| | | Text = function.name, |
| | | //TextID = StringId.Acst, |
| | | IsBold = true, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | |
| | | }; |
| | | view.AddChidren(btnLogo); |
| | | |
| | | try |
| | | { |
| | | if (function.extend.Contains("jinmao") && function.extend.Contains("true")) |
| | | { |
| | | btnLogo.Visible = true; |
| | | } |
| | | else |
| | | { |
| | | btnLogo.Visible = false; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log("Error", $"金茂logo显示处理异常:{ex.Message}"); |
| | | } |
| | | |
| | | Button btnFunctionViewBg; |
| | | btnFunctionViewBg = new Button() |
| | | { |
| | | Height = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(102), |
| | | UnSelectedImagePath = "FunctionIcon/FunctionBg/AcstFunctionBg.png", |
| | | UnSelectedImagePath = function.spk == SPK.AcstParent ? "FunctionIcon/FunctionBg/AcstFunctionBg.png" : "FunctionIcon/FunctionBg/InverterJinmaoFunctionBg.png", |
| | | }; |
| | | view.AddChidren(btnFunctionViewBg); |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => { |
| | | if (function.spk == SPK.AcstParent) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | else if (function.spk == SPK.InverterJinmao) |
| | | { |
| | | //btnName.TextID = StringId.NewEnergy; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new InverterJinmaoPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | |
| | | |
| | | //Button btnAcstPower = new Button() |