| | |
| | | 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; |
| | |
| | | { |
| | | case ShowFunction.Series: |
| | | functionCount = FunctionList.List.GetSeries().Count; |
| | | //functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.IpCam: |
| | | //functionCount = FunctionList.List.GetIpCamImouList().Count; |
| | |
| | | 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 = FunctionList.List.GetEzMonitorList().Count; |
| | | } |
| | | } |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.GetArmSensorList().Count; |
| | | break; |
| | |
| | | break; |
| | | case ShowFunction.SecurityCenter: |
| | | functionCount = FunctionList.List.securities.Count; |
| | | break; |
| | | case ShowFunction.Acst: |
| | | 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; |
| | |
| | | //不需要显示设备开状态数量; |
| | | Button btnFunctionCount=null; |
| | | if (item != ShowFunction.Aks |
| | | && item != ShowFunction.VideoDoorLock |
| | | && item != ShowFunction.Environmental |
| | | && item != ShowFunction.Sensor |
| | | && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.FreshAir |
| | | && item != ShowFunction.Music |
| | | && item != ShowFunction.EnergyMonitoring |
| | | && item != ShowFunction.SecurityCenter |
| | | && item != ShowFunction.IpCam |
| | | && item != ShowFunction.Acst && item != ShowFunction.IpCam |
| | | && functionCount != 0) |
| | | { |
| | | btnFunctionCount = new Button() |
| | |
| | | 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.Acst: |
| | | btnName.TextID = StringId.Acst; |
| | | |
| | | Button btnJMLogo = new Button() |
| | | { |
| | | Y = specialList.Contains(index) ? Application.GetRealWidth(147) : Application.GetRealWidth(104), |
| | | UnSelectedImagePath = "FunctionIcon/Acst/LvJianLogo.png", |
| | | Width = Application.GetRealWidth(105), |
| | | Height = Application.GetRealWidth(57), |
| | | }; |
| | | functionView.AddChidren(btnJMLogo); |
| | | |
| | | //Button btnAcstPower = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(120), |
| | | // Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117), |
| | | // Width = Application.GetRealWidth(32), |
| | | // Height = Application.GetRealWidth(32), |
| | | // SelectedImagePath = "Public/PowerOpen.png", |
| | | // UnSelectedImagePath = "Public/PowerClose.png", |
| | | // IsSelected = functionOnCount > 0, |
| | | // Tag = item + "_AllControl", |
| | | //}; |
| | | //functionView.AddChidren(btnAcstPower); |
| | | //btnAcstPower.MouseUpEventHandler = (sender, e) => |
| | | //{ |
| | | // btnAcstPower.IsSelected = !btnAcstPower.IsSelected; |
| | | // string onoff = btnAcstPower.IsSelected ? "on" : "off"; |
| | | // Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | // d.Add(FunctionAttributeKey.OnOff, onoff); |
| | | // foreach (var temp in FunctionList.List.GetAcstParentList()) |
| | | // { |
| | | // Control.Ins.SendWriteCommand(temp, d); |
| | | // } |
| | | //}; |
| | | |
| | | |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var page = new AcstParentPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | 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"; |
| | |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面--(萤石视频门锁)跳转自己的界面--埃克斯影音中控 |
| | | if ( item != ShowFunction.Aks |
| | | if (item != ShowFunction.VideoDoorLock |
| | | && item != ShowFunction.Aks |
| | | && item != ShowFunction.Music |
| | | && item != ShowFunction.Environmental |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.DoorLock |
| | | //&& ShowFunction.EnergyMonitoring != item |
| | | && ShowFunction.VideoIntercom != item |
| | | && ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Series != item) |
| | | && ShowFunction.Series != item |
| | | && ShowFunction.Acst != item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | } |
| | | index++; |
| | | } |
| | | |
| | | |
| | | |
| | | s1View.Height = s2View.Height = functionContentView.Height = functionContentViewHeight + Application.GetRealWidth(40); |