HDL_ON/Common/HDLCommon.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/DAL/Server/HttpUtil.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HDL_ON/Common/HDLCommon.cs
@@ -275,10 +275,10 @@ //报警推送才弹窗提示(messageType包含Alarm关键字的) if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) { //萤石门锁更新开锁图标 HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.UpdateDoorLockState(PushMessageType.Alarm, jpushMessageInfo.HomeId, jpushMessageInfo.spk, jpushMessageInfo.Extras); //报警推送弹窗提示 ShowAlarmPushMessage(jpushMessageInfo, true); //报警推送弹窗提示 ShowAlarmPushMessage(jpushMessageInfo, true); //萤石门锁推送 HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) { @@ -387,22 +387,15 @@ else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString())) { ShowAlarmPushMessage(jpushMessageInfo, false); //萤石门锁推送 HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString())) { try { if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; var expantContent = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.UI2.FuntionControlView.VideoDoorLock.ExpantContent>(jpushMessageInfo.expantContent); if (expantContent == null) { return; } ///视频门锁 HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, true); } catch { } //萤石门锁推送 HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } } } catch (Exception EX) HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@ /// 固定域名,正式环境 /// 公共域名就近解析 /// </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> HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -89,6 +89,7 @@ //空调 case SPK.AcStandard: case SPK.HvacAC: case SPK.AcIr: //地热 case SPK.FloorHeatStandard: case SPK.HvacFloorHeat: HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -162,6 +162,7 @@ //空调 case SPK.AcStandard: case SPK.HvacAC: case SPK.AcIr: //地热 case SPK.HvacFloorHeat: case SPK.FloorHeatStandard: @@ -1087,6 +1088,7 @@ break; case SPK.AcStandard: case SPK.HvacAC: case SPK.AcIr: { string on_off = GetKeyValue("on_off", dicList); string set_temp = GetKeyValue("set_temp", dicList); @@ -1668,6 +1670,7 @@ break; case SPK.AcStandard: case SPK.HvacAC: case SPK.AcIr: { foreach (var dic in dicList) { HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -519,7 +519,7 @@ deviceStrTypeList.Add(Language.StringByID(StringId.Curtain)); } ///空调类 var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.HvacAC); var ac = deviceList.Find((device) => device.spk == SPK.AcStandard || device.spk == SPK.HvacAC|| device.spk == SPK.AcIr); if (ac != null) { deviceStrTypeList.Add(Language.StringByID(StringId.AC)); @@ -647,6 +647,7 @@ functionTypeList.Add(SPK.AcStandard); functionTypeList.Add(SPK.HvacAC); functionTypeList.Add(SPK.HvacCac); functionTypeList.Add(SPK.AcIr); } ///地暖类 else if (deviceType == Language.StringByID(StringId.FloorHeating)) @@ -777,6 +778,7 @@ functionTypeList.Add(SPK.IpCam_Imou); functionTypeList.Add(SPK.SensorPm10); functionTypeList.Add(SPK.VideoDoorLock); functionTypeList.Add(SPK.AcIr); } @@ -837,6 +839,7 @@ deviceTypeList.Add(SPK.IpCam_Imou); deviceTypeList.Add(SPK.SensorPm10); deviceTypeList.Add(SPK.VideoDoorLock); deviceTypeList.Add(SPK.AcIr); } break; @@ -860,6 +863,7 @@ deviceTypeList.Add(SPK.MusicStandard); deviceTypeList.Add(SPK.AvMusic); deviceTypeList.Add(SPK.MechanicalArm); deviceTypeList.Add(SPK.AcIr); } break; } HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -297,6 +297,7 @@ break; case SPK.AcStandard: case SPK.HvacAC: case SPK.AcIr: { #region 界面 ///开关 HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
@@ -1,4 +1,5 @@ using System; using HDL_ON.UI.CSS; using HDL_ON.UI.Music; using Shared; namespace HDL_ON.UI.UI2.FuntionControlView.Video.View @@ -24,7 +25,7 @@ } public Dialog dialog; public Dialog dialog; /// <summary> /// @@ -79,7 +80,7 @@ }; whiteView.AddChidren(btnTitle); Button guaduanIconBtn = new Button { X = Application.GetRealWidth(75), @@ -111,6 +112,128 @@ } /// <summary> /// 初始化Dialog /// </summary> /// <param name="titleStr">标题</param> /// <param name="msgStr">提示信息</param> /// <param name="okAction"></param> /// <param name="cancelAction"></param> /// <param name="cancelID"></param> /// <param name="confirmID"></param> public void ShowDialogBase(string titleStr, string msgStr, Action okAction, Action cancelAction, int cancelID = StringId.Cancel, int confirmID = StringId.Confirm, bool isAlarmColor = false) { if (dialog != null) { //防止二重界面 dialog.Close(); } dialog = new Dialog() { BackgroundColor = MusicColor.PopupBackgroundColor, }; var bodyView = new FrameLayout(); dialog.AddChidren(bodyView); FrameLayout contentView = new FrameLayout() { Gravity = Gravity.Center, Width = Application.GetRealWidth(270), Height = Application.GetRealHeight(140), BackgroundColor = CSS_Color.MainBackgroundColor, BorderColor = 0x00000000, BorderWidth = 0, Radius = (uint)Application.GetMinRealAverage(10), }; bodyView.AddChidren(contentView); Button btnTitle = new Button() { Y = Application.GetRealHeight(20), Height = Application.GetRealHeight(22), TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.SubheadingFontSize, TextAlignment = TextAlignment.Center, IsBold = true, Text = titleStr, }; contentView.AddChidren(btnTitle); int Width135 = Application.GetRealWidth(135); //提示内容按钮 Button btnMsg = new Button() { Y = btnTitle.Bottom + Application.GetRealHeight(4), X = Application.GetRealWidth(6), Height = Application.GetRealHeight(46), Width = Application.GetRealWidth(258), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, Text = msgStr, IsMoreLines = true, }; contentView.AddChidren(btnMsg); Button btnLine = new Button() { Y = Application.GetRealHeight(96), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(270 / 2), BackgroundColor = CSS_Color.DividingLineColor, }; contentView.AddChidren(btnLine); Button btnCancel = new Button() { Y = btnLine.Bottom, Width = Width135, Height = Application.GetRealHeight(43), TextAlignment = TextAlignment.Center, TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.SubheadingFontSize, TextID = cancelID, }; contentView.AddChidren(btnCancel); Button btnConfirm = new Button() { X = contentView.Width - Width135, Y = btnLine.Y, Width = Width135, Height = Application.GetRealHeight(45), TextAlignment = TextAlignment.Center, //TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.SubheadingFontSize, TextColor = CSS_Color.MainBackgroundColor, BackgroundColor = CSS_Color.MainColor, TextID = confirmID, }; contentView.AddChidren(btnConfirm); //例:右下圆角 大小为50 int mRectCornerID = HDLUtils.RectCornerBottomRight; btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), mRectCornerID); btnCancel.MouseUpEventHandler += (sender, e) => { dialog.Close(); cancelAction?.Invoke(); }; btnConfirm.MouseUpEventHandler += (sender, e) => { dialog.Close(); okAction?.Invoke(); }; if (isAlarmColor) { btnTitle.TextColor = CSS_Color.WarningColor; btnConfirm.TextColor = CSS_Color.MainBackgroundColor; btnConfirm.BackgroundColor = CSS_Color.WarningColor; } } /// <summary> /// 生成二维码 @@ -118,7 +241,7 @@ /// <param name="str1">标题</param> public void QRcode(string str1) { Dialog dialog = new Dialog() Dialog dialog = new Dialog() { BackgroundColor = CSS.CSS_Color.viewTrans60lucence, }; @@ -143,18 +266,18 @@ TextSize = TextSize.Text16, TextAlignment = TextAlignment.Center, IsBold = true, TextID=StringId.linshimima, TextID = StringId.linshimima, }; whiteView.AddChidren(btnTitle); //密码 Button btnpaw = new Button() { X=Application.GetRealWidth(100), X = Application.GetRealWidth(100), Y = Application.GetRealHeight(62), Height = Application.GetRealHeight(32), Width = Application.GetRealWidth(82), TextColor = MusicColor.SelectedColor, TextSize =24, TextSize = 24, TextAlignment = TextAlignment.Center, IsBold = true, Text = str1, HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -2,6 +2,7 @@ using HDL_ON.Entity; using System.Collections.Generic; using Shared; using HDL_ON.DAL.Server; #if __IOS__ #else using Com.Videogo.Hdl; @@ -278,7 +279,65 @@ { return VideDoorLockSend.Current.GetVideoDoorLockLockModelsList(); } /// <summary> /// 门锁推送 /// </summary> /// <param name="pushMessageType"></param> /// <param name="jPushMessageInfo"></param> public void DoorLockPush(JPushMessageInfo jpushMessageInfo) { this.MainThread(() => { if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; //{ "deviceSid":"J92513662","type":"opendoormsg","extDevId":"J92513662","deviceId":"1641010144999936001","spk":"security.door.ezviz"} var expantContent = Newtonsoft.Json.JsonConvert.DeserializeObject<ExpantContent>(jpushMessageInfo.expantContent); if (expantContent == null) { return; } if (expantContent.spk != SPK.VideoDoorLock) { return; } if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString())) { ///打开视频门锁 this.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId, expantContent.spk, true); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) { //低电量推送 this.UpdateDoorLockState(PushMessageType.Alarm); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString())) { //开门推送 this.UpdateDoorLockState(PushMessageType.Prompt); } }); } /// <summary> /// 更新开锁图标和电池状态 /// </summary> private void UpdateDoorLockState(PushMessageType pushMessageType) { int childrenCount = MainPage.BasePageView.ChildrenCount - 1; for (int i = childrenCount; childrenCount > i; i--) { View view = MainPage.BasePageView.GetChildren(i); if (view is VideoDoorLockPage) { VideoDoorLockPage videoDoorLockPage = (VideoDoorLockPage)view; if (videoDoorLockPage != null) { videoDoorLockPage.UpdateState(pushMessageType); } } } } /// <summary> /// 获取萤石视频【门锁】列表 /// </summary> @@ -292,37 +351,6 @@ #endif return list; } /// <summary> /// 更新开锁图标和电池状态 /// </summary> public void UpdateDoorLockState(PushMessageType pushMessageType, string homeId, string spk, string stateContent) { if (spk != SPK.VideoDoorLock) { return; } this.MainThread(() => { int childrenCount = MainPage.BasePageView.ChildrenCount - 1; for (int i = childrenCount; childrenCount > i; i--) { View view = MainPage.BasePageView.GetChildren(i); if (view is VideoDoorLockPage) { VideoDoorLockPage videoDoorLockPage = (VideoDoorLockPage)view; if (videoDoorLockPage != null) { videoDoorLockPage.UpdateState(pushMessageType); } } } }); } #region --------- 功能文件保存,删除 -------- /// <summary> /// 保存本地文件 @@ -482,6 +510,8 @@ new PublicAssmebly().TipMsgAutoClose(msg, false, time * 1000); }); } #endregion /// <summary> /// 弹框类型 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -214,11 +214,11 @@ TextAlignment = TextAlignment.Center, UnSelectedImagePath = "FunctionIcon/DoorLock/Cell.png", }; cellFrame.AddChidren(btnCell); cellFrame.AddChidren(btnCell); //门锁状态 btnDoorLockIcon = new Button //门锁状态 btnDoorLockIcon = new Button { X = Application.GetRealWidth(65), Y = Application.GetRealHeight(108), @@ -317,7 +317,7 @@ //实时视频 this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk,false); CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk, false); }); //临时密码 this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => @@ -363,7 +363,7 @@ }); } /// <summary> /// 重新计算宽度(设备名称,房间控件) @@ -392,15 +392,22 @@ { CommonMethod.Current.MainThread(() => { if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) if (pushMessageType == PushMessageType.Alarm) { this.btnDoorLockIcon.IsSelected = false; //门锁电池值 if (this.btnCell != null) { //videoDoorLockPage.btnCell.Text = ""; } } //门锁电池值 if (this.btnCell != null) else { //videoDoorLockPage.btnCell.Text = ""; if (this.btnDoorLockIcon != null && !this.btnDoorLockIcon.IsSelected) { this.btnDoorLockIcon.IsSelected = false; } } }); }