From 87c5e522b8ead5f8d5d201323e14e7aa438e84ec Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 14 三月 2023 19:08:25 +0800
Subject: [PATCH] 2023年03月14日19:08:20
---
HDL_ON/DAL/Server/NewAPI.cs | 2
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 10 ++
HDL_ON/Common/HDLCommon.cs | 20 +++-
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs | 49 +++---------
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 6
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs | 8 +-
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 76 +++++++++++-------
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs | 30 +++++++
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs | 1
9 files changed, 118 insertions(+), 84 deletions(-)
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 0ef7dc5..cbcb32f 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -304,9 +304,9 @@
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString()))
{
-
+
if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
-
+
//瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡
var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
try
@@ -389,8 +389,18 @@
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.DOOR_BELL.ToString()))
{
- /////瑙嗛闂ㄩ攣
- HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity();
+ 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);
+ }
+ catch { }
}
}
}
@@ -565,7 +575,7 @@
//闃叉澶氭寮圭獥澶勭悊
- if (alarmPushConfirmDialog == null)
+ if (alarmPushConfirmDialog == null)
{
alarmPushConfirmDialog = new ConfirmDialog(isAlarm);
alarmPushConfirmDialog.ShowDialog(Language.StringByID(StringId.Tip), jpushMessageInfo.Content, goAction, cancelAction, StringId.Cancel, StringId.LookOver);
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 4400e7a..fbebd0f 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -469,7 +469,7 @@
/// <summary>
/// 鍒犻櫎璁惧锛堣悿鐭宠棰戦棬閿侊級
/// </summary>
- public const string Api_Post_DeleteDevice = "home-wisdom/platform/yingshi/child/deleteDevice";
+ public const string Api_Post_DeleteDevice = "/home-wisdom/platform/yingshi/child/deleteDevice";
/// <summary>
/// 鐢垫睜璇︽儏锛堣悿鐭宠棰戦棬閿侊級
/// </summary>
diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
index b2635af..30afa04 100644
--- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -832,6 +832,7 @@
{
if (bodyView != null)
{
+
//Utlis.WriteLine("GetPushMessageAction M鏀跺埌鎺ㄩ��");
GetPushMessageList(showMesType);
}
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 4e1db09..028b0c9 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -619,7 +619,7 @@
};
contentPageView.AddChidren(functionsPageView);
- FrameLayout functionContentView;
+ FrameLayout functionContentView;
functionContentView = new FrameLayout()
{
Y = Application.GetRealHeight(16),
@@ -748,7 +748,7 @@
case ShowFunction.VideoDoorLock:
functionCount = FunctionList.List.GetVideoDoorLockList().Count;
#if DEBUG
- functionCount = 1;
+ //functionCount = 1;
#endif
functionOnCount = 1;
break;
@@ -1157,7 +1157,7 @@
btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
{
var list = HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockList();
- var form = new UI2.FuntionControlView.VideoDoorLock.VideoDoorLockListPage();
+ var form = new UI2.FuntionControlView.VideoDoorLock.VideoDoorLockListPage(null);
form.AddForm(list);
};
break;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
index ada722d..458e977 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -44,7 +44,10 @@
/// <summary>
/// 璺宠浆鍒癆ndroid(瀹炴椂瑙嗛)閭h竟鍘�
/// </summary>
- public void SkipRTVActivity()
+ /// <param name="deviceSerial">璁惧搴忓垪鍙�</param>
+ /// <param name="deviceId">璁惧id(浜戠涓奷eviceId)</param>
+ /// <param name="spk">璁惧spk(浜戦泙涓婂畾涔夊ソ鐨�)</param>
+ public void SkipRTVActivity(string deviceSerial, string deviceId, string spk)
{
Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) =>
{
@@ -53,7 +56,10 @@
{
dialog.Close();
});
- //jumpToEZRealPlayActivity(Shared.Application.Activity, deviceId, deviceSerial, deviceType)
+#if __IOS__
+#else
+#endif
+ //jumpToEZRealPlayActivity(Shared.Application.Activity, deviceId, deviceSerial, spk)
}
/// <summary>
/// 璺宠浆鍒癆ndroid(鍘嗗彶璁板綍)閭h竟鍘�
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs
index 6da1bd7..686afe8 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/ObjectClass.cs
@@ -3,8 +3,8 @@
{
public class ObjectClass
{
-
-
+
+
}
/// <summary>
/// 鐢ㄦ埛淇℃伅(钀ょ煶瑙嗛闂ㄩ攣)
@@ -52,5 +52,31 @@
public string name = string.Empty;
}
+ /// <summary>
+ /// 鎺ㄩ�佸唴瀹瑰璞�
+ /// </summary>
+ public class ExpantContent
+ {
+ /// <summary>
+ /// 璁惧搴忓垪鍙�
+ /// </summary>
+ public string devSerial = string.Empty;
+ /// <summary>
+ /// 璁惧id
+ /// </summary>
+ public string deviceId = string.Empty;
+ /// <summary>
+ /// 涓嶇煡閬撴槸鍟�
+ /// </summary>
+ public string interphoneTypeEnum = string.Empty;
+ /// <summary>
+ /// 涓嶇煡閬撴槸鍟�
+ /// </summary>
+ public string subToken = string.Empty;
+ /// <summary>
+ /// 浜戦泙涓婂畾涔夌殑璁惧spk
+ /// </summary>
+ public string spk = string.Empty;
+ }
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs
index 3fccd09..223108b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideDoorLockSend.cs
@@ -45,8 +45,8 @@
Dictionary<string, object> d = new Dictionary<string, object>();
d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
d.Add("deviceSerial", function.sid);//绛夊悓闂ㄩ攣搴忓垪鍙�
- d.Add("platform", 1);//骞冲彴
- var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_DeleteDevice, "鍒犻櫎钀ょ煶闂ㄩ攣璁惧");
+ d.Add("platform", 1);//骞冲彴
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_DeleteDevice, "鍒犻櫎钀ょ煶闂ㄩ攣璁惧");
if (!this.DataChecking(responsePackNew))
{
return;
@@ -54,7 +54,7 @@
if (function != null)
{
- action?.Invoke(false);
+ action?.Invoke(true);
}
}
catch (Exception s)
@@ -75,7 +75,7 @@
Dictionary<string, object> d = new Dictionary<string, object>();
d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
d.Add("deviceId", function.deviceId);
- var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Lockstatus, "鍒犻櫎钀ょ煶瑙嗛闂ㄩ攣鐘舵��");
+ var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_Lockstatus, "鑾峰彇钀ょ煶瑙嗛闂ㄩ攣鐘舵��");
if (!this.DataChecking(responsePackNew))
{
return new VideoDoorLockInfo();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs
index 330e8ef..c801392 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockListPage.cs
@@ -27,10 +27,20 @@
/// 鍒楄〃鎺т欢
/// </summary>
private VerticalListControl listView = null;
+ /// <summary>
+ /// 鍒犻櫎璁惧鍚庨渶瑕佹洿鏂扮晫闈㈢殑鍥炶皟
+ /// </summary>
+ public Action action;
+
#endregion
#region 鈻� 鍒濆鍖朹____________________________
+
+ public VideoDoorLockListPage(Action action) {
+ this.action = action;
+ }
+
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
@@ -41,8 +51,6 @@
this.listDevice.AddRange(i_listDevice);
//鏅鸿兘闂ㄩ攣
base.SetTitleText(Language.StringByID(StringId.shipinmensuo));
- //鍒濆鍖栧ご閮ㄥ巻鍙茶褰曟帶浠�
- //this.InitTopHistoryControl();
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
@@ -173,13 +181,11 @@
{
var form = new VideoDoorLockPage(i_device, btnName, btnRoom, CommonMethod.Comerom.function,()=> {
this.CloseForm();
+ this.action?.Invoke();
});
MainPage.BasePageView.AddChidren(form);
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
form.Show();
-
- //var form = new VideoDoorLockPage();
- //form.AddForm(i_device, new Button(), btnName, btnRoom);
};
//搴曢儴鍐嶅姞涓棿璺�
@@ -190,35 +196,6 @@
#endregion
-
- public void SkipViewPage(CommonMethod.Comerom comerom) {
- //var form = new VideoDoorLockPage(i_device, btnName, btnRoom, Comerom.function);
- //MainPage.BasePageView.AddChidren(form);
- //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- //form.Show();
- }
-
- #region 鈻� 鍒濆鍖栧ご閮ㄥ巻鍙茶褰曞浘鏍嘷____________
-
- /// <summary>
- /// 鍒濆鍖栧ご閮ㄥ巻鍙茶褰曟帶浠�
- /// </summary>
- private void InitTopHistoryControl()
- {
- //鍘嗗彶璁板綍鍥炬爣
- var btnIcon = new IconViewControl(28);
- btnIcon.X = Application.GetRealWidth(337);
- btnIcon.Y = Application.GetRealHeight(9);
- btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/History.png";
- topFrameLayout.AddChidren(btnIcon);
- btnIcon.ButtonClickEvent += (sender, e) =>
- {
- var form = new DoorLockHistoryInfoPage();
- form.AddForm(this.listDevice);
- };
- }
-
- #endregion
#region 鈻� 璁惧鐘舵�佹帹閫乢______________________
@@ -238,8 +215,6 @@
#endregion
- #region 鈻� 涓�鑸柟娉昣__________________________
-
- #endregion
+
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
index e4c70ef..d324778 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -6,6 +6,7 @@
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
using HDL_ON.UI.Music;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
namespace HDL_ON.UI
{
@@ -39,6 +40,10 @@
/// 鍖哄煙
/// </summary>
private Button btnCurrDeviceRoom;
+ /// <summary>
+ /// 鐢甸噺鐖舵帶浠�
+ /// </summary>
+ private FrameLayout cellFrame;
/// <summary>
/// 鐢甸噺
/// </summary>
@@ -164,11 +169,7 @@
};
whiteFl.AddChidren(btnCurrDeviceName);
- btnCurrDeviceName.Width = btnCurrDeviceName.GetTextWidth();
- if (btnCurrDeviceName.GetTextWidth() > btnCollectIcon.X)
- {
- btnCurrDeviceName.Width = btnCollectIcon.X;
- }
+
btnCurrDeviceRoom = new Button
{
TextSize = TextSize.Text12,
@@ -181,9 +182,8 @@
TextAlignment = TextAlignment.CenterLeft,
};
whiteFl.AddChidren(btnCurrDeviceRoom);
- btnCurrDeviceRoom.Width = btnCurrDeviceRoom.GetTextWidth();
- var cellFrame = new FrameLayout
+ cellFrame = new FrameLayout
{
X = btnCurrDeviceRoom.Right + Application.GetRealWidth(20),
Y = btnCurrDeviceName.Bottom + Application.GetRealHeight(5),
@@ -191,8 +191,6 @@
Height = Application.GetRealHeight(16),
};
whiteFl.AddChidren(cellFrame);
-
-
cellDiyArcSeekBar = new DiyArcSeekBar
{
@@ -221,9 +219,6 @@
cellFrame.AddChidren(btnCell);
-
-
-
//闂ㄩ攣鐘舵��
btnDoorLockIcon = new Button
{
@@ -235,6 +230,9 @@
SelectedImagePath = "FunctionIcon/DoorLock/UnLocking.png",
};
whiteFl.AddChidren(btnDoorLockIcon);
+
+ this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害
+
int heightY = btnDoorLockIcon.Bottom + Application.GetRealHeight(70);
//瀹炴椂瑙嗛
rtvFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout);
@@ -264,6 +262,8 @@
pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png";
pswFL.GetTextButton().TextID = StringId.linshimima1;
+
+
#endregion
@@ -278,7 +278,7 @@
{
RemoveFromParent();
-
+
};
//璁剧疆
this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) =>
@@ -295,19 +295,10 @@
////鍒锋柊鏄剧ず
this.btnDeviceName.Text = this.device.name;
this.btnRoomName.Text = this.device.GetRoomListName();
- this.topView.topNameBtn.Text = this.device.name;
this.btnCurrDeviceName.Text = this.device.name;
this.btnCurrDeviceRoom.Text = this.device.GetRoomListName();
+ this.CalculatedPosition();//閲嶆柊璁$畻瀹藉害
- ////浠庢柊璁$畻瀹藉害
- //this.btnDeviceName.Text = btnDeviceName.Text;
- //this.btnDeviceName.Width = this.btnDeviceName.GetTextWidth();
-
- //this.btnRoomName.Text = btnRoomName.Text;
- //this.btnRoomName.Width = this.btnRoomName.GetTextWidth();
-
- ////鍥炶皟浜嬩欢
- //this.SettionFinishEvent?.Invoke();
}, () =>
{
//瑙g粦璁惧鍚�
@@ -327,12 +318,16 @@
//瀹炴椂瑙嗛
this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) =>
{
-
+ CommonMethod.Current.SkipRTVActivity(this.device.sid,this.device.deviceId,this.device.spk);
});
//涓存椂瀵嗙爜
- this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
+ this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => {
+ CommonMethod.Current.SkipPSWActivity();
+ });
//鍘嗗彶璁板綍
- this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => { });
+ this.recordFL.SetClickListener((fl, btnStateImage, btnStateText) => {
+ CommonMethod.Current.SkipRecordActivity();
+ });
}
@@ -349,7 +344,7 @@
try
{
var videoDoorLockInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetVideoDoorLockState(this.device);
- var cellInfo =UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device);
+ var cellInfo = UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.GetCellValue(this.device);
Application.RunOnMainThread(() =>
{
//this.cellDiyArcSeekBar.Progress = i;
@@ -367,8 +362,29 @@
});
}
})
- { IsBackground = true }.Start() ;
+ { IsBackground = true }.Start();
}
+
+ /// <summary>
+ /// 閲嶆柊璁$畻瀹藉害(璁惧鍚嶇О,鎴块棿鎺т欢)
+ /// </summary>
+ private void CalculatedPosition()
+ {
+ this.btnCurrDeviceName.Width = this.btnCurrDeviceName.GetTextWidth();
+ if (this.btnCurrDeviceName.GetTextWidth() > this.btnCollectIcon.X)
+ {
+ //閲嶆柊璁$畻瀹藉害
+ this.btnCurrDeviceName.Width = this.btnCollectIcon.X + Application.GetRealWidth(-10);
+ }
+ this.btnCurrDeviceRoom.Width = this.btnCurrDeviceRoom.GetTextWidth();
+ if (this.btnCurrDeviceRoom.GetTextWidth() > this.btnCollectIcon.X)
+ {
+ //閲嶆柊璁$畻瀹藉害
+ this.btnCurrDeviceRoom.Width = this.btnCollectIcon.X + Application.GetRealWidth(-20 - 10);
+ }
+ this.cellFrame.X = this.btnCurrDeviceRoom.Right + Application.GetRealWidth(20);
+ }
+
}
/// <summary>
/// 鑷繁寮勪竴涓狥rameLayout
@@ -405,7 +421,7 @@
TextID = StringId.dangqianmenweiguan,
TextSize = TextSize.Text12,
TextColor = MusicColor.TextCancelColor,
- TextAlignment=TextAlignment.Center,
+ TextAlignment = TextAlignment.Center,
Gravity = Gravity.CenterHorizontal,
Name = "btnStateText"
};
@@ -492,6 +508,6 @@
}
-
+
}
--
Gitblit v1.8.0