| | |
| | | case ShowFunction.Panel: |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | functionCount = 1; |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | functionCount = FunctionList.List.sensorsArm.Count; |
| | | //functionOnCount = FunctionList.List.aCs.FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | functionCount = 1; |
| | | break; |
| | | |
| | | } |
| | |
| | | functionView.AddChidren(btnName); |
| | | |
| | | if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && functionCount != 0) |
| | | { |
| | | Button btnFunctionCount = new Button() |
| | |
| | | break; |
| | | case ShowFunction.SecurityMonitoring: |
| | | btnName.TextID = StringId.SecurityMonitoring; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | HDLCommon.Current.Go2EZvizMonitor(bodyView); |
| | | }; |
| | | break; |
| | | case ShowFunction.Sensor: |
| | | btnName.TextID = StringId.Sensor; |
| | |
| | | break; |
| | | case ShowFunction.VideoIntercom: |
| | | btnName.TextID = StringId.VideoIntercom; |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | #if __IOS__ |
| | | EZSDK.IOS.EZSDK.Go2EZvizMonitor(); |
| | | #else //安卓摄像头 |
| | | ((BaseActivity)Shared.Application.Activity).SetCamera(b => |
| | | { |
| | | if (b) |
| | | { |
| | | Android.Content.Intent intent = new Android.Content.Intent(); |
| | | var bundle = new Android.OS.Bundle(); |
| | | //传递name参数为tinyphp |
| | | //bundle.PutString("Token", ezChileAccessToken.accessToken); |
| | | bundle.PutString("Token", "ra.aamy8d1gabcnrz0jbbj4gjkpcpy55g0s-8z529x82uz-0jzly2o-g30muwagq"); |
| | | bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); |
| | | intent.PutExtras(bundle); |
| | | intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | | }); |
| | | |
| | | #endif |
| | | }; |
| | | break; |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面 |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.VideoIntercom) |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |