From eace7a4d75c0bea498253f524906c6ce326b80f2 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 14 三月 2023 11:33:03 +0800
Subject: [PATCH] 2023年03月14日11:32:57
---
HDL-ON_iOS/Resources/Language.ini | 2
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 70 +++++++++++++++++++---
HDL_ON/Common/Constant.cs | 4 +
HDL-ON_Android/Assets/Language.ini | 2
HDL_ON/Common/HDLCommon.cs | 6 ++
HDL_ON/Common/R.cs | 5 +
HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs | 43 +++++++++++---
HDL-ON_Android/Other/JPush/JPushReceiver.cs | 3
8 files changed, 112 insertions(+), 23 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 10b365a..aa05b47 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1131,6 +1131,7 @@
8507=Temporary password
8508=History
8509=Fluorite video door lock
+8510=Call from the doorbell
@@ -2368,6 +2369,7 @@
8507=涓存椂瀵嗙爜
8508=鍘嗗彶璁板綍
8509=钀ょ煶瑙嗛闂ㄩ攣
+8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙�
diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index 07f2fcb..e7cfbd3 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -36,7 +36,6 @@
{
//2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂
//base.OnNotifyMessageOpened(context, notificationMessage);
-
OpenNotification(context, notificationMessage);
}
@@ -48,7 +47,7 @@
public override void OnNotifyMessageArrived(Context context, NotificationMessage notificationMessage)
{
base.OnNotifyMessageArrived(context, notificationMessage);
-
+
var pushMes = new JPushMessageInfo()
{
Title = notificationMessage.NotificationTitle,
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 6fa2769..af93f1d 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1131,6 +1131,7 @@
8507=Temporary password
8508=History
8509=Fluorite video door lock
+8510=Call from the doorbell
@@ -2368,6 +2369,7 @@
8507=涓存椂瀵嗙爜
8508=鍘嗗彶璁板綍
8509=钀ょ煶瑙嗛闂ㄩ攣
+8510=鏉ヨ嚜鈥滈棬閾冣�濆懠鍙�
diff --git a/HDL_ON/Common/Constant.cs b/HDL_ON/Common/Constant.cs
index 0dd7756..92b1527 100644
--- a/HDL_ON/Common/Constant.cs
+++ b/HDL_ON/Common/Constant.cs
@@ -309,6 +309,10 @@
/// HDL鍙瀵硅
/// </summary>
HDL_INTERPHONE,
+ /// <summary>
+ /// 闂ㄩ搩鎺ㄩ��(钀ょ煶瑙嗛闂ㄩ攣)
+ /// </summary>
+ DOOR_BELL,
}
/// <summary>
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 7aa1087..0ef7dc5 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -304,6 +304,7 @@
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString()))
{
+
if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
//瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡
@@ -386,6 +387,11 @@
{
ShowAlarmPushMessage(jpushMessageInfo, false);
}
+ else if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString()))
+ {
+ /////瑙嗛闂ㄩ攣
+ HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity();
+ }
}
}
catch (Exception EX)
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 7e139ca..ccb92d4 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3100,6 +3100,11 @@
/// 钀ょ煶瑙嗛闂ㄩ攣
/// </summary>
public const int yingshishipinmensuo = 8509;
+ /// <summary>
+ /// 鏉ヨ嚜鈥滈棬閾冣�濆懠鍙�
+ /// </summary>
+ public const int laizimenlinghujiao = 8510;
+
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
index d5a2001..aab55e7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/View/ShowDialog.cs
@@ -5,19 +5,43 @@
{
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),
@@ -50,11 +74,11 @@
TextColor = MusicColor.TextColor,
TextSize = TextSize.Text16,
TextAlignment = TextAlignment.CenterLeft,
- Text = "鏉ヨ嚜鈥滃洿澧欐満鈥濆懠鍙�",
+ Text = title,
};
whiteView.AddChidren(btnTitle);
-
+
Button guaduanIconBtn = new Button
{
X = Application.GetRealWidth(75),
@@ -77,12 +101,11 @@
guaduanIconBtn.MouseUpEventHandler += (sender, e) =>
{
- action1(dialog);
+ guanBiAction(dialog);
};
jietingIconBtn.MouseUpEventHandler += (sender, e) =>
{
-
- action2(dialog);
+ jieTingAction(dialog);
};
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
index cf5d627..ada722d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using HDL_ON.Entity;
using System.Collections.Generic;
+using Shared;
namespace HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock
{
@@ -29,18 +30,30 @@
/// <summary>
/// 璺宠浆鍒癆ndroid閭h竟鍘�
/// </summary>
- public void SkipAddDeviceActivity()
+ public void SkipAddDeviceActivity( )
{
//鏈疄鐜�
+#if __IOS__
+
+#else
+
+#endif
+
}
+
/// <summary>
/// 璺宠浆鍒癆ndroid(瀹炴椂瑙嗛)閭h竟鍘�
/// </summary>
public void SkipRTVActivity()
{
- //鏈疄鐜�
- HDL_ON.UI.UI2.FuntionControlView.Video.View.ShowDialog showDialog = new UI2.FuntionControlView.Video.View.ShowDialog();
- showDialog.ClickBox("", (s) => { }, (s1) => { });
+ Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) =>
+ {
+ dialog.Close();
+ }, (dialog) =>
+ {
+ dialog.Close();
+ });
+ //jumpToEZRealPlayActivity(Shared.Application.Activity, deviceId, deviceSerial, deviceType)
}
/// <summary>
/// 璺宠浆鍒癆ndroid(鍘嗗彶璁板綍)閭h竟鍘�
@@ -48,17 +61,13 @@
public void SkipRecordActivity()
{
//鏈疄鐜�
- HDL_ON.UI.UI2.FuntionControlView.Video.View.ShowDialog showDialog = new UI2.FuntionControlView.Video.View.ShowDialog();
- showDialog.ClickBox("", (s) => { }, (s1) => { });
}
/// <summary>
/// 璺宠浆鍒癆ndroid(涓存椂瀵嗙爜)閭h竟鍘�
/// </summary>
public void SkipPSWActivity()
{
- //鏈疄鐜�
- HDL_ON.UI.UI2.FuntionControlView.Video.View.ShowDialog showDialog = new UI2.FuntionControlView.Video.View.ShowDialog();
- showDialog.ClickBox("", (s) => { }, (s1) => { });
+ //jumpTempPasswordActivity(Application.Activity, deviceId);
}
/// <summary>
/// 钀ょ煶瑙嗛闂ㄩ攣鐨勫浘鏍�
@@ -98,9 +107,48 @@
FunctionList.List.DeleteFunction(function);
MainPage.Log($"鏂囦欢鍒犻櫎->{function.name}-->{function.spk}");
}
+ /// <summary>
+ /// 闂儊妗�
+ /// </summary>
+ /// <param name="frame">鐖惰鍥�</param>
+ /// <param name="tipText">鎻愮ず鏂囨湰</param>
+ /// <param name="closeTime">鏄剧ず鏃堕棿,榛樿鏄�1s</param>
+ public void ShowTip(FrameLayout frame, string tipText, int closeTime = 1)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new Tip()
+ {
+ CloseTime = closeTime,
+ Text = tipText,
+ Direction = AMPopTipDirection.None,
+ }.Show(frame);
+ });
+ }
+
-
+ /// <summary>
+ /// 淇℃伅鎻愮ず绐楀彛锛岃嚜鍔ㄥ叧闂�
+ /// </summary>
+ /// <param name="msg">鎻愮ず閿欒鏂囨湰</param>
+ public void ShowTip(string msg, int time = 2)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new PublicAssmebly().TipMsgAutoClose(msg, false, time * 1000);
+ });
+ }
+ /// <summary>
+ /// 瀵硅瘽妗�
+ /// </summary>
+ public void ShowAlert()
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new Alert("", "瑙嗛闂ㄩ攣涓�", "鍙栨秷", "纭畾").Show();
+ });
+ }
/// <summary>
/// 鑾峰彇钀ょ煶瑙嗛闂ㄩ攣鍒楄〃
/// </summary>
@@ -109,7 +157,7 @@
{
var list = FunctionList.List.GetVideoDoorLockList();
#if DEBUG
- list.Add(new Function { name = "瑙嗛闂ㄩ攣涓�", sid = "23456789", spk = SPK.VideoDoorLock });
+ //list.Add(new Function { name = "瑙嗛闂ㄩ攣涓�", sid = "23456789", spk = SPK.VideoDoorLock });
//list.Add(new Function { name = "瑙嗛闂ㄩ攣浜�", sid = "2345678922", spk = SPK.VideoDoorLock });
#endif
return list;
--
Gitblit v1.8.0