| | |
| | | <AndroidSupportedAbis>arm64-v8a</AndroidSupportedAbis> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Shared.Droid.JPush"> |
| | | <HintPath>..\DLL\Shared.Droid.JPush.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="System.Core" /> |
| | |
| | | <Reference Include="Shared.Droid.HDLLinphone"> |
| | | <HintPath>..\DLL\Linphone\Android\Shared.Droid.HDLLinphone.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Shared.Droid.JPush-Google"> |
| | | <HintPath>..\..\第三方功能\极光\lib\Shared.Droid.JPush-Google.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="MainActivity.cs" /> |
| | | <Compile Include="Other\JPush\JPushFirmBroadcast.cs" /> |
| | | <Compile Include="Other\JPush\JPushOpenClickActivity.cs" /> |
| | | <Compile Include="Resources\Resource.designer.cs" /> |
| | |
| | | <Compile Include="Zxing\CustomCaptureActivity.cs" /> |
| | | <Compile Include="Zxing\ScanActivity.cs" /> |
| | | <Compile Include="LeChengVideo\LeTest.cs" /> |
| | | <Compile Include="Other\LocationUtils.cs" /> |
| | | <Compile Include="Other\MyLocationListener_V2.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\electricaltvhisense.png" /> |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\aks.png" /> |
| | | <AndroidAsset Include="Assets\Phone\AksIcon\like.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\caidan.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\offbj.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\offtvbj.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\onbj.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\shouye.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjia.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjian.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\electricaltvhisense.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricaltvhisense_blue.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\guan.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\kai.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\kaiguanSelected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\shouyeSelected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjianSelected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\HisenseTv\yingliangjiaSelected.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\IlluminationBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\IlluminationIcon.png" /> |
| | | <AndroidAsset Include="Assets\Phone\Collection\GatewayOnlineTipIcon.png" /> |
| | |
| | | <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" /> |
| | | <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" /> |
| | | <PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="28.0.0.3" /> |
| | | <PackageReference Include="Xamarin.Essentials" Version="1.7.0" /> |
| | | <PackageReference Include="Xamarin.Android.Support.v4"> |
| | | <Version>28.0.0.3</Version> |
| | | </PackageReference> |
| | |
| | | </PackageReference> |
| | | <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4"> |
| | | <Version>1.0.0.23</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Xamarin.AndroidX.Browser"> |
| | | <Version>1.8.0</Version> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | <Folder Include="Assets\Phone\AksIcon\" /> |
| | | <Folder Include="Assets\Phone\HisenseTv\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\GroupControl\" /> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | |
| | | using Android.App; |
| | | using Android.Content; |
| | | using Android.OS; |
| | | |
| | | using Com.Hdl.ON.Jpush.Androidjpush; |
| | | |
| | | using Android.Views; |
| | | |
| | | namespace HDL_ON_Android |
| | |
| | | { |
| | | broadcastIntent.SetComponent(componentName); |
| | | } |
| | | FirmOpenClickHelper.Instance.HandleOpenClick(this, intent, broadcastIntent); |
| | | //FirmOpenClickHelper.Instance.HandleOpenClick(this, intent, broadcastIntent); |
| | | Finish(); |
| | | |
| | | } |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.5" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202405201"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="33" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
| | | <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>--> |
| | | <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>--> |
| | | <!--<uses-permission android:name="android.permission.INTERNET"/>--> |
| | | <!-- 乐橙可视对讲需要的权限 --> |
| | | <!--<uses-permission android:name="android.permission.INTERNET" />--> |
| | | <!--网络访问--> |
| | | <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />--> |
| | | <!--允许程序写入外部存储,如SD卡上写文件,抓图、录制等--> |
| | | <!--<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />--> |
| | | <!--程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,我的文件等--> |
| | | <uses-permission android:name="android.permission.USE_CREDENTIALS" /> |
| | | <!--允许程序请求验证从AccountManager???--> |
| | | <!--<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />--> |
| | | <!--允许改变WiFi多播状态???--> |
| | | <!--<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />--> |
| | | <!--允许程序显示系统窗口,应该已经不适用了???--> |
| | | <!--<uses-permission android:name="android.permission.RECORD_AUDIO" />--> |
| | | <!--允许程序录制声音通过手机或耳机的麦克,对讲、自定义报警音等--> |
| | | <!--<uses-permission android:name="android.permission.CAMERA" />--> |
| | | <!--允许程序访问摄像头进行拍照,二维码扫描补光、拍照上传图片等--> |
| | | <uses-permission android:name="android.permission.FLASHLIGHT" /> |
| | | <!--允许访问闪光灯,二维码扫描补光--> |
| | | <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> |
| | | <!--允许程序修改声音设置信息,声波配对,自动调大音量。需求变更之后应该不需要了???--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />--> |
| | | <!--允许程序获取当前WiFi接入的状态以及WLAN热点的信息,设备添加何种配网流程使用--> |
| | | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> |
| | | <!--允许程序改变WiFi状态,配网等--> |
| | | <!--<uses-feature android:name="android.hardware.camera" />--> |
| | | <!--<uses-feature android:name="android.hardware.camera.autofocus" />--> |
| | | <!-- 硬件加速对X5视频播放非常重要,建议开启 --> |
| | | <uses-permission android:name="android.permission.READ_SETTINGS" /> |
| | | <!--允许程序读取系统设置,声波配对获取当前系统音量等--> |
| | | <!-- Optional for location --> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />--> |
| | | <!--允许一个程序访问CellID或 WiFi热点来获取粗略的位置,登陆、设备添加等--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />--> |
| | | <!--允许一个程序访问CellID或 WiFi热点来获取精确的位置,登陆、设备添加等???--> |
| | | <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> |
| | | <!--允许应用程序访问额外的位置提供命令,登陆、设备添加等???--> |
| | | <!--<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />--> |
| | | <!--允许程序改变网络状态,如是否联网,配网???--> |
| | | <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />--> |
| | | <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> |
| | | <!--允许应用程序请求安装包。针对API大于22必须持有该许可使用ACTION_INSTALL_PACKAGE应用。应该没在用???--> |
| | | <uses-permission android:name="android.permission.VIBRATE" /> |
| | | <!-- 可视对讲权限--> |
| | | <uses-permission android:name="android.permission.CAMERA" /> |
| | | <uses-feature android:name="android.hardware.camera" /> |
| | | <uses-feature android:name="android.hardware.camera.autofocus" /> |
| | | <uses-permission android:name="android.permission.INTERNET" /> |
| | | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.VIBRATE" /> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.RECORD_AUDIO" /> |
| | | <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> |
| | | <!-- 定位权限 --> |
| | | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
| | | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> |
| | | <!-- 拍照权限 --> |
| | | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.CAMERA" /> |
| | | <!-- 在安卓P版本之后,必须要授予FOREGROUND_SERVICE权限,才能够使用前台服务 --> |
| | | <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> |
| | | <!-- 播放本地音乐权限--> |
| | | <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> |
| | | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| | | <!--极光推送 Required 一些系统要求的权限,如访问网络等--> |
| | | <!-- Required 一些系统要求的权限,如访问网络等--> |
| | | <permission android:name="com.hdl.onpro.permission.JPUSH_MESSAGE" android:protectionLevel="signature" /> |
| | | <!-- Required --> |
| | | <uses-permission android:name="com.hdl.onpro.permission.JPUSH_MESSAGE" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> |
| | | <uses-permission android:name="android.permission.INTERNET" /> |
| | | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> |
| | | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> |
| | | <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> |
| | | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> |
| | | <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> |
| | | <uses-permission android:name="android.permission.READ_LOGS" /> |
| | | <!-- 极光推送结束 --> |
| | | <application android:allowBackup="true" android:debuggable="false" android:icon="@drawable/Icon" android:requestLegacyExternalStorage="true" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro"> |
| | | <!--/扫描二维码activity--> |
| | | <!--<activity |
| | | android:name="com.journeyapps.barcodescanner.CaptureActivity" |
| | | android:screenOrientation="portrait" |
| | | tools:replace="screenOrientation" />--> |
| | | <!--CustomCaptureActivity--> |
| | | <!--<activity |
| | | android:name=".CustomCaptureActivity" |
| | | android:screenOrientation="portrait" |
| | | tools:replace="screenOrientation" />--> |
| | | <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.onpro.fileProvider" android:grantUriPermissions="true" android:exported="false"> |
| | | <application |
| | | android:allowBackup="true" |
| | | android:supportsRtl="true" |
| | | tools:replace="android:allowBackup,android:label,android:supportsRtl" |
| | | android:debuggable="false" |
| | | android:icon="@drawable/Icon" |
| | | android:requestLegacyExternalStorage="true" |
| | | android:networkSecurityConfig="@xml/network_security_config" |
| | | android:largeHeap="true" |
| | | android:label="On Pro"> |
| | | <provider |
| | | tools:replace="android:authorities" |
| | | android:name="android.support.v4.content.FileProvider" android:authorities="com.hdl.onpro.fileProvider" android:grantUriPermissions="true" android:exported="false"> |
| | | <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" /> |
| | | </provider> |
| | | <!--极光推送--> |
| | | <provider android:name="Shared.Droid.JPush.HmsContentProvider" android:authorities="${applicationId}.hmspushprovider" android:exported="false"></provider> |
| | | <!-- Required SDK 核心功能--> |
| | | <!-- 可配置 android:process 参数将 PushService 放在其他进程中 --> |
| | | <service android:name="cn.jpush.android.service.PushService" android:enabled="true" android:exported="false"> |
| | |
| | | <!-- since 3.1.0 Required SDK 核心功能--> |
| | | <provider android:authorities="com.hdl.onpro.DownloadProvider" android:name="cn.jpush.android.service.DownloadProvider" android:exported="true" /> |
| | | <!-- Required SDK 核心功能--> |
| | | <receiver android:name="cn.jpush.android.service.PushReceiver" android:enabled="true"> |
| | | <receiver android:name="cn.jpush.android.service.PushReceiver" android:enabled="true" |
| | | android:exported="true"> |
| | | <intent-filter android:priority="1000"> |
| | | <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> |
| | | <category android:name="com.hdl.onpro" /> |
| | |
| | | <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" /> |
| | | <!-- Required. AppKey copied from Portal --> |
| | | <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" /> |
| | | <meta-data android:name="XIAOMI_APPKEY" android:value="MI-5871892343860" /> |
| | | <meta-data android:name="XIAOMI_APPID" android:value="MI-2882303761518923860" /> |
| | | <meta-data android:name="OPPO_APPKEY" android:value="OP-e942dafe77cf4b9f868d5421d701655a" /> |
| | | <meta-data android:name="OPPO_APPID" android:value="OP-30619979" /> |
| | | <meta-data android:name="OPPO_APPSECRET" android:value="OP-11d511c42f654cafac99588322681003" /> |
| | | <!-- 极光推送结束 --> |
| | | <!-- 设置高德地图key --> |
| | | <meta-data android:name="com.amap.api.v2.apikey" android:value="9901dd06e30b229efdd4c5bf5e076224" /> |
| | | </application> |
| | | </manifest> |
| | |
| | | using Android.Support.V4.Content; |
| | | using CN.Jpush.Android.Api; |
| | | //using Android.Widget; |
| | | using Com.Hdl.ON.Jpush.Androidjpush; |
| | | using HDL_ON; |
| | | using Java.Util; |
| | | using Shared; |
| | |
| | | { |
| | | //报警推送弹窗提示 |
| | | ShowAlarmPushMessage(jpushMessageInfo, true); |
| | | //萤石门锁推送 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); |
| | | } |
| | | else if (jpushMessageInfo.messageType == (PushMessageType.FLCall.ToString())) |
| | | { |
| | |
| | | //eSVideoInfo.Lc_Psk = json["cname"].ToString(); |
| | | eSVideoInfo.Lc_Psk = json["psk"].ToString();//2021-10-15 PSK字段不能取cname |
| | | } |
| | | else if (interphoneTypeEnum == InterphoneType.EZVIZ.ToString()) |
| | | { |
| | | //萤石猫眼 |
| | | eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"子账号token |
| | | eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//设备序列号 |
| | | eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString(); |
| | | eSVideoInfo.spk = json["spk"].ToString(); |
| | | |
| | | eSVideoInfo.HomeId = jpushMessageInfo.HomeId; |
| | | if (json.ContainsKey("msgId") && !string.IsNullOrEmpty(json["msgId"].ToString())) |
| | | { |
| | | eSVideoInfo.msgId = json["msgId"].ToString(); |
| | | } |
| | | if (json.ContainsKey("currentTime") && !string.IsNullOrEmpty(json["currentTime"].ToString())) |
| | | { |
| | | eSVideoInfo.currentTime = json["currentTime"].ToString(); |
| | | } |
| | | } |
| | | |
| | | else if (interphoneTypeEnum == InterphoneType.HDL.ToString()) |
| | | { |
| | | try |
| | |
| | | else if (jpushMessageInfo.messageType == (PushMessageType.Prompt.ToString())) |
| | | { |
| | | ShowAlarmPushMessage(jpushMessageInfo, false); |
| | | //萤石门锁推送 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); |
| | | } |
| | | else if (jpushMessageInfo.messageType == (PushMessageType.DOOR_BELL.ToString())) |
| | | { |
| | | //萤石门锁推送 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 跳转打开萤石云方法 |
| | | |
| | | /// <summary> |
| | | /// 获取子账号token并跳转设备列表页面 |
| | | /// </summary> |
| | | /// <param name="bodyView"></param> |
| | | public void Go2EZvizMonitor(FrameLayout bodyView) |
| | | { |
| | | var waitPage = new Loading(); |
| | | bodyView.AddChidren(waitPage); |
| | | waitPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | |
| | | new Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var list = UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockLockModelsList(); |
| | | //先获取萤石云子账号token |
| | | var result = new HttpServerRequest().EZGetChildToken(); |
| | | if (result.Code == StateCode.SUCCESS) |
| | | { |
| | | var ezChildAccessToken = result.Data.ToString(); |
| | | |
| | | //var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString()); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!string.IsNullOrEmpty(ezChildAccessToken)) |
| | | { |
| | | |
| | | #if __IOS__ |
| | | |
| | | //iOS |
| | | //初始化萤石云SDK,中文国内key、英文海外key 开发者账号使用应用包名申请的APPKEY,不同包名应用需配置不同的APPKEY |
| | | EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); |
| | | //1.设置所需河东的AccessToken和RefreshToken、域名地址 |
| | | EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken); |
| | | EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id); |
| | | //2.设置萤石子账号的AccessToken到SDK |
| | | EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken); |
| | | |
| | | //////3.打开摄像头设备列表页面 |
| | | //EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor(); |
| | | |
| | | //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo(); |
| | | //info.de |
| | | //EZSDK.IOS.EZSDK.Play(info); |
| | | |
| | | //2023年03月29日13:08:35 修改 |
| | | Foundation.NSObject[] nSObject = new Foundation.NSObject[list.Count]; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | string strValue = list[i]; |
| | | nSObject[i] = new Foundation.NSString(strValue); |
| | | } |
| | | EZSDK.IOS.EZSDK.SharedInstance().ToEZDeviceListViewWithFilterTypes(nSObject); |
| | | |
| | | |
| | | |
| | | #else |
| | | //Android |
| | | //1.设置所需河东的token、域名地址 |
| | | //2.设置萤石子账号的token |
| | | //3.打开摄像头设备列表页面 |
| | | ((BaseActivity)Shared.Application.Activity).SetCamera(b => |
| | | { |
| | | if (b) |
| | | { |
| | | ((BaseActivity)Shared.Application.Activity).SetPermission(result => |
| | | { |
| | | //2023年03月29日13:08:35 修改 |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list); |
| | | //if (result) |
| | | //{ |
| | | // Android.Content.Intent intent = new Android.Content.Intent(); |
| | | // var bundle = new Android.OS.Bundle(); |
| | | // //传递name参数为tinyphp |
| | | // bundle.PutString("EzChildAccessToken", ezChildAccessToken); |
| | | // bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); |
| | | // bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost); |
| | | // bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b"); |
| | | // bundle.PutInt("Platform", 1); |
| | | // bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | // intent.PutExtras(bundle); |
| | | // intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); |
| | | // Shared.Application.Activity.StartActivity(intent); |
| | | //} |
| | | }, "android.permission.RECORD_AUDIO"); |
| | | |
| | | } |
| | | }); |
| | | #endif |
| | | |
| | | |
| | | } |
| | | |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | if (result.Code != "-1") |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (waitPage != null) |
| | | { |
| | | waitPage.RemoveFromParent(); |
| | | waitPage = null; |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | |
| | | } |
| | | else if (interphoneType == InterphoneType.EZVIZ.ToString()) |
| | | { |
| | | ((BaseActivity)Shared.Application.Activity).SetCamera(b => |
| | | { |
| | | if (b) |
| | | { |
| | | intent = new Android.Content.Intent(); |
| | | var bundle = new Android.OS.Bundle(); |
| | | //传递name参数为tinyphp |
| | | bundle.PutString("EzChildAccessToken", mESVideoInfo.Lc_AccessToken); |
| | | bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString); |
| | | bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost); |
| | | bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b"); |
| | | bundle.PutInt("Platform", 1); |
| | | bundle.PutString("HomeId", mESVideoInfo.HomeId); |
| | | bundle.PutString("DeviceSerial", mESVideoInfo.DeviceSerial); |
| | | intent.PutExtras(bundle); |
| | | //获取萤石token,初始化sdk |
| | | var result = new HttpServerRequest().EZGetChildToken(); |
| | | if (result.Code == StateCode.SUCCESS) |
| | | { |
| | | var ezChildAccessToken = result.Data.ToString(); |
| | | |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); |
| | | |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity, |
| | | mESVideoInfo.Lc_DeviceId, mESVideoInfo.DeviceSerial, mESVideoInfo.spk, mESVideoInfo.msgId); |
| | | } |
| | | |
| | | //intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity")); |
| | | //Shared.Application.Activity.StartActivity(intent); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | else if (interphoneType == InterphoneType.HDL.ToString()) |
| | | { |
| | | //HDL Linphone 狄耐克 |
| | |
| | | /// <summary> |
| | | /// 萤石猫眼呼叫 |
| | | /// </summary> |
| | | EZVIZ, |
| | | //EZVIZ, |
| | | /// <summary> |
| | | /// 狄耐克 HDL Linphone |
| | | /// </summary> |
| | |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | ShowFunction.MechanicalArm , |
| | | ShowFunction.SecurityMonitoring, |
| | | ShowFunction.VideoDoorLock, |
| | | ShowFunction.Series, |
| | | ShowFunction.Aks, |
| | | }; |
| | | } |
| | | return dddd; |
| | |
| | | /// <summary> |
| | | /// 安防监控 |
| | | /// </summary> |
| | | SecurityMonitoring = 0x20, |
| | | //SecurityMonitoring = 0x20, |
| | | /// <summary> |
| | | /// 可视对讲 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 萤石视频门锁 |
| | | /// </summary> |
| | | VideoDoorLock = 0x26, |
| | | //VideoDoorLock = 0x26, |
| | | /// <summary> |
| | | /// 跑马灯(序列) |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 影音中控 |
| | | /// </summary> |
| | | Aks = 0x28, |
| | | //Aks = 0x28, |
| | | |
| | | |
| | | } |
| | |
| | | Right,//00024=右 |
| | | Down,//00025=下 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 表示来自那个界面 |
| | | /// </summary> |
| | | public enum Comerom |
| | | { |
| | | function,//功能 |
| | | collect,//收藏 |
| | | room,//房间 |
| | | push,//推送 |
| | | sanfan,//添加第三方设备 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 弹框类型 |
| | | /// </summary> |
| | | public enum TipType |
| | | { |
| | | none,//无提示 |
| | | flicker,//闪烁框 |
| | | confirmation//确认框 |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | public bool online { |
| | | get |
| | | { |
| | | if (spk == SPK.AirSwitchP3|| spk == SPK.ElectricalTvHisense) |
| | | if (spk == SPK.AirSwitchP3) |
| | | { |
| | | return _online; |
| | | } |
| | |
| | | }); |
| | | |
| | | } |
| | | else if (spk == SPK.ElectricalTvHisense) |
| | | { |
| | | list.Add(new FunctionAttributes |
| | | { |
| | | key = FunctionAttributeKey.OnOff, |
| | | curValue = string.Empty, |
| | | }); |
| | | list.Add(new FunctionAttributes |
| | | { |
| | | key = FunctionAttributeKey.SetVolume, |
| | | curValue = string.Empty, |
| | | }); |
| | | list.Add(new FunctionAttributes |
| | | { |
| | | key = FunctionAttributeKey.Signal, |
| | | curValue = string.Empty, |
| | | }); |
| | | } |
| | | //else if (spk == SPK.ElectricalTvHisense) |
| | | //{ |
| | | // list.Add(new FunctionAttributes |
| | | // { |
| | | // key = FunctionAttributeKey.OnOff, |
| | | // curValue = string.Empty, |
| | | // }); |
| | | // list.Add(new FunctionAttributes |
| | | // { |
| | | // key = FunctionAttributeKey.SetVolume, |
| | | // curValue = string.Empty, |
| | | // }); |
| | | // list.Add(new FunctionAttributes |
| | | // { |
| | | // key = FunctionAttributeKey.Signal, |
| | | // curValue = string.Empty, |
| | | // }); |
| | | //} |
| | | else |
| | | { |
| | | list.AddRange(attributes); |
| | |
| | | /// <summary> |
| | | /// 萤石视频门锁 |
| | | /// </summary> |
| | | public const string VideoDoorLock="security.door.ezviz"; |
| | | //public const string VideoDoorLock="security.door.ezviz"; |
| | | /// <summary> |
| | | /// 萤石摄像头 |
| | | /// </summary> |
| | | public const string Ev_Ipcam = "security.ipcam.ez"; |
| | | //public const string Ev_Ipcam = "security.ipcam.ez"; |
| | | /// <summary> |
| | | /// 影音中控 |
| | | /// </summary> |
| | | public const string AvZkAiks = "av.zk.aiks"; |
| | | //public const string AvZkAiks = "av.zk.aiks"; |
| | | |
| | | /// <summary> |
| | | /// 萤石视频门锁spk列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<string> GetVideoDoorLockSPKList() |
| | | { |
| | | var list = new List<string>(); |
| | | list.Add(VideoDoorLock); |
| | | return list; |
| | | } |
| | | //public static List<string> GetVideoDoorLockSPKList() |
| | | //{ |
| | | // var list = new List<string>(); |
| | | // list.Add(VideoDoorLock); |
| | | // return list; |
| | | //} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 影音中控spk列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<string> GetVideoControlsSPKList() |
| | | { |
| | | var list = new List<string> |
| | | { |
| | | AvZkAiks |
| | | }; |
| | | return list; |
| | | } |
| | | //public static List<string> GetVideoControlsSPKList() |
| | | //{ |
| | | // var list = new List<string> |
| | | // { |
| | | // AvZkAiks |
| | | // }; |
| | | // return list; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 萤石摄像头spk列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<string> GetEvIpcamSPKList() |
| | | { |
| | | var list = new List<string>(); |
| | | list.Add(Ev_Ipcam); |
| | | return list; |
| | | } |
| | | //public static List<string> GetEvIpcamSPKList() |
| | | //{ |
| | | // var list = new List<string>(); |
| | | // list.Add(Ev_Ipcam); |
| | | // return list; |
| | | //} |
| | | |
| | | #region 灯光 |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 海信电视 |
| | | /// </summary> |
| | | public const string ElectricalTvHisense = "electrical.tv.hisense"; |
| | | //public const string ElectricalTvHisense = "electrical.tv.hisense"; |
| | | /// <summary> |
| | | /// 家电、插座 |
| | | /// </summary> |
| | |
| | | spkList.Add(ElectricTuyaWaterValve); |
| | | spkList.Add(ElectricTuyaWaterValve2); |
| | | spkList.Add(AirSwitch); |
| | | spkList.Add(ElectricalTvHisense); |
| | | //spkList.Add(ElectricalTvHisense); |
| | | return spkList; |
| | | } |
| | | |
| | |
| | | var spkList = SPK.GetDoorLockSPKList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | /// <summary> |
| | | /// 获取萤石视频门锁 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetVideoDoorLockList() |
| | | { |
| | | var spkList = SPK.GetVideoDoorLockSPKList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取影音中控列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetVideoControlsList() |
| | | { |
| | | var spkList = SPK.GetVideoControlsSPKList(); |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 新风列表 |
| | |
| | | /// </summary> |
| | | public void DeleteFunction(Function delTemp) |
| | | { |
| | | if(delTemp == null) |
| | | { |
| | | return; |
| | | } |
| | | Functions.Remove(Functions.Find((obj) => obj.deviceId == delTemp.deviceId)); |
| | | FileUtlis.Files.DeleteFile(delTemp.savePath); |
| | | } |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31UsbMusicList.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\CommonMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Music\A31FlieList.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideDoorLockSend.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\StackTraceLog.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\ObjectClass.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\CommonMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorLockListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\OrderFunctionPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Face\FaceManagementPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\DeliveryQrCodePage.cs" />
|
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\ColorfulSettingPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\ColorfulInfoPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Light\GroupControlPage_V2.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockHistoryPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SetSceneRgbColorfulModePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\LogicSeriesSettingPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockUserManagerPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockUserListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\UnlockSettingPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\UnlockSettingFacePage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockFaceUnlockTriggerSettingPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockFaceUnlockHelpPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockAudioSetupPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\VideoDoorLock\VideoDoorlockBatteryManagementPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\2-Classification\SeriesFunctionListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\AksListPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\AksCommonMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\AksPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\ButtonFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\CornerFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\BaseFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\MenuFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\TypeSingleFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\TypeMultiFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\VerticalBoutonFLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\SxqPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\HorizontalFramLayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\YkPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\ImageFramlayout.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CollectPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\DetailPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\TvPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\JdhPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\MusicPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\GfPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\TyyPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\YkqPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\SendMethod.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\RemoteControlEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\SequencerEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\FilterCategoryEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\KeypadEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\MovieLibraryInfoEntity.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTvPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \Send.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \HisenseTVFunctionalAttributeConstant.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\AirSwitchP3Page.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\AirSwitchP3EnergyPage.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\AirSwitchP3SubloopEnergyPage.cs" />
|
| | |
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Acst\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\Face\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\CombinedDimming\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\" />
|
| | | <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \" />
|
| | | </ItemGroup>
|
| | | </Project> |
| | |
| | | SPK.GroupControl, |
| | | SPK.AvMusic, |
| | | SPK.MusicStandard, |
| | | SPK.ElectricalTvHisense, |
| | | SPK.OtherCommon, |
| | | |
| | | }; |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | } |
| | | } |
| | | #endif |
| | | break; |
| | | case SPK.VideoDoorLock: { |
| | | //萤石视频门锁 |
| | | var form = new VideoDoorLockPage(function, btnName, btnFromFloor,comerom,action); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | | } |
| | | break; |
| | | case SPK.AvZkAiks: |
| | | { |
| | | //影音中控 |
| | | var form = new UI2.FuntionControlView.Aks.AksPage(function, btnName, btnFromFloor, comerom, action); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | //海信电视 |
| | | var form = new UI2.FuntionControlView.HisenseTV.HisenseTvPage(function, btnName, btnFromFloor,btnCollectionIcon, comerom, action); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | | |
| | | } |
| | | break; |
| | | } |
| | | }; |
| | |
| | | |
| | | |
| | | #if DEBUG |
| | | var hesTv = new Function() |
| | | { |
| | | sid = "hisense000000000001", |
| | | deviceId = "hisense000000000001", |
| | | name = "海信电视", |
| | | spk = SPK.ElectricalTvHisense, |
| | | |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "wol",value =new List<string>(){ "on" }, curValue="on",state = "on" }, |
| | | } |
| | | }; |
| | | hesTv.SaveFunctionFile(); |
| | | |
| | | |
| | | |
| | | var airSwitchP3 = new Function() |
| | |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | } |
| | | else if (function.spk == SPK.VideoDoorLock) |
| | | { |
| | | btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); |
| | | //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | } |
| | | else if (function.spk == SPK.AvZkAiks) |
| | | { |
| | | //为了去掉开关按钮 |
| | | btnIcon.UnSelectedImagePath = "AksIcon/yingyinzhongkong1.png"; |
| | | } |
| | | else if (function.spk == SPK.GroupControl) |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | |
| | | }; |
| | | |
| | | |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect,()=> { |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, Comerom.collect,()=> { |
| | | this.LoadDeviceFunctionControlZone();//删除设备后重新刷新UI |
| | | }); |
| | | view.MouseUpEventHandler = skipControlPageEvent; |
| | |
| | | using System.Collections.Generic; |
| | | using System.Threading; |
| | | using HDL_ON.DAL.Server; |
| | | //#if DEBUG |
| | | //using Xamarin.Essentials; |
| | | //#endif |
| | | namespace HDL_ON.UI |
| | | { |
| | | /// <summary> |
| | |
| | | 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; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | if (functionCount == 0) |
| | |
| | | |
| | | //不需要显示设备开状态数量; |
| | | 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 |
| | |
| | | { |
| | | btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else if (function.spk == SPK.VideoDoorLock) |
| | | { |
| | | btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.function); |
| | | } |
| | | else if (function.spk == SPK.AvZkAiks) |
| | | { |
| | | //隐藏开关按钮 |
| | | btnIcon.UnSelectedImagePath = "AksIcon/aks.png"; |
| | | } |
| | | else if(function.spk == SPK.GroupControl) { } |
| | | else if (function.spk == SPK.HvacCac) |
| | | { |
| | |
| | | // btnFromFloor.MouseUpEventHandler = handler; |
| | | // return; |
| | | //} |
| | | var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.room,this.action); |
| | | var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, Comerom.room,this.action); |
| | | this.MouseUpEventHandler = eventHandler; |
| | | btnName.MouseUpEventHandler = eventHandler; |
| | | btnFromFloor.MouseUpEventHandler = eventHandler; |
| | |
| | | functionListView.AddChidren(functionDiv); |
| | | |
| | | } |
| | | else if (function.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | Action deviceDelAction = () => |
| | | { |
| | | //删除设备成功后更新UI |
| | | if (functionListView==null) { |
| | | return; |
| | | } |
| | | functionListView.RemoveAll(); |
| | | showList.Remove(function);//先移除 |
| | | ShowFunctionRow(showList,isAppend); |
| | | this.DelAction?.Invoke(); |
| | | |
| | | }; |
| | | var functionDiv = new FunctionControlZone(function, deviceDelAction) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(96), |
| | | Radius = (uint)Application.GetMinRealAverage(12), |
| | | BorderColor = 0x00FFFFFF, |
| | | BorderWidth = 1, |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Tag = function.spk + function.sid |
| | | }; |
| | | functionDiv.LoadFunctionDiv(); |
| | | functionDiv.OrderEvent = OrderEvent; |
| | | functionListView.AddChidren(functionDiv); |
| | | } |
| | | else |
| | | { |
| | | var functionDiv = new FunctionControlZone(function, null) |
| | |
| | | using Shared; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | |
| | | |
| | | namespace HDL_ON.UI.UI2.Intelligence.Automation |
| | |
| | | } |
| | | } |
| | | break; |
| | | //萤石视频门锁 |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | LogicView.FunTypeView view1 = new LogicView.FunTypeView(); |
| | | view1.btnText.TextID=StringId.kaimenrenyuan; |
| | | view1.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | fLayout.AddChidren(view1.FLayoutView()); |
| | | view1.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.identifier = "open_door";//开锁事件 |
| | | this.VideoDoorLockAction(this, device, view1.btnState); |
| | | }; |
| | | if (edit) |
| | | { |
| | | this.GetEditState(device, index, view1.btnState,null, null, null); |
| | | } |
| | | } |
| | | break; |
| | | //猫眼 |
| | | case SPK.Peephole: |
| | | LogicView.FunTypeView viewPeephole = new LogicView.FunTypeView(); |
| | |
| | | this.GetEditState(device, index, viewPeephole.btnState, null, null, null); |
| | | } |
| | | break; |
| | | //萤石摄像头 |
| | | case SPK.Ev_Ipcam: |
| | | LogicView.FunTypeView viewEzIpcam = new LogicView.FunTypeView(); |
| | | viewEzIpcam.btnText.TextID = StringId.ActivityDetection; |
| | | //viewEzIpcam.btnText.Name = Language.StringByID(StringId.shipinmensuo); |
| | | fLayout.AddChidren(viewEzIpcam.FLayoutView()); |
| | | viewEzIpcam.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.identifier = Constant.intelligentDetection_event;//人体感应告警 |
| | | this.DeviceView(device, viewEzIpcam.btnState, StringId.shi, StringId.offLogic, 1); |
| | | |
| | | }; |
| | | if (edit) |
| | | { |
| | | this.GetEditState(device, index, viewEzIpcam.btnState, null, null, null); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | #region 保存 |
| | | ///保存View |
| | |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | else if(device.spk == SPK.Ev_Ipcam) |
| | | { |
| | | //萤石摄像头-移动监测告警 |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | else if (device.spk == SPK.VideoDoorLock) |
| | | { |
| | | ////萤石视频门锁 |
| | | inputDevice.condition_type = "9"; |
| | | inputDevice.identifier = this.identifier; |
| | | //inputDevice.condition = new List<Dictionary<string, string>>(); |
| | | } |
| | | else if (device.spk == SPK.SensorPirHold) |
| | | { |
| | |
| | | frame.AddChidren(loading); |
| | | loading.Start(); |
| | | |
| | | CommonMethod.Current.SunThread(() => |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | var faceIdList = Send.Current.GetListHomeFace(device.deviceId, true); |
| | | |
| | | CommonMethod.Current.MainThread(() => |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | string stateValue = btnState.Tag == null ? "" : btnState.Tag.ToString(); |
| | |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | }) |
| | | { IsBackground = true}.Start(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 萤石视频门锁专用 |
| | | /// </summary> |
| | | /// <param name="frame">当前界面</param> |
| | | /// <param name="device">当前设备</param> |
| | | /// <param name="btnState">旧状态</param> |
| | | public void VideoDoorLockAction(FrameLayout frame, Entity.Function device, Button btnState) |
| | | { |
| | | selectedState = device.spk + "_"; |
| | | Loading loading = new Loading(); |
| | | frame.AddChidren(loading); |
| | | loading.Start(); |
| | | CommonMethod.Current.SunThread(() => |
| | | { |
| | | try |
| | | { |
| | | var faceIdList = Send.Current.GetVideoDoorLockUserListInfo(device); |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | |
| | | loading.Hide(); |
| | | string stateValue = btnState.Text == null ? "" : btnState.Text.ToString(); |
| | | PublicInterface publicInterface = new PublicInterface(); |
| | | publicInterface.MultiSelectShow(this, faceIdList, device.name, stateValue, (indexeList) => |
| | | { |
| | | if (indexeList.Count > 0) |
| | | { |
| | | dicSateteList.Clear(); |
| | | string seleTxet = string.Empty; |
| | | string tag = string.Empty; |
| | | string[] array = new string[indexeList.Count]; |
| | | |
| | | for (int i = 0; i < indexeList.Count; i++) |
| | | { |
| | | if (i > faceIdList.Count) |
| | | { |
| | | continue; |
| | | } |
| | | var indexe = indexeList[i]; |
| | | var face = faceIdList[indexe]; |
| | | tag += face.userId; |
| | | tag += "_"; |
| | | array[i] = face.userName; |
| | | } |
| | | seleTxet = Newtonsoft.Json.JsonConvert.SerializeObject(array); |
| | | //数据封装<高胜说萤石那边是推送用户名> |
| | | AddDictionary("open_user",seleTxet, "string", "[]"); |
| | | //界面显示选中值 |
| | | btnState.Text = InpOrOutLogicMethod.Current.RemoveLastStr(seleTxet); |
| | | btnState.Tag = tag; |
| | | } |
| | | |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 时间方法 |
| | |
| | | if (inputs.identifier == "pir_event") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.shi ); |
| | | } |
| | | break; |
| | | case SPK.Ev_Ipcam: |
| | | if (inputs.identifier == Constant.intelligentDetection_event) |
| | | { |
| | | button1.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | return false; |
| | | } |
| | | if (this.function.spk == SPK.VideoDoorLock || |
| | | if ( |
| | | this.function.spk == SPK.doorgate |
| | | ) |
| | | { |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | string userName = string.Empty; |
| | | string tag = string.Empty; |
| | | for (int b = 0; b < dicList.Count; b++) |
| | | { |
| | | var dic = dicList[b]; |
| | | //var userId = dic["value"].ToString(); |
| | | //var FaceItem = this.GetVideoDoorLockUserItem(userId, device); |
| | | //s += FaceItem.userName; |
| | | //s += ","; |
| | | //tag += FaceItem.userId; |
| | | //tag += "_"; |
| | | userName = dic["value"].ToString(); |
| | | } |
| | | inputView.btnState.Text = RemoveLastStr(userName); |
| | | } |
| | | break; |
| | | case SPK.doorgate: |
| | | { |
| | | |
| | |
| | | inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case SPK.Ev_Ipcam: |
| | | if (inputCondition.identifier == Constant.intelligentDetection_event) |
| | | { |
| | | inputView.btnState.Text = Language.StringByID(StringId.shi); |
| | | } |
| | | break; |
| | | case SPK.Peephole: |
| | |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | string on = GetKeyValue("wol", dicList); |
| | | string off = GetKeyValue("on_off", dicList); |
| | | string volumet = GetKeyValue("set_volume", dicList); |
| | | string signal = GetKeyValue("signal", dicList); |
| | | |
| | | if (!string.IsNullOrEmpty(off)) |
| | | { |
| | | stateStr = Language.StringByID(StringId.offLogic); |
| | | //如果关了,其它属性不显示 |
| | | break; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(on)) |
| | | { |
| | | stateStr = Language.StringByID(StringId.onLogic); |
| | | } |
| | | if (!string.IsNullOrEmpty(stateStr)) |
| | | { |
| | | stateStr += ","; |
| | | } |
| | | if (!string.IsNullOrEmpty(volumet)) |
| | | { |
| | | stateStr += Language.StringByID(StringId.yinliang) + volumet; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(stateStr)) |
| | | { |
| | | stateStr += ","; |
| | | } |
| | | if (!string.IsNullOrEmpty(signal)) |
| | | { |
| | | var p = new PublicInterface(); |
| | | string key = p.GetKey(p.GetHisenseSignalSourceDic(), signal); |
| | | stateStr += key; |
| | | } |
| | | stateStr = stateStr.TrimEnd(','); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | break; |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | string userName = string.Empty; |
| | | string tag = string.Empty; |
| | | for (int b = 0; b < dicList.Count; b++) |
| | | { |
| | | var dic = dicList[b]; |
| | | //var userId = dic["value"].ToString(); |
| | | //var FaceItem = this.GetVideoDoorLockUserItem(userId, device); |
| | | //s += FaceItem.userName; |
| | | //s += ","; |
| | | //tag += FaceItem.userId; |
| | | //tag += "_"; |
| | | userName = dic["value"].ToString(); |
| | | |
| | | } |
| | | button1.Text = RemoveLastStr(userName); |
| | | button1.Tag = tag; |
| | | } |
| | | break; |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | { |
| | |
| | | catch { } |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | switch (dic["key"]) |
| | | { |
| | | case "on_off": |
| | | { |
| | | if (value == "off") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.offLogic); |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | case "wol": |
| | | { |
| | | if (value == "on") |
| | | { |
| | | button1.Text = Language.StringByID(StringId.onLogic); |
| | | |
| | | } |
| | | |
| | | } |
| | | break; |
| | | |
| | | case "set_volume": |
| | | { |
| | | if (button2 == null) |
| | | { |
| | | //怕调试软件乱上东西导致抛异常 |
| | | break; |
| | | } |
| | | button2.Text = value; |
| | | } |
| | | break; |
| | | case "signal": |
| | | { |
| | | if (button3 == null) |
| | | { |
| | | //怕调试软件乱上东西导致抛异常 |
| | | break; |
| | | } |
| | | var p = new PublicInterface(); |
| | | string key = p.GetKey(p.GetHisenseSignalSourceDic(), value); |
| | | button3.Text = key; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | break; |
| | | |
| | | |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | if (Send.Current.VideoDoorLockUserListInfo.Count == 0) |
| | | { |
| | | Send.Current.GetVideoDoorLockUserListInfo(device); |
| | | } |
| | | var face = Send.Current.VideoDoorLockUserListInfo.Find((o) => { return o.userId == userId; }); |
| | | if (face == null) |
| | |
| | | return "LogicIcon/sensor.png"; |
| | | } |
| | | else if (SPK.DoorLock == device.spk |
| | | || SPK.VideoDoorLock == device.spk) |
| | | ) |
| | | { |
| | | return "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | | else if (SPK.ElectricalTvHisense == device.spk) |
| | | { |
| | | return "LogicIcon/electricaltvhisense.png"; |
| | | } |
| | | return $"FunctionIcon/Icon/{device.IconName}.png"; |
| | | |
| | |
| | | device.spk == SPK.AirSwitch |
| | | || device.spk == SPK.PanelSocket |
| | | || device.spk == SPK.ElectricSocket |
| | | || device.spk == SPK.ElectricalTvHisense |
| | | ); |
| | | if (electric != null) |
| | | { |
| | |
| | | } |
| | | ///门锁类 |
| | | var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock |
| | | || device.spk == SPK.VideoDoorLock); |
| | | ); |
| | | if (doorlock != null) |
| | | { |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock)); |
| | |
| | | } |
| | | ///摄像头类 |
| | | var camera = deviceList.Find((device) => |
| | | device.spk == SPK.IpCam_Imou || device.spk == SPK.Ev_Ipcam || device.spk == SPK.Peephole); |
| | | device.spk == SPK.IpCam_Imou || device.spk == SPK.Peephole); |
| | | if (camera != null) |
| | | { |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.shexiangtou)); |
| | |
| | | functionTypeList.Add(SPK.AirSwitch); |
| | | functionTypeList.Add(SPK.PanelSocket); |
| | | functionTypeList.Add(SPK.ElectricSocket); |
| | | functionTypeList.Add(SPK.ElectricalTvHisense); |
| | | } |
| | | ///门锁类 |
| | | else if (deviceType == Language.StringByID(StringId.DoorLock)) |
| | | { |
| | | functionTypeList.Add(SPK.DoorLock); |
| | | functionTypeList.Add(SPK.VideoDoorLock); |
| | | } |
| | | ///音乐类 |
| | | else if (deviceType == Language.StringByID(StringId.Music)) |
| | |
| | | else if (deviceType == Language.StringByID(StringId.shexiangtou)) |
| | | { |
| | | functionTypeList.Add(SPK.IpCam_Imou); |
| | | functionTypeList.Add(SPK.Ev_Ipcam); |
| | | functionTypeList.Add(SPK.Peephole); |
| | | } |
| | | else |
| | |
| | | //全部区域 |
| | | functionTypeList.Add(SPK.GroupControl); |
| | | functionTypeList.Add(SPK.Peephole); |
| | | functionTypeList.Add(SPK.Ev_Ipcam); |
| | | functionTypeList.Add(SPK.LightSwitch); |
| | | functionTypeList.Add(SPK.LightDimming); |
| | | functionTypeList.Add(SPK.LightRGB); |
| | |
| | | functionTypeList.Add(SPK.MechanicalArm); |
| | | functionTypeList.Add(SPK.IpCam_Imou); |
| | | functionTypeList.Add(SPK.SensorPm10); |
| | | functionTypeList.Add(SPK.VideoDoorLock); |
| | | functionTypeList.Add(SPK.AcIr); |
| | | functionTypeList.Add(SPK.SensorPirHold); |
| | | functionTypeList.Add(SPK.ElectricalTvHisense); |
| | | functionTypeList.Add(SPK.SensorLight); |
| | | functionTypeList.Add(SPK.OtherCommon); |
| | | |
| | |
| | | { |
| | | case condition_if: |
| | | { |
| | | deviceTypeList.Add(SPK.Ev_Ipcam); |
| | | deviceTypeList.Add(SPK.Peephole); |
| | | deviceTypeList.Add(SPK.LightSwitch); |
| | | deviceTypeList.Add(SPK.LightRGB); |
| | |
| | | deviceTypeList.Add(SPK.doorgate); |
| | | deviceTypeList.Add(SPK.IpCam_Imou); |
| | | deviceTypeList.Add(SPK.SensorPm10); |
| | | deviceTypeList.Add(SPK.VideoDoorLock); |
| | | deviceTypeList.Add(SPK.AcIr); |
| | | deviceTypeList.Add(SPK.SensorPirHold); |
| | | deviceTypeList.Add(SPK.SensorLight); |
| | |
| | | deviceTypeList.Add(SPK.AvMusic); |
| | | deviceTypeList.Add(SPK.MechanicalArm); |
| | | deviceTypeList.Add(SPK.AcIr); |
| | | deviceTypeList.Add(SPK.ElectricalTvHisense); |
| | | deviceTypeList.Add(SPK.OtherCommon); |
| | | } |
| | | break; |
| | |
| | | // new Entity.Function { sid = "1234567895444", name = "视频门锁", spk = Entity.SPK.VideoDoorLock }, |
| | | new Entity.Function { sid = "123456789688889", name = "人体存在传感器", spk = Entity.SPK.SensorPirHold }, |
| | | new Entity.Function { sid = "12345678968888", name = "测试猫眼", spk = Entity.SPK.Peephole }, |
| | | new Entity.Function { sid = "12345678968889", name = "测试萤石摄像头", spk = Entity.SPK.Ev_Ipcam }, |
| | | // new Entity.Function { sid = "1234567897", name = "毫米波传感器1", spk = Entity.SPK.SenesorMegahealth2 }, |
| | | // new Entity.Function { sid = "1234567899", name = "门磁传感器", spk = Entity.SPK.SensorDoorWindow }, |
| | | // new Entity.Function { sid = "12345678991234", name = "HDL机械手", spk = Entity.SPK.MechanicalArm }, |
| | |
| | | new Entity.Function { sid = "12345678991234566844", name = "大华摄像头", spk = Entity.SPK.IpCam_Imou }, |
| | | new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB }, |
| | | new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW }, |
| | | new Function { spk = SPK.ElectricalTvHisense, name = "海信电视1",sid="123456789"}, |
| | | }; |
| | | foreach (var function in functions) |
| | | { |
| | |
| | | { |
| | | public class PublicInterface |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 单选择 |
| | | /// </summary> |
| | | /// <param name="frame">显示在哪个界面的父控件</param> |
| | | /// <param name="list">显示数据源</param> |
| | | /// <param name="titleText"></param> |
| | | /// <param name="stateText">之前状态文本</param> |
| | | /// <param name="action">返回值</param> |
| | | /// <param name="textSize">显示文本字体大小</param> |
| | | public void SingleSelectionShow(FrameLayout frame, List<FuntionControlView.Aks.Entity.RemoteControlEntity> list, string titleText, string stateText, Action<int> action, int textSize = LogicView.TextSize.text14) |
| | | { |
| | | if (list == null) |
| | | { |
| | | return; |
| | | } |
| | | FrameLayout frameLayout = new FrameLayout |
| | | { |
| | | BackgroundColor = CSS.CSS_Color.viewTrans60lucence, |
| | | }; |
| | | frame.AddChidren(frameLayout); |
| | | |
| | | LogicView.DateView view = new LogicView.DateView(); |
| | | view.btnTitle.Text = titleText; |
| | | view.FLayoutView(frameLayout, list.Count); |
| | | view.btnCancel.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //移除fLayout界面 |
| | | frameLayout.RemoveFromParent(); |
| | | }; |
| | | ///定义一个Btn记录选中状态 |
| | | Button checkBtn = new Button |
| | | { |
| | | Tag = "unknown", |
| | | }; |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | FuntionControlView.Aks.Entity.RemoteControlEntity remoteControl = list[i]; |
| | | LogicView.CheckView checkView = new LogicView.CheckView(); |
| | | checkView.frameLayout.Y = Application.GetRealHeight(56 + 50 * i); |
| | | checkView.btnText.TextSize = textSize; |
| | | view.frameLayout.AddChidren(checkView.FLayoutView()); |
| | | checkView.btnText.Text = remoteControl.name; |
| | | checkView.btnClick.Tag = i;//标记 |
| | | |
| | | if (stateText == remoteControl.name) |
| | | { |
| | | //显示之前的选中状态 |
| | | checkBtn.IsSelected = false; |
| | | checkView.btnCheckIcon.IsSelected = true; |
| | | checkBtn = checkView.btnCheckIcon; |
| | | checkBtn.Tag = checkView.btnClick.Tag.ToString(); |
| | | } |
| | | //点击事件 |
| | | checkView.btnClick.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | checkBtn.IsSelected = false; |
| | | checkView.btnCheckIcon.IsSelected = true; |
| | | checkBtn = checkView.btnCheckIcon; |
| | | checkBtn.Tag = checkView.btnClick.Tag.ToString(); |
| | | }; |
| | | |
| | | } |
| | | view.btnConfirm.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | if (checkBtn.Tag.ToString() == "unknown") |
| | | { |
| | | return; |
| | | } |
| | | var index = int.Parse(checkBtn.Tag.ToString()); |
| | | if (index > list.Count) |
| | | { |
| | | index = 0; |
| | | } |
| | | action(index); |
| | | //移除fLayout界面 |
| | | frameLayout.RemoveFromParent(); |
| | | }; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 单选择 |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取门锁用户列表(萤石视频门锁) |
| | | /// </summary> |
| | | /// <param name="deviceId">设备</param> |
| | | /// <returns></returns> |
| | | public List<Face> GetVideoDoorLockUserListInfo(Function device) |
| | | { |
| | | var userList = FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device); |
| | | List<Face> faceIdList = new List<Face>(); |
| | | for (int i = 0; i < userList.Count; i++) |
| | | { |
| | | Face face = new Face(); |
| | | var user = userList[i]; |
| | | face.userId = user.extUserId; |
| | | face.userName = user.extUserName; |
| | | faceIdList.Add(face); |
| | | } |
| | | VideoDoorLockUserListInfo.Clear(); |
| | | VideoDoorLockUserListInfo.AddRange(faceIdList); |
| | | return faceIdList; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | ///请求服务器(与住宅有关:例如;homeId) |
| | |
| | | #endregion |
| | | } |
| | | break; |
| | | //海信电视 |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | #region 界面 |
| | | ///开关 |
| | | LogicView.FunTypeView switchView = new LogicView.FunTypeView(); |
| | | switchView.btnText.TextID = StringId.switchLogic; |
| | | fLayout.AddChidren(switchView.FLayoutView()); |
| | | ///音量 |
| | | LogicView.FunTypeView volView = new LogicView.FunTypeView(); |
| | | volView.frameLayout.Y = switchView.frameLayout.Bottom; |
| | | volView.btnText.TextID = StringId.yinliang; |
| | | fLayout.AddChidren(volView.FLayoutView()); |
| | | |
| | | ///信号源 |
| | | LogicView.FunTypeView sourceView = new LogicView.FunTypeView(); |
| | | sourceView.frameLayout.Y = volView.frameLayout.Bottom; |
| | | sourceView.btnText.TextID = StringId.xinhaoyuan; |
| | | fLayout.AddChidren(sourceView.FLayoutView()); |
| | | |
| | | ///设备延时iewv |
| | | DelayView(fLayout, sourceView.frameLayout.Bottom); |
| | | #endregion |
| | | #region 点击事件 |
| | | ///开关点击事件 |
| | | switchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | SwitchViewMethod(device, switchView.btnState, 2); |
| | | }; |
| | | ///音量点击事件 |
| | | volView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //selectedState = device.spk + "_volume"; |
| | | //new LogicView.TipPopView { }.InputBox(StringId.volumeMusic, volView.btnState.Text, (value) => |
| | | //{ |
| | | |
| | | // //界面显示选中值 |
| | | // volView.btnState.Text = value; |
| | | // //数据封装 |
| | | // AddDictionary("setvolume", value);//音量 |
| | | //}, 0, 100); |
| | | |
| | | BrightnessMethod(device, volView.btnState, volView.btnText.Text); |
| | | |
| | | }; |
| | | |
| | | ///信号源点击事件 |
| | | sourceView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | ///之前的状态文本 |
| | | string currText = sourceView.btnState.Text; |
| | | //设备属性值,云雀上定义好的; |
| | | string key = "signal"; |
| | | selectedState = device.spk + "_" + key; |
| | | PublicInterface pif = new PublicInterface(); |
| | | var dic = pif.GetHisenseSignalSourceDic(); |
| | | pif.SingleSelectionShow(this, dic.Keys.ToList(), Language.StringByID(StringId.xinhaoyuan), currText |
| | | , (valueStr) => |
| | | { |
| | | //界面显示选中值 |
| | | sourceView.btnState.Text = valueStr; |
| | | string value = pif.GetValue(dic, valueStr); |
| | | //数据封装 |
| | | AddDictionary(key, value); |
| | | |
| | | }); |
| | | }; |
| | | |
| | | if (edit) |
| | | { |
| | | //显示编辑之前的设备状态 |
| | | GetEditDeviceState(device, index, switchView.btnState, volView.btnState, sourceView.btnState, null); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | break; |
| | | |
| | | } |
| | | #endregion |
| | |
| | | |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | if ("on" == value) |
| | | { |
| | | key = "wol"; |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | //数据封装 |
| | |
| | | //角度 |
| | | keyVlaue = "angle"; |
| | | } |
| | | } |
| | | break; |
| | | case SPK.ElectricalTvHisense: |
| | | { |
| | | keyVlaue = "set_volume"; |
| | | } |
| | | break; |
| | | |
| | |
| | | /// <returns></returns> |
| | | private void AddDictionaryList(string key, Dictionary<string, string> dictionary) |
| | | { |
| | | |
| | | if (this.device.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | //特殊处理 |
| | | if (key == "on_off") |
| | | { |
| | | key = "wol"; |
| | | } |
| | | else if (key == "wol") |
| | | { |
| | | key = "on_off"; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | int indexValue = -1; |
| | |
| | | } |
| | | else |
| | | { |
| | | if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense) |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | for(int i = 0;i< sceneFunction.status.Count;i++) |
| | | { |
| | | var tvState = sceneFunction.status[i]; |
| | | if (tvState.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | tvState.key = "wol"; |
| | | tvState.value = "on"; |
| | | } |
| | | else |
| | | { |
| | | if(string.IsNullOrEmpty( tvState.value)) |
| | | { |
| | | sceneFunction.status.RemoveAt(i); |
| | | i--; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | //using Xamarin.Essentials; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | }; |
| | | break; |
| | | case SPK.Peephole: |
| | | case SPK.VideoDoorLock: |
| | | case SPK.Ev_Ipcam: |
| | | { |
| | | //跳转到android,ios那边去 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipAddDeviceActivity(device.spk); |
| | | } |
| | | break; |
| | | } |
| | | }; |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | #if __Android__ |
| | | using Java.Interop; |
| | | using Android.Content; |
| | |
| | | contentView.BeginHeaderRefreshing(); |
| | | }; |
| | | break; |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | | //萤石视频门锁 |
| | | var form = new VideoDoorLockPage(device, btnName, new Button(), CommonMethod.Comerom.sanfan, () => |
| | | { |
| | | row.RemoveFromParent(); |
| | | }); |
| | | MainPage.BasePageView.AddChidren(form); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | form.Show(); |
| | | }); |
| | | } |
| | | break; |
| | | } |
| | | }; |
| | | |
| | |
| | | { |
| | | |
| | | if (function == null) return false; |
| | | if (function.spk == SPK.VideoDoorLock) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | |
| | | } |
| | |
| | | using System; |
| | | using Shared; |
| | | using HDL_ON.UI.CSS; |
| | | //using Xamarin.Essentials; |
| | | using HDL_ON.DAL.Server; |
| | | |
| | | namespace HDL_ON.UI |
| | |
| | | using System; |
| | | using HDL_ON.UI.CSS; |
| | | using Shared; |
| | | //using Xamarin.Essentials; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | } |
| | | }) { IsBackground = true }.Start(); |
| | | |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); |
| | | }; |
| | | } |
| | | dialog.Show(); |
| | |
| | | } |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); |
| | | }; |
| | | } |
| | | |
| | |
| | | using HDL_ON.DriverLayer; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.CSS; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | | |
| | |
| | | // }); |
| | | #endregion |
| | | |
| | | #region 删除设备行 序列号 型号 |
| | | if (this.function.spk == SPK.VideoDoorLock) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region 开锁设置 |
| | | var unlockSettingView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(unlockSettingView); |
| | | |
| | | //unlockSettingView.AddChidren(new Button |
| | | //{ |
| | | // Gravity = Gravity.CenterHorizontal, |
| | | // BackgroundColor = CSS_Color.DividingLineColor, |
| | | // Width = Application.GetRealWidth(343), |
| | | // Height = Application.GetRealHeight(1) |
| | | //}); |
| | | |
| | | var unlockRightBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | unlockSettingView.AddChidren(unlockRightBtn); |
| | | |
| | | var btnUnlockText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.UnlockSetting, |
| | | }; |
| | | unlockSettingView.AddChidren(btnUnlockText); |
| | | |
| | | EventHandler<MouseEventArgs> unlockSettingEvent = (sender, e) => |
| | | { |
| | | var page = new UnlockSettingPage(function); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | btnUnlockText.MouseUpEventHandler = unlockSettingEvent; |
| | | #endregion |
| | | |
| | | #region 音频设置 |
| | | var audioSetupView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(audioSetupView); |
| | | |
| | | audioSetupView.AddChidren(new Button |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }); |
| | | |
| | | var btnAudioSetupRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | audioSetupView.AddChidren(btnAudioSetupRight); |
| | | |
| | | var btnAudioSetupText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.AudioSetup, |
| | | }; |
| | | audioSetupView.AddChidren(btnAudioSetupText); |
| | | btnAudioSetupText.MouseUpEventHandler = (sender, e) => { |
| | | var page = new VideoDoorlockAudioSetupPage(function); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | #region 电池管理 |
| | | var batteryManagementView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(batteryManagementView); |
| | | |
| | | batteryManagementView.AddChidren(new Button |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }); |
| | | |
| | | var btnBatteryManagementRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | batteryManagementView.AddChidren(btnBatteryManagementRight); |
| | | |
| | | var btnBatteryManagementText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.BatteryManagement, |
| | | }; |
| | | batteryManagementView.AddChidren(btnBatteryManagementText); |
| | | btnBatteryManagementText.MouseUpEventHandler = (sender, e) => { |
| | | var page = new VideoDoorlockBatteryManagementPage(); |
| | | MainPage.BasePageView.AddChidren(page); |
| | | page.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #region 序列号 |
| | | var serialView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(serialView); |
| | | |
| | | var serialLineBtn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }; |
| | | serialView.AddChidren(serialLineBtn); |
| | | var serialTextBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.xuliehao, |
| | | }; |
| | | serialView.AddChidren(serialTextBtn); |
| | | var serialValuesBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(106), |
| | | Width = Application.GetRealWidth(237), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = this.function.sid, |
| | | }; |
| | | serialView.AddChidren(serialValuesBtn); |
| | | #endregion |
| | | |
| | | #region 型号 |
| | | var modelView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(modelView); |
| | | |
| | | var modelLineBtn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }; |
| | | modelView.AddChidren(modelLineBtn); |
| | | var modelTextBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.xinghao, |
| | | }; |
| | | modelView.AddChidren(modelTextBtn); |
| | | var modelValuesBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(106), |
| | | Width = Application.GetRealWidth(237), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextColor = CSS_Color.PromptingColor1, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Text = this.function.omodel, |
| | | }; |
| | | modelView.AddChidren(modelValuesBtn); |
| | | #endregion |
| | | |
| | | #region 删除设备行 |
| | | contentView.AddChidren(new Button() { |
| | | Height = Application.GetRealHeight(48), |
| | | }); |
| | | |
| | | var delTextBtn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealWidth(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.DeleteDevice, |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(delTextBtn); |
| | | |
| | | EventHandler<MouseEventArgs> ClickEvent = (sener, e) => |
| | | { |
| | | |
| | | new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => |
| | | { |
| | | UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!isBool) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.delFail), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | //删除本地文件 |
| | | UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function); |
| | | this.RemoveFromParent(); |
| | | this.actionDel?.Invoke(); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | }); |
| | | }; |
| | | delTextBtn.MouseUpEventHandler = ClickEvent; |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region 删除海信电视设备 |
| | | if (this.function.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealWidth(8), |
| | | }); |
| | | |
| | | #region 删除设备行 |
| | | contentView.AddChidren(new Button() |
| | | { |
| | | Height = Application.GetRealHeight(48), |
| | | }); |
| | | |
| | | var delTextBtn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(220), |
| | | Height = Application.GetRealWidth(44), |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.WarningColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.jiebangshebei, |
| | | Radius = (uint)Application.GetRealWidth(22), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | //如果是成员隐藏收藏功能 |
| | | if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare) |
| | | { |
| | | contentView.AddChidren(delTextBtn); |
| | | } |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> ClickEvent = (sener, e) => |
| | | { |
| | | |
| | | new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () => |
| | | { |
| | | HDL_ON.UI.UI2.FuntionControlView.HisenseTV.Send.Current.DelDevice(this.function.deviceId, (isBool) => |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (!isBool) |
| | | { |
| | | new Tip() |
| | | { |
| | | CloseTime = 1, |
| | | Text = Language.StringByID(StringId.delFail), |
| | | Direction = AMPopTipDirection.None, |
| | | }.Show(bodyView); |
| | | return; |
| | | } |
| | | //删除本地文件 |
| | | UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function); |
| | | this.RemoveFromParent(); |
| | | this.actionDel?.Invoke(); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | }); |
| | | }; |
| | | delTextBtn.MouseUpEventHandler = ClickEvent; |
| | | |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | #endregion |
| | | #if stage2 |
| | | #region 添加到桌面 |
| | | var addToDesktopView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(addToDesktopView); |
| | | |
| | | var btnAddToDesktopText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.AddToDesktop, |
| | | }; |
| | | addToDesktopView.AddChidren(btnAddToDesktopText); |
| | | |
| | | var btnAddToDesktopRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | addToDesktopView.AddChidren(btnAddToDesktopRight); |
| | | |
| | | #endregion |
| | | #endif |
| | | |
| | | if (function.spk == SPK.ElectricEnergy) |
| | | { |
| | |
| | | using System.Text; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock; |
| | | using Newtonsoft.Json.Linq; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod; |
| | | |
| | | namespace HDL_ON.UI.Music |
| | | { |
| | |
| | | // Text = responsePackNew.message + "(" + responsePackNew.Code + ")", |
| | | // Direction = AMPopTipDirection.None, |
| | | //}.Show(MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1)); |
| | | CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")", 3); |
| | | //CommonMethod.Current.ShowTip(responsePackNew.message + "(" + responsePackNew.Code + ")", 3); |
| | | }); |
| | | } |
| | | return false; |
| | |
| | | } |
| | | if (DB_ResidenceData.Instance.NeedTip) { |
| | | DB_ResidenceData.Instance.LastTipTime = DateTime.Now; |
| | | if (CN.Jpush.Android.Api.JPushInterface.IsNotificationEnabled(Shared.Application.Activity) != 1) |
| | | { |
| | | Action action = () => |
| | | { |
| | | CN.Jpush.Android.Api.JPushInterface.GoToAppNotificationSettings(Shared.Application.Activity); |
| | | }; |
| | | Shared.Application.RunOnMainThread(() => |
| | | { |
| | | new HDL_ON.UI.ConfirmDialog().ShowDialog(StringId.Tip, StringId.Android_MessagePushTip, action); |
| | | }); |
| | | } |
| | | //if (CN.Jpush.Android.Api.JPushInterface.IsNotificationEnabled(Shared.Application.Activity) != 1) |
| | | //{ |
| | | // Action action = () => |
| | | // { |
| | | // CN.Jpush.Android.Api.JPushInterface.GoToAppNotificationSettings(Shared.Application.Activity); |
| | | // }; |
| | | // Shared.Application.RunOnMainThread(() => |
| | | // { |
| | | // new HDL_ON.UI.ConfirmDialog().ShowDialog(StringId.Tip, StringId.Android_MessagePushTip, action); |
| | | // }); |
| | | //} |
| | | } |
| | | #endif |
| | | |