| | |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | |
| | | #region 电器 |
| | | |
| | | functionCount = FunctionList.List.GetElectricals().Count; |
| | | functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.spk!=SPK.ElectricalTvHisense&&obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | //#if DEBUG |
| | | // functionCount = 1; |
| | | //#endif |
| | |
| | | break; |
| | | case ShowFunction.Panel: |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | if (!MainPage.NoLoginMode) |
| | | { |
| | | if (OnAppConfig.Instance.RequestHttpsHost.Contains("bahrain") || !Common.ApiUtlis.Ins.hadInternet) |
| | | { |
| | | functionCount = 0; |
| | | } |
| | | else |
| | | { |
| | | functionCount = 1; |
| | | } |
| | | } |
| | | break; |
| | | |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | | break; |
| | |
| | | functionCount = FunctionList.List.GetAcstParentList().Count; |
| | | functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.VideoDoorLock: |
| | | if (Common.ApiUtlis.Ins.hadInternet) |
| | | { |
| | | functionCount = FunctionList.List.GetVideoDoorLockList().Count; |
| | | functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.GetAttrState("status").ToString() == "open" |
| | | || obj.GetAttrState("status").ToString() == "normal_open").Count; |
| | | } |
| | | else |
| | | { |
| | | functionCount = 0; |
| | | } |
| | | break; |
| | | case ShowFunction.Aks: |
| | | functionCount = FunctionList.List.GetVideoControlsList().Count; |
| | | functionOnCount = 1; |
| | | break; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | //不需要显示设备开状态数量; |
| | | Button btnFunctionCount=null; |
| | | if (item != ShowFunction.Aks |
| | | && item != ShowFunction.VideoDoorLock |
| | | && item != ShowFunction.Environmental |
| | | if ( item != ShowFunction.Environmental |
| | | && item != ShowFunction.Sensor |
| | | && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring |
| | |
| | | case ShowFunction.Panel: |
| | | btnName.TextID = StringId.Panel; |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | btnName.TextID = StringId.EZVIZ; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | HDLCommon.Current.Go2EZvizMonitor(bodyView); |
| | | }; |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | btnName.TextID = StringId.Sensor; |
| | | functionPageTitleId = StringId.Sensor; |
| | |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | break; |
| | | case ShowFunction.VideoDoorLock: |
| | | //萤石视频门锁 |
| | | btnName.TextID = StringId.yingshishipinmensuo; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var list =CommonMethod.Current.GetVideoDoorLockList(); |
| | | var form = new VideoDoorLockListPage(()=> { |
| | | UpdateBottomView(); |
| | | }); |
| | | form.AddForm(list); |
| | | }; |
| | | break; |
| | | case ShowFunction.Aks: |
| | | |
| | | btnFunctionViewBg.UnSelectedImagePath = "FunctionIcon/FunctionBg/AksFunctionBg.png"; |
| | | //埃克斯影音中控 |
| | | btnName.TextID = StringId.jiatingyingyuan; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var list = HDL_ON.UI.UI2.FuntionControlView.Aks.AksCommonMethod.Current.GetVideoControlsList(); |
| | | var form = new HDL_ON.UI.UI2.FuntionControlView.Aks.AksListPage(() => { |
| | | UpdateBottomView(); |
| | | }); |
| | | form.AddForm(list); |
| | | }; |
| | | break; |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面--(萤石视频门锁)跳转自己的界面--埃克斯影音中控 |
| | | if (item != ShowFunction.VideoDoorLock |
| | | && item != ShowFunction.Aks |
| | | && item != ShowFunction.Music |
| | | if ( item != ShowFunction.Music |
| | | && item != ShowFunction.Environmental |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.DoorLock |
| | | //&& ShowFunction.EnergyMonitoring != item |
| | | && ShowFunction.VideoIntercom != item |
| | | && ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Series != item |