Merge branch 'wjc' into dev-cqy(1.5.9)
| | |
| | | 7155=Distress/Normal |
| | | 7156=Distress |
| | | 7157=whether to unlock |
| | | 7158=is |
| | | 7158=Is |
| | | 7159=Fall in the alarm |
| | | 7160=Someone called the police |
| | | 7161=Warning tone |
| | |
| | | 7163=Video call |
| | | 7164=Manipulator |
| | | 7165=Area intrusion alarm |
| | | 7166=camera |
| | | 7167=main switch |
| | | 7166=Camera |
| | | 7167=Main switch |
| | | 7168=PM10 |
| | | |
| | | 8501=Video door lock |
| | |
| | | <Reference Include="videophone"> |
| | | <HintPath>..\DLL\FL\Android\videophone.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Square.OkHttp3"> |
| | | <HintPath>..\DLL\EZvizMonitor\Square.OkHttp3.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Square.OkIO"> |
| | | <HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ys"> |
| | | <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="UMSdkDroid"> |
| | | <HintPath>..\DLL\UMeng\UMSdkDroid.dll</HintPath> |
| | | </Reference> |
| | |
| | | <AndroidAsset Include="Assets\h5\static\img\equal-plant-ic.7ef6befa.png" /> |
| | | <AndroidAsset Include="Assets\h5\static\img\coal-save-ic.6c5fd125.png" /> |
| | | <AndroidAsset Include="Assets\h5\static\font\SourceHanSansCN-Normal.otf" /> |
| | | <AndroidAsset Include="Assets\Phone\MusicIcon\currentPlayList.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\OneOpenLock.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\RTV.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLocked.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLocking.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorlockClose.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\VideoDoorLockOpen.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Cell.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\FunctionBg\VideoDoorLockFunctionBg.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\securitydoorezviz.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidResource Include="Resources\values\colors.xml" /> |
| | |
| | | <PackageReference Include="Xamarin.Android.Support.Constraint.Layout.Solver"> |
| | | <Version>1.1.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Crashes"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter.Analytics"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Microsoft.AppCenter"> |
| | | <Version>4.2.0</Version> |
| | | </PackageReference> |
| | | <PackageReference Include="Square.OkHttp3"> |
| | | <Version>3.14.4</Version> |
| | | </PackageReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\NormallyOpenIcon3.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\HistoryList.png" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorLock.png" /> |
| | |
| | | <Folder Include="Assets\Phone\FunctionIcon\Inverter\" /> |
| | | <Folder Include="Assets\Phone\FunctionIcon\Electrical\MechanicalArm\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\..\ys\ys.csproj"> |
| | | <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project> |
| | | <Name>ys</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | |
| | | { |
| | | //2020-12-23 解决点击通知栏打开不了APP问题 |
| | | //base.OnNotifyMessageOpened(context, notificationMessage); |
| | | |
| | | OpenNotification(context, notificationMessage); |
| | | } |
| | | |
| | |
| | | |
| | | <!-- 填充颜色 --> |
| | | <solid |
| | | android:color="@color/white" /> |
| | | android:color="#FFFFFF"/> |
| | | |
| | | <!-- 边框颜色--> |
| | | <stroke |
| | |
| | | |
| | | <!-- 填充颜色 --> |
| | | <solid |
| | | android:color="@color/white" /> |
| | | android:color="#FFFFFF"/> |
| | | |
| | | </shape> |
| | |
| | | 7155=Distress/Normal |
| | | 7156=Distress |
| | | 7157=whether to unlock |
| | | 7158=is |
| | | 7158=Is |
| | | 7159=Fall in the alarm |
| | | 7160=Someone called the police |
| | | 7161=Warning tone |
| | |
| | | 7163=Video call |
| | | 7164=Manipulator |
| | | 7165=Area intrusion alarm |
| | | 7166=camera |
| | | 7167=main switch |
| | | 7166=Camera |
| | | 7167=Main switch |
| | | 7168=PM10 |
| | | |
| | | 8501=Video door lock |
| | |
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UMSdk", "UMSdk\UMSdk.csproj", "{5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}"
|
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "..\ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}"
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
| | | HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
|
| | |
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhone.Build.0 = Release|Any CPU
|
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
| | | {5CD1B2DE-1ABD-4B46-8C97-CCB6EA90346A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
| | | {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(SolutionProperties) = preSolution
|
| | | HideSolutionNode = FALSE
|
| | |
| | | /// HDL可视对讲 |
| | | /// </summary> |
| | | HDL_INTERPHONE, |
| | | /// <summary> |
| | | /// 门铃推送(萤石视频门锁) |
| | | /// </summary> |
| | | DOOR_BELL, |
| | | } |
| | | |
| | |
| | | } |
| | | else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString())) |
| | | { |
| | | |
| | | if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; |
| | | |
| | | //字段兼容问题,只能直接取值了 |
| | |
| | | return; |
| | | } |
| | | ///视频门锁 |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId,expantContent.spk); |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId,expantContent.spk,true); |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | /// <summary> |
| | | /// 判断是否本地加密并且加密key不为空 |
| | | /// </summary> |
| | | public bool IsLocalEncryptAndGetAesKey { |
| | | get { |
| | | public bool IsLocalEncryptAndGetAesKey |
| | | { |
| | | get |
| | | { |
| | | return IsLocalEncrypt && (!string.IsNullOrEmpty(DB_ResidenceData.Instance.CurrentRegion.localSecret)); |
| | | } |
| | | } |
| | |
| | | { |
| | | if(loginGatewayThread== null) |
| | | { |
| | | loginGatewayThread = new System.Threading.Thread(() => { |
| | | loginGatewayThread = new System.Threading.Thread(() => |
| | | { |
| | | while (!Ins.myTcpClient.isConnected) |
| | | { |
| | | if (Ins.GatewayOnline_Local && myTcpClient.isConnected) |
| | |
| | | try |
| | | { |
| | | loginGatewayThread?.Abort(); |
| | | }catch (Exception ex) |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"重启登录网关线程异常:{ex.Message}"); |
| | | } |
| | |
| | | MainPage.Log($"安防局域网异常:{ex.Message}"); |
| | | } |
| | | } |
| | | else if (receiveObj.Topic == $"/user/{GatewayId}/custom/gateway/login_reply") { |
| | | else if (receiveObj.Topic == $"/user/{GatewayId}/custom/gateway/login_reply") |
| | | { |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(receiveObj.BodyDataString); |
| | | if (temp.GetValue("objects").ToString().Contains("success")) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //if (SPK.MusicSpkList().Contains(localFunction.spk)) |
| | | //{ |
| | | // if (updateTemp.status.Count < 3) |
| | | // { |
| | | // ///是音乐功能的 |
| | | // ///上报属性少3条不做处理 |
| | | // return; |
| | | // } |
| | | //} |
| | | if (SPK.MusicSpkList().Contains(localFunction.spk)) |
| | | { |
| | | MainPage.Log($"音乐收到数据:{revString}"); |
| | | |
| | | } |
| | | foreach (var attr in updateTemp.status) |
| | | { |
| | | localFunction.time_stamp = temp.time_stamp; |
| | | localFunction.SetAttrState(attr.key, attr.value); |
| | | if (SPK.MusicSpkList().Contains(localFunction.spk)) |
| | | { |
| | | Console.WriteLine("音乐播放器添加缓存数据=======" + revString); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | //{ |
| | | // return false; |
| | | //} |
| | | if (pack.Code != StateCode.SUCCESS) { |
| | | Application.RunOnMainThread(() => { |
| | | if (pack.Code != StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), pack.message); |
| | | UserInfo.Current.doorPasswordString = "";// |
| | | UserInfo.Current.LastTimeOpenDoor = DateTime.MinValue; |
| | |
| | | } |
| | | if (pack.Code != StateCode.SUCCESS) |
| | | { |
| | | Application.RunOnMainThread(() => { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if(string.IsNullOrEmpty(pack.message)) |
| | | { |
| | | new PublicAssmebly().TipMsg(Language.StringByID(StringId.Tip), |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm |
| | | /// <summary> |
| | | /// RegionMark |
| | | /// </summary> |
| | |
| | | #else |
| | | using Foundation; |
| | | using UIKit; |
| | | using Shared.IOS.HDLLinphoneSDK; |
| | | //using Shared.IOS.HDLLinphoneSDK; |
| | | #endif |
| | | |
| | | namespace Shared |
| | |
| | | { |
| | | [Weak] HDLLinphone hdlLinphone; |
| | | |
| | | public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone) |
| | | { |
| | | this.hdlLinphone = mHDLLinphone; |
| | | } |
| | | // public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone) |
| | | // { |
| | | // this.hdlLinphone = mHDLLinphone; |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 接听 |
| | | /// </summary> |
| | | public override void OnAnswerAction() |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL); |
| | | } |
| | | // /// <summary> |
| | | // /// 接听 |
| | | // /// </summary> |
| | | // public override void OnAnswerAction() |
| | | // { |
| | | // hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL); |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 挂断 |
| | | /// </summary> |
| | | /// <param name="callDuration"></param> |
| | | public override void OnHangUpAction(int callDuration) |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration); |
| | | } |
| | | // /// <summary> |
| | | // /// 挂断 |
| | | // /// </summary> |
| | | // /// <param name="callDuration"></param> |
| | | // public override void OnHangUpAction(int callDuration) |
| | | // { |
| | | // hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration); |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 拒接 |
| | | /// </summary> |
| | | public override void OnRejectCallAction() |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); |
| | | } |
| | | // /// <summary> |
| | | // /// 拒接 |
| | | // /// </summary> |
| | | // public override void OnRejectCallAction() |
| | | // { |
| | | // hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 截图成功 |
| | |
| | | ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 开锁成功 |
| | | /// </summary> |
| | | public override void OnUnlockAction() |
| | | { |
| | | hdlLinphone.HDLUnlockAction(); |
| | | } |
| | | // /// <summary> |
| | | // /// 开锁成功 |
| | | // /// </summary> |
| | | // public override void OnUnlockAction() |
| | | // { |
| | | // hdlLinphone.HDLUnlockAction(); |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// 来电中... |
| | |
| | | |
| | | |
| | | |
| | | } |
| | | //} |
| | | |
| | | #endregion |
| | | #endif |
| | |
| | | ShowFunction.Sensor,ShowFunction.VideoIntercom, |
| | | ShowFunction.SecurityCenter,ShowFunction.Acst, |
| | | ShowFunction.MechanicalArm , |
| | | ShowFunction.SecurityMonitoring,}; |
| | | ShowFunction.SecurityMonitoring, |
| | | ShowFunction.VideoDoorLock, |
| | | }; |
| | | } |
| | | return dddd; |
| | | } |
| | |
| | | /// ip摄像头 |
| | | /// </summary> |
| | | IpCam = 0x25, |
| | | /// <summary> |
| | | /// 萤石视频门锁 |
| | | /// </summary> |
| | | VideoDoorLock = 0x26, |
| | | |
| | | |
| | | } |
| | |
| | | list.Add(DoorLock); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 萤石视频门锁 |
| | | /// </summary> |
| | | public const string VideoDoorLock="security.door.ezviz"; |
| | | /// <summary> |
| | | /// 萤石视频门锁spk列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<string> GetVideoDoorLockSPKList() |
| | | { |
| | | var list = new List<string>(); |
| | | list.Add(VideoDoorLock); |
| | | return list; |
| | | } |
| | | |
| | | #region 灯光 |
| | | /// <summary> |
| | |
| | | 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> |
| | | /// 新风列表 |
| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using Shared; |
| | | using static HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod; |
| | | |
| | | namespace HDL_ON.UI |
| | | { |
| | |
| | | /// <summary> |
| | | /// 功能控制界面跳转事件 |
| | | /// </summary> |
| | | public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor |
| | | public EventHandler<MouseEventArgs> LoadEvent_SkipFunctionControlPage(Function function, Button btnCollectionIcon, Button btnName, Button btnFromFloor, Comerom comerom,Action action |
| | | ) |
| | | { |
| | | EventHandler<MouseEventArgs> eventHandler = (sender, e) => |
| | |
| | | } |
| | | #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; |
| | | } |
| | | }; |
| | | return eventHandler; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 抄SDK的,我也不知道这个是什么 |
| | | /// </summary> |
| | |
| | | { |
| | | int index = 0; |
| | | var list = FunctionList.List.GetDeviceFunctionList(); |
| | | |
| | | foreach (var function in list) |
| | | { |
| | | //音乐模块有主从关系,需要特殊处理 |
| | |
| | | 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 |
| | | { |
| | | Button btnSwitch; |
| | |
| | | }; |
| | | |
| | | |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone); |
| | | var skipControlPageEvent = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollection, btnName, btnZone, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect,()=> { |
| | | this.LoadDeviceFunctionControlZone();//删除设备后重新刷新UI |
| | | }); |
| | | view.MouseUpEventHandler = skipControlPageEvent; |
| | | btnName.MouseUpEventHandler = skipControlPageEvent; |
| | | btnIcon.MouseUpEventHandler = skipControlPageEvent; |
| | |
| | | |
| | | LoadEvent_ControlScene(btnCoverd, btnName, btnZone, btnShowDelay, scene); |
| | | |
| | | btnSettingIcon.MouseUpEventHandler = (sender, e) => { |
| | | Action backAction = () => { |
| | | btnSettingIcon.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | Action backAction = () => |
| | | { |
| | | //LoadSceneFunctionControlZone(); |
| | | }; |
| | | Action refreshAction = () => { |
| | | Action refreshAction = () => |
| | | { |
| | | btnName.Text = scene.name; |
| | | btnZone.Text = scene.GetRoomListName(); |
| | | //view.BackgroundImagePath = (scene as Scene).ImagePath; |
| | |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | |
| | | //Utlis.WriteLine("GetPushMessageAction M收到推送"); |
| | | GetPushMessageList(showMesType); |
| | | } |
| | |
| | | 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; |
| | |
| | | }; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载功能列表界面 |
| | | /// </summary> |
| | | void LoadFunctionPageView() |
| | | { |
| | | #region |
| | | functionsPageView = new VerticalScrolViewLayout() |
| | | { |
| | | BackgroundColor = CSS_Color.BackgroundColor, |
| | | Height = Application.GetRealHeight(667 - 64 - 49 + 20), |
| | | }; |
| | | contentPageView.AddChidren(functionsPageView); |
| | | this.RefreshFunctionView(); |
| | | |
| | | } |
| | | FrameLayout functionContentView; |
| | | /// <summary> |
| | | /// 显示功能列表界面 |
| | | /// </summary> |
| | | void RefreshFunctionView() |
| | | { |
| | | #region |
| | | //functionsPageView = new VerticalScrolViewLayout() |
| | | //{ |
| | | // BackgroundColor = CSS_Color.BackgroundColor, |
| | | // Height = Application.GetRealHeight(667 - 64 - 49 + 20), |
| | | //}; |
| | | //contentPageView.AddChidren(functionsPageView); |
| | | |
| | | //FrameLayout functionContentView; |
| | | functionContentView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealHeight(16), |
| | |
| | | functionCount = FunctionList.List.GetAcstParentList().Count; |
| | | functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; |
| | | break; |
| | | case ShowFunction.VideoDoorLock: |
| | | functionCount = FunctionList.List.GetVideoDoorLockList().Count; |
| | | #if DEBUG |
| | | //functionCount = 1; |
| | | #endif |
| | | functionOnCount = 1; |
| | | break; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | 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(()=> { |
| | | functionContentView?.RemoveFromParent(); |
| | | this.RefreshFunctionView(); |
| | | }); |
| | | form.AddForm(list); |
| | | }; |
| | | break; |
| | | |
| | | } |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面 |
| | | if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring && item != ShowFunction.DoorLock |
| | | && ShowFunction.EnergyMonitoring != item && ShowFunction.VideoIntercom != item && ShowFunction.SecurityCenter != item |
| | | //界面跳转--音乐跳转自己的界面--环境跳转自己的界面--(萤石视频门锁)跳转自己的界面 |
| | | if (item != ShowFunction.VideoDoorLock |
| | | && item != ShowFunction.Music |
| | | && item != ShowFunction.Environmental |
| | | && item != ShowFunction.SecurityMonitoring |
| | | && item != ShowFunction.DoorLock |
| | | && ShowFunction.EnergyMonitoring != item |
| | | && ShowFunction.VideoIntercom != item && |
| | | ShowFunction.SecurityCenter != item |
| | | && ShowFunction.Acst != item) |
| | | { |
| | | btnFunctionViewBg.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | |
| | | var skipView = new FunctionPage(); |
| | | MainPage.BasePageView.AddChidren(skipView); |
| | | skipView.LoadPage(functionPageTitleId); |
| | |
| | | #endregion |
| | | } |
| | | |
| | | |
| | | |
| | | void refreshInverterInfo(Button btnPowerTenerationToday, Button btnWorkingMode, Button btnCurrentPowerGeneration) |
| | | { |
| | | new System.Threading.Thread(() => |
| | |
| | | /// 是否在调光 |
| | | /// </summary> |
| | | bool onDimmerBar; |
| | | /// <summary> |
| | | /// 删除设备后回调给界面刷新 |
| | | /// </summary> |
| | | Action action; |
| | | |
| | | #endregion |
| | | public FunctionControlZone(Function func) |
| | | public FunctionControlZone(Function func,Action action) |
| | | { |
| | | bodyDiv = this; |
| | | bodyDiv.Tag = func.sid; |
| | | function = func; |
| | | this.action = action; |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | |
| | | { |
| | | 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.HvacCac) |
| | | { |
| | | var btnHumidityIcon = new Button() |
| | |
| | | /// </summary> |
| | | void LoadEvent_DivSkipEvent() |
| | | { |
| | | var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor); |
| | | var eventHandler = new PublicAssmebly().LoadEvent_SkipFunctionControlPage(function, btnCollectionIcon, btnName, btnFromFloor, UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.room,this.action); |
| | | this.MouseUpEventHandler = eventHandler; |
| | | btnName.MouseUpEventHandler = eventHandler; |
| | | btnFromFloor.MouseUpEventHandler = eventHandler; |
| | |
| | | } |
| | | if (function.spk == SPK.LightRGBW || function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) |
| | | { |
| | | var functionDiv = new FunctionControlZone(function) |
| | | var functionDiv = new FunctionControlZone(function,null) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | } |
| | | else if (function.spk == SPK.IpCam_Imou) |
| | | { |
| | | var functionDiv = new FunctionControlZone(function) |
| | | var functionDiv = new FunctionControlZone(function,null) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | } |
| | | else |
| | | { |
| | | var functionDiv = new FunctionControlZone(function) |
| | | var functionDiv = new FunctionControlZone(function,null) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | deleteAction = delAction; |
| | | this.modifyImageAction = modifyImageAction; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重载界面 |
| | | /// </summary> |
| | |
| | | LoadPage(); |
| | | } |
| | | } |
| | | |
| | | |
| | | public void LoadPage() |
| | | { |
| | |
| | | }; |
| | | bodyView.AddChidren(functionListView); |
| | | |
| | | foreach (var function in room.GetRoomFunctions(false)) |
| | | var list = room.GetRoomFunctions(false); |
| | | |
| | | foreach (var function in list) |
| | | { |
| | | if (MainPage.RoomNotSupportFunctionList.Contains( function.spk)) |
| | | { |
| | |
| | | |
| | | if (function.spk == SPK.LightRGB || function.spk == SPK.LightDimming) |
| | | { |
| | | var functionDiv = new FunctionControlZone(function) |
| | | var functionDiv = new FunctionControlZone(function, null) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | } |
| | | else |
| | | { |
| | | var functionDiv = new FunctionControlZone(function) |
| | | var functionDiv = new FunctionControlZone(function, () => |
| | | { |
| | | this.ReLoadPage(); |
| | | }) |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Width = Application.GetRealWidth(343), |
| | |
| | | /// </summary> |
| | | void LoadEvent_ControlScene(Button btnName,Button btnFromFloor,FrameLayout bodyDiv, Scene scene) |
| | | { |
| | | EventHandler<MouseEventArgs> upEvent = (sender, e) => { |
| | | EventHandler<MouseEventArgs> upEvent = (sender, e) => |
| | | { |
| | | DriverLayer.Control.Ins.ControlScene(scene); |
| | | string msg = scene.name + Language.StringByID(StringId.AlreadyOpened); |
| | | new PublicAssmebly().TipMsgAutoClose(msg, false); |
| | |
| | | bodyDiv.MouseUpEventHandler = upEvent; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | view1.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | this.identifier = "open_door";//开锁事件 |
| | | //this.VideoDoorLockAction(this, device, view1.btnState); |
| | | this.VideoDoorLockAction(this, device, view1.btnState); |
| | | }; |
| | | if (edit) |
| | | { |
| | |
| | | }); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | | } |
| | | |
| | | /// <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(); |
| | | System.Threading.Tasks.Task.Run(() => |
| | | { |
| | | try |
| | | { |
| | | var userList =FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockUserListInfo(device); |
| | | List<string> userNameList = new List<string>(); |
| | | for (int i = 0; i < userList.Count; i++) |
| | | { |
| | | var user = userList[i]; |
| | | userNameList.Add(user.extUserName); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | PublicInterface publicInterface = new PublicInterface();//用户界面 |
| | | publicInterface.FrameOrVv(this, userNameList, new List<string> { btnState.Text }, device.name, (index) => |
| | | { |
| | | var userId = userNameList[index]; |
| | | //界面显示选中值 |
| | | btnState.Text = userId; |
| | | //数据封装 |
| | | AddDictionary("open_user", userId, "string"); |
| | | |
| | | }, false); |
| | | |
| | | }); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | string value = this.GetValue(dicList); |
| | | inputView.btnState.Text = value; |
| | | } |
| | | break; |
| | | case SPK.doorgate: |
| | | { |
| | | if (inputCondition.identifier == "door_call_cloud_event") |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.VideoDoorLock: |
| | | { |
| | | foreach (var dic in dicList) |
| | | { |
| | | string value = dic["value"]; |
| | | button1.Text = value; |
| | | } |
| | | } |
| | | break; |
| | | case SPK.MusicStandard: |
| | | case SPK.AvMusic: |
| | | { |
| | |
| | | var list2 = this.GetVideoDeviceList(); |
| | | list.AddRange(list1); |
| | | list.AddRange(list2); |
| | | //GetTestDevice(ref list, true); |
| | | GetTestDevice(ref list, true); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | return "LogicIcon/sensor.png"; |
| | | } |
| | | else if (SPK.DoorLock == device.spk) |
| | | else if (SPK.DoorLock == device.spk |
| | | || SPK.VideoDoorLock == device.spk) |
| | | { |
| | | return "FunctionIcon/DoorLock/DoorLock.png"; |
| | | } |
| | |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.Electric)); |
| | | } |
| | | ///门锁类 |
| | | var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock); |
| | | var doorlock = deviceList.Find((device) => device.spk == SPK.DoorLock |
| | | || device.spk == SPK.VideoDoorLock); |
| | | if (doorlock != null) |
| | | { |
| | | deviceStrTypeList.Add(Language.StringByID(StringId.DoorLock)); |
| | |
| | | else if (deviceType == Language.StringByID(StringId.DoorLock)) |
| | | { |
| | | functionTypeList.Add(SPK.DoorLock); |
| | | functionTypeList.Add(SPK.VideoDoorLock); |
| | | } |
| | | ///音乐类 |
| | | else if (deviceType == Language.StringByID(StringId.Music)) |
| | |
| | | functionTypeList.Add(SPK.MechanicalArm); |
| | | functionTypeList.Add(SPK.IpCam_Imou); |
| | | functionTypeList.Add(SPK.SensorPm10); |
| | | functionTypeList.Add(SPK.VideoDoorLock); |
| | | |
| | | } |
| | | |
| | |
| | | deviceTypeList.Add(SPK.doorgate); |
| | | deviceTypeList.Add(SPK.IpCam_Imou); |
| | | deviceTypeList.Add(SPK.SensorPm10); |
| | | deviceTypeList.Add(SPK.VideoDoorLock); |
| | | |
| | | } |
| | | break; |
| | |
| | | //new Entity.Function { sid = "1234567890", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic }, |
| | | // new Entity.Function { sid = "1234567891", name = "温度传感器", spk = Entity.SPK.SensorTemperature }, |
| | | // new Entity.Function { sid = "1234567892", name = "湿度传感器", spk = Entity.SPK.SensorHumidity }, |
| | | new Entity.Function { sid = "12345678933456", name = "调光灯", spk = Entity.SPK.LightDimming }, |
| | | new Entity.Function { sid = "1234567895444", name = "面板", spk = Entity.SPK.PanelSocket }, |
| | | new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, |
| | | new Entity.Function { sid = "12345678933456", name = "门锁", spk = Entity.SPK.DoorLock }, |
| | | new Entity.Function { sid = "1234567895444", name = "视频门锁", spk = Entity.SPK.VideoDoorLock }, |
| | | //new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 }, |
| | | // 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 }, |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取住宅已录入人脸信息 |
| | | /// </summary> |
| | | /// <param name="deviceId">可视对讲设备id</param> |
| | | /// <returns></returns> |
| | | public List<Face> GetHomeFaceList(string deviceId, bool isTip) |
| | | { |
| | | var jObject = new JObject(); |
| | | jObject.Add("homeId", LogicMethod.Current.HomeId); |
| | | jObject.Add("deviceId", deviceId); |
| | | var responsePackNew = RequestServerhomeId(jObject, NewAPI.Api_Post_GetListHomeFace, "获取住宅已录入人脸信息"); |
| | | //如果是token过期则刷新token |
| | | if (responsePackNew.Code == StateCode.TOKEN_EXPIRED) |
| | | { |
| | | RefreshToken(); |
| | | GetListHomeFace(deviceId, isTip); |
| | | } |
| | | if (Check(responsePackNew, isTip) == false) |
| | | { |
| | | return new List<Face>(); |
| | | } |
| | | var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Face>>(responsePackNew.Data.ToString()); |
| | | if (list == null) |
| | | { |
| | | list = new List<Face>(); |
| | | } |
| | | faceList.Clear(); |
| | | faceList.AddRange(list); |
| | | return list; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | ///请求服务器(与住宅有关:例如;homeId) |
| | | /// </summary> |
| | | /// <param name="o">发送数据</param> |
| | |
| | | dialog.Close(); |
| | | LoadEvent_ChangeCurHome(home); |
| | | LoadContentView(); |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); |
| | | }; |
| | | } |
| | | dialog.Show(); |
| | |
| | | dialog.Close(); |
| | | LoadEvent_ChangeCurHome(home); |
| | | LoadContentView(); |
| | | HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); |
| | | }; |
| | | } |
| | | |
| | |
| | | /// 位置信息跳转编辑按钮 |
| | | /// </summary> |
| | | Button btnLocationInfoRight; |
| | | /// <summary> |
| | | /// 删除设备 |
| | | /// </summary> |
| | | Button delTextBtn; |
| | | /// <summary> |
| | | /// 下一级图标 |
| | | /// </summary> |
| | | Button delRightBtn; |
| | | /// <summary> |
| | | /// 删除设备行FrameLayout |
| | | /// </summary> |
| | | FrameLayout delView; |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// 后退时,刷新之前界面的显示信息 |
| | | /// </summary> |
| | | Action actionRefresh; |
| | | |
| | | /// <summary> |
| | | /// 解绑设备回调 |
| | | /// </summary> |
| | | public Action actionDel; |
| | | #endregion |
| | | |
| | | public FunctionBaseInfoSetPage(Function func, Action action) |
| | |
| | | #endregion |
| | | } |
| | | #region 共享 |
| | | |
| | | //var sharedView = new FrameLayout() |
| | | //{ |
| | | // Height = Application.GetRealHeight(55), |
| | | // BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | //}; |
| | | //contentView.AddChidren(sharedView); |
| | | |
| | | //var btnSharedText = new Button() |
| | | //{ |
| | | // X = Application.GetRealWidth(16), |
| | |
| | | // }); |
| | | #endregion |
| | | |
| | | #region 删除设备行 |
| | | |
| | | delView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | if (this.function.spk == SPK.VideoDoorLock) |
| | | { |
| | | contentView.AddChidren(delView); |
| | | } |
| | | var lineBtn = new Button() |
| | | { |
| | | Gravity = Gravity.CenterHorizontal, |
| | | BackgroundColor = CSS_Color.DividingLineColor, |
| | | Width = Application.GetRealWidth(343), |
| | | Height = Application.GetRealHeight(1) |
| | | }; |
| | | delView.AddChidren(lineBtn); |
| | | delTextBtn = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.DeleteDevice, |
| | | }; |
| | | delView.AddChidren(delTextBtn); |
| | | |
| | | delRightBtn= new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | delView.AddChidren(delRightBtn); |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | #if stage2 |
| | | #region 添加到桌面 |
| | | var addToDesktopView = new FrameLayout() |
| | |
| | | { |
| | | LoadEvent_ChangeFunctionName (); |
| | | SkipChooseRoomPage(); |
| | | DelDeviceEvent(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 解绑设备的事件 |
| | | /// </summary> |
| | | void DelDeviceEvent() |
| | | { |
| | | |
| | | 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(); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | }); |
| | | }; |
| | | this.delView.MouseUpEventHandler += ClickEvent; |
| | | this.delTextBtn.MouseUpEventHandler += ClickEvent; |
| | | this.delRightBtn.MouseUpEventHandler += ClickEvent; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | UI2.FuntionControlView.Music.View.MyListView myListView = new UI2.FuntionControlView.Music.View.MyListView(); |
| | | myListView.frameLayout(this, A31MusicModel.Current); |
| | | myListView.dialogFra.AddChidren(loading);//dialogFra刷新图标父控件 |
| | | loading.Start(); |
| | | ///下拉刷新 |
| | | myListView.verticalScrolViewLayout.BeginHeaderRefreshingAction += () => |
| | | { |
| | | myListView.verticalScrolViewLayout.EndHeaderRefreshing(); //结束刷新 |
| | | loading.Start(); |
| | | System.Threading.Tasks.Task.Run((() => |
| | | { |
| | | try |
| | |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | //myListView.verticalScrolViewLayout.EndHeaderRefreshing(); |
| | | myListView.verticalScrolViewLayout.RemoveAll(); |
| | | var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name); |
| | | var source = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source); |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | myListView.verticalScrolViewLayout.EndHeaderRefreshing(); |
| | | loading.Hide(); |
| | | //myListView.verticalScrolViewLayout.EndHeaderRefreshing(); |
| | | //myListView.verticalScrolViewLayout.RemoveAll(); |
| | | //var listName = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.playlist_name); |
| | | //var source = A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.source); |
| | |
| | | }); |
| | | } |
| | | })); |
| | | //结束刷新 |
| | | |
| | | }; |
| | | ///移除界面 |
| | |
| | | myListView.popFra.RemoveFromParent(); |
| | | }; |
| | | myListView.backIextBtn.MouseUpEventHandler += removeFromParentView; |
| | | myListView.popFra.MouseUpEventHandler += removeFromParentView; |
| | | //myListView.popFra.MouseUpEventHandler += removeFromParentView; |
| | | #endregion |
| | | //var listName = A31MusicModel.Current.functionMusic.GetAttribute("playlist_name").ToString(); |
| | | //var musicList = A31MusicModel.Current.GetSongList(listName); |
| | |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | A31SongPlay.SongListView(verticalScrolViewLayout, musicList, listName, source, frameLayout); |
| | | }); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", functionIds); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_RefreshDeviceStatus, "刷新设备状态"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); |
| | | d.Add("deviceIds", new List<string> { music.deviceId }); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_PlayerList, "获取音乐列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | } |
| | | d.Add("deviceInfos", new List<Dictionary<string, object>> { deviceIds }); |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupList, "获取列表名列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return new List<GroupList>(); |
| | | } |
| | |
| | | d.Add("sidGroups", new List<Dictionary<string, object>> { d1 }); |
| | | |
| | | var responsePackNew = RequestServerhomeId(d, NewAPI.Api_Post_GroupPlayerList, "通过列表名获取歌曲列表"); |
| | | if (!this.dataChecking(responsePackNew)) |
| | | if (!this.DataChecking(responsePackNew)) |
| | | { |
| | | return new List<PalyerSongListInfo>(); |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="responsePackNew">回复数据对象</param> |
| | | /// <returns></returns> |
| | | private bool dataChecking(ResponsePackNew responsePackNew) |
| | | private bool DataChecking(ResponsePackNew responsePackNew) |
| | | { |
| | | if (responsePackNew.Code != "0" || responsePackNew.Data == null || responsePackNew.Data.ToString() == "") |
| | | if (responsePackNew.Data == null||responsePackNew.Code != "0" || responsePackNew.Data.ToString() == "") |
| | | { |
| | | |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | Y = Application.GetRealHeight(355), |
| | | Width = Application.GetRealWidth(28), |
| | | Height = Application.GetRealWidth(28), |
| | | UnSelectedImagePath = "MusicIcon/playList.png", |
| | | UnSelectedImagePath = "MusicIcon/currentPlayList.png", |
| | | }; |
| | | /// <summary> |
| | | /// 音量图标 |
| | |
| | | using System; |
| | | namespace HDL_ON.UI.Music |
| | | { |
| | | public static class TextSize |
| | | public class TextSize |
| | | { |
| | | public static int TopLine = 1; |
| | | public static int MiddleLine =1; |
| | | public static int DownLine = 1; |
| | | public const int TopLine = 1; |
| | | public const int MiddleLine = 1; |
| | | public const int DownLine = 1; |
| | | |
| | | |
| | | |
| | | public static int Text24 = 24; |
| | | public static int Text20 = 20; |
| | | public static int Text18 = 18; |
| | | public static int Text16 = 16; |
| | | public static int Text14 = 14; |
| | | public static int Text12 = 12; |
| | | public static int Text10 = 10; |
| | | public const int Text24 = 24; |
| | | public const int Text20 = 20; |
| | | public const int Text18 = 18; |
| | | public const int Text16 = 16; |
| | | public const int Text14 = 14; |
| | | public const int Text12 = 12; |
| | | public const int Text10 = 10; |
| | | |
| | | } |
| | | public static class MusicColor |
| | | public class MusicColor |
| | | { |
| | | /// <summary> |
| | | /// 顶部背景颜色 |
| | | /// </summary> |
| | | public static uint TopViewColor = 0xFFF7F7F7; |
| | | public const uint TopViewColor = 0xFFF7F7F7; |
| | | /// <summary> |
| | | /// 界面背景颜色 |
| | | /// </summary> |
| | | public static uint ViewColor = 0xFFF2F3F7; |
| | | public const uint ViewColor = 0xFFF2F3F7; |
| | | /// <summary> |
| | | /// 白色背景颜色 |
| | | /// </summary> |
| | | public static uint WhiteColor = 0xFFFFFFFF; |
| | | public const uint WhiteColor = 0xFFFFFFFF; |
| | | /// <summary> |
| | | /// 红色背景颜色 |
| | | /// </summary> |
| | | public static uint RedColor = 0xFFFF4747; |
| | | public const uint RedColor = 0xFFFF4747; |
| | | |
| | | /// <summary> |
| | | /// 线条颜色 |
| | | /// </summary> |
| | | public static uint LineColor =0xFFECEDEE; |
| | | public const uint LineColor = 0xFFECEDEE; |
| | | /// <summary> |
| | | /// 弹窗背景颜色 |
| | | /// </summary> |
| | | public static uint PopupBackgroundColor = 0x90000000; |
| | | public const uint PopupBackgroundColor = 0x90000000; |
| | | |
| | | /// <summary> |
| | | /// 线条颜色 |
| | | /// </summary> |
| | | public static uint MusicEditColor = 0xFFFC9C04; |
| | | public const uint MusicEditColor = 0xFFFC9C04; |
| | | /// <summary> |
| | | /// 弹窗背景颜色 |
| | | /// </summary> |
| | | public static uint MusicDelColor = 0xFFFF7474; |
| | | public const uint MusicDelColor = 0xFFFF7474; |
| | | |
| | | public static uint Text18Color = 0xFF1B2D4D; |
| | | public static uint MusicTxet14SelectedColor = 0xFF4484F4; |
| | | public static uint MusicTxet14Color = 0xFF1B2D4D; |
| | | public static uint MusicTxet12SelectedColor = 0xFF4484F4; |
| | | public const uint Text18Color = 0xFF1B2D4D; |
| | | public const uint MusicTxet14SelectedColor = 0xFF4484F4; |
| | | public const uint MusicTxet14Color = 0xFF1B2D4D; |
| | | public const uint MusicTxet12SelectedColor = 0xFF4484F4; |
| | | |
| | | public static uint MusicNoTxetColor = 0xFFC0C7D4; |
| | | public static uint TextColor = 0xFF1B2D4D; |
| | | public static uint SelectedColor = 0xFF4484F4; |
| | | public const uint MusicNoTxetColor = 0xFFC0C7D4; |
| | | public const uint TextColor = 0xFF1B2D4D; |
| | | public const uint SelectedColor = 0xFF4484F4; |
| | | |
| | | public static uint TextTimeColor = 0xFF798394; |
| | | public const uint TextTimeColor = 0xFF798394; |
| | | |
| | | public static uint TextCancelColor = 0xFF798394; |
| | | public const uint TextCancelColor = 0xFF798394; |
| | | |
| | | } |
| | | |
| | | public static class H_W { |
| | | public class H_W |
| | | { |
| | | /// <summary> |
| | | /// app高度 |
| | | /// </summary> |
| | | public static int H = 667; |
| | | public const int H = 667; |
| | | /// <summary> |
| | | /// app宽度 |
| | | /// </summary> |
| | | public static int W = 375; |
| | | public const int W = 375; |
| | | /// <summary> |
| | | /// 顶部高度 |
| | | /// </summary> |
| | | public static int T_Height = 64; |
| | | public const int T_Height = 64; |
| | | |
| | | /// <summary> |
| | | /// 线高度 |
| | | /// </summary> |
| | | public static int Line = 1; |
| | | public const int Line = 1; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | public class ShowDialog |
| | | { |
| | | |
| | | private static ShowDialog showDialog; |
| | | |
| | | public static ShowDialog Currnet |
| | | { |
| | | get |
| | | { |
| | | if (showDialog == null) |
| | | { |
| | | |
| | | showDialog = new ShowDialog(); |
| | | } |
| | | |
| | | return showDialog; |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | public Dialog dialog; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="title">标题</param> |
| | | /// <param name="action1">回调函数</param> |
| | | /// <param name="action2">回调函数</param> |
| | | public void ClickBox(string title, Action<Dialog> action1, Action<Dialog> action2) |
| | | /// <param name="jieTingAction">回调函数</param> |
| | | /// <param name="guanBiAction">回调函数</param> |
| | | public void ClickBox(string title, Action<Dialog> jieTingAction, Action<Dialog> guanBiAction) |
| | | { |
| | | Dialog dialog = new Dialog() |
| | | if (dialog != null) |
| | | { |
| | | //防止二重界面 |
| | | dialog.Close(); |
| | | } |
| | | dialog = new Dialog() |
| | | { |
| | | BackgroundColor = MusicColor.PopupBackgroundColor, |
| | | }; |
| | | |
| | | FrameLayout whiteView = new FrameLayout() |
| | | { |
| | | X = Application.GetRealWidth(56), |
| | |
| | | TextColor = MusicColor.TextColor, |
| | | TextSize = TextSize.Text16, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "来自“围墙机”呼叫", |
| | | Text = title, |
| | | |
| | | }; |
| | | whiteView.AddChidren(btnTitle); |
| | |
| | | |
| | | guaduanIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | action1(dialog); |
| | | guanBiAction(dialog); |
| | | }; |
| | | jietingIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | |
| | | action2(dialog); |
| | | jieTingAction(dialog); |
| | | }; |
| | | |
| | | } |
| | |
| | | using HDL_ON.Entity; |
| | | using System.Collections.Generic; |
| | | using Shared; |
| | | #if __IOS__ |
| | | #else |
| | | using Com.Videogo.Hdl; |
| | | #endif |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock |
| | | { |
| | |
| | | /// 读取云端的上设备列表(android源生添加设备到云端成功后) |
| | | /// <paramref name="devSerial"/>设备序列号</param> |
| | | /// </summary> |
| | | public void SkipAddDeviceActivity(string devSerial) |
| | | public void SkipAddDeviceActivity(string spk) |
| | | { |
| | | #if __IOS__ |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType(devSerial); |
| | | |
| | | }); |
| | | #else |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | if (!isBools) { |
| | | this.MainThread(()=> { |
| | | if (!isBools) |
| | | { |
| | | this.MainThread(() => |
| | | { |
| | | this.ShowTip("先获取萤石云子账号token失败。"); |
| | | |
| | | }); |
| | | } |
| | | HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity); |
| | | #if __IOS__ |
| | | |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk); |
| | | HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, adnroidActionDevSerial) => |
| | | { |
| | | if (isBool) |
| | |
| | | } |
| | | |
| | | })); |
| | | #endif |
| | | }); |
| | | |
| | | |
| | | |
| | | #endif |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="deviceSerial">设备序列号</param> |
| | | /// <param name="deviceId">设备id(云端上deviceId)</param> |
| | | /// <param name="spk">设备spk(云雀上定义好的)</param> |
| | | public void SkipRTVActivity(string deviceSerial, string deviceId, string spk) |
| | | /// <param name="isDialog">是否需要弹框</param> |
| | | public void SkipRTVActivity(string deviceSerial, string deviceId, string spk, bool isDialog) |
| | | { |
| | | #if __IOS__ |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk); |
| | | }); |
| | | |
| | | |
| | | #else |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | if (!isBools) |
| | | { |
| | | this.MainThread(() => { |
| | | this.ShowTip("先获取萤石云子账号token失败。"); |
| | | |
| | | }); |
| | | } |
| | | Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => |
| | | { |
| | | dialog.Close(); |
| | | HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); |
| | | }, (dialog) => |
| | | { |
| | | dialog.Close(); |
| | | }); |
| | | |
| | | }); |
| | | |
| | | |
| | | #endif |
| | | } |
| | | /// <summary> |
| | | /// 浏览历史记录 |
| | | /// </summary> |
| | | public void SkipRecordActivity(string deviceId) |
| | | { |
| | | this.InitializationAndroidData((s)=> { |
| | | |
| | | |
| | | //HDLEzvizSdk.Instance.JumpLockHistoryActivity(Application.Activity, deviceId); |
| | | |
| | | }); |
| | | //未实现 |
| | | //this.InitializationAndroidData(); |
| | | // |
| | | } |
| | | /// <summary> |
| | | /// 临时密码开门 |
| | | /// <paramref name="deviceId"/> |
| | | /// </summary> |
| | | public void SkipPSWActivity(string deviceId) |
| | | { |
| | | #if __IOS__ |
| | | |
| | | #else |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | if (!isBools) |
| | |
| | | |
| | | }); |
| | | } |
| | | HDLEzvizSdk.Instance.JumpTempPasswordActivity(Application.Activity, deviceId); |
| | | |
| | | if (isDialog) |
| | | { |
| | | Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => |
| | | { |
| | | dialog.Close(); |
| | | #if __IOS__ |
| | | |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); |
| | | #endif |
| | | }, (dialog) => |
| | | { |
| | | dialog.Close(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | #if __IOS__ |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); |
| | | #endif |
| | | } |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 浏览历史记录 |
| | | /// </summary> |
| | | public void SkipRecordActivity(string deviceId) |
| | | { |
| | | this.InitializationAndroidData((s) => |
| | | { |
| | | |
| | | #if __IOS__ |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpLockHistoryActivity(Application.Activity, deviceId); |
| | | #endif |
| | | |
| | | }); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 临时密码开门 |
| | | /// <paramref name="deviceId"/> |
| | | /// </summary> |
| | | public void SkipPSWActivity(string deviceId) |
| | | { |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | if (!isBools) |
| | | { |
| | | this.MainThread(() => |
| | | { |
| | | this.ShowTip("先获取萤石云子账号token失败。"); |
| | | |
| | | }); |
| | | } |
| | | #if __IOS__ |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpTempPasswordActivity(Application.Activity, deviceId); |
| | | #endif |
| | | |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | 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); |
| | | #else |
| | | HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); |
| | | |
| | |
| | | /// <returns></returns> |
| | | public List<Function> GetVideoDoorLockList() |
| | | { |
| | | //var list = FunctionList.List.GetVideoDoorLockList(); |
| | | var list = FunctionList.List.GetVideoDoorLockList(); |
| | | #if DEBUG |
| | | //list.Add(new Function { name = "视频门锁一", sid = "23456789", spk = SPK.VideoDoorLock }); |
| | | //list.Add(new Function { name = "视频门锁二", sid = "2345678922", spk = SPK.VideoDoorLock }); |
| | | #endif |
| | | return new List<Function>(); |
| | | return list; |
| | | } |
| | | #region ---------自定义线程(子线程,主线程)-------- |
| | | /// <summary> |
| | |
| | | room,//房间 |
| | | push,//推送 |
| | | } |
| | | |
| | | #if __IOS__ |
| | | ///// <summary> |
| | | ///// 专门定义给Ios回调用着,没有特殊含义 |
| | | ///// </summary> |
| | | //public class IosIHdlInterface : Shared.IOS.HDLLinphoneSDK.HDLLinphoneCallDelegate |
| | | //{ |
| | | |
| | | // Action<bool, string> mAction; |
| | | // public IosIHdlInterface(Action<bool, string> action) |
| | | // { |
| | | // mAction = action; |
| | | // } |
| | | // /// <summary> |
| | | // /// |
| | | // /// </summary> |
| | | // /// <param name="p0">true是入网成功(源生回调返回)</param> |
| | | // /// <param name="p1">设备的序列化(源生回调返回)</param> |
| | | // public void AddCallback(bool p0, string p1) |
| | | // { |
| | | // mAction?.Invoke(p0, p1); |
| | | // } |
| | | |
| | | |
| | | //} |
| | | #else |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 专门定义给安卓回调用着,没有特殊含义 |
| | | /// </summary> |
| | | public class AndroidIHdlInterface : Java.Lang.Object, IHdlInterface |
| | | { |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | #endif |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | this.CalculatedPosition();//重新计算宽度 |
| | | |
| | | }); |
| | | //infoView.actionDel += () => |
| | | // { |
| | | // //解绑设备后 |
| | | // this.RemoveFromParent(); |
| | | // this.action?.Invoke(); |
| | | infoView.actionDel += () => |
| | | { |
| | | //解绑设备后 |
| | | this.RemoveFromParent(); |
| | | this.action?.Invoke(); |
| | | |
| | | // }; |
| | | }; |
| | | MainPage.BasePageView.AddChidren(infoView); |
| | | infoView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | //实时视频 |
| | | this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | | { |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk); |
| | | CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk,false); |
| | | }); |
| | | //临时密码 |
| | | this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => |
| | |
| | | var classificaitionView = new ClassificationPage(); |
| | | ContextView.AddChidren(classificaitionView); |
| | | classificaitionView.LoadPage(); |
| | | |
| | | }); |
| | | }) |
| | | { IsBackground = true, Priority = System.Threading.ThreadPriority.Lowest }.Start(); |