From ea4b1f379fa052b1e044e1d67e85a8500cbd86ff Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 02 八月 2024 17:01:15 +0800 Subject: [PATCH] 可视对讲铃声功能 --- HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 48 +++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 41 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index d3a4868..160a3c9 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -1,13 +1,8 @@ 锘縰sing System; using System.Collections.Generic; -using System.Text; -using HDL_ON.DAL; -using HDL_ON.DAL.Server; -using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.UI.CSS; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using Other; using Shared; namespace HDL_ON.UI @@ -444,7 +439,7 @@ SelectedImagePath = "Collection/DefenseStatusIcon.png", UnSelectedImagePath = "Collection/DisarmStatusIcon.png" }; - if (DB_ResidenceData.Instance.GatewayType == 1) + if (DB_ResidenceData.Instance.GatewayType == 1 && !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { topView.AddChidren(btnSecurityStatus); @@ -502,6 +497,10 @@ UnSelectedImagePath = "Collection/MsgIcon.png", SelectedImagePath = "Collection/MsgIconTip.png", }; + if(btnSecurityStatus.Parent == null) + { + btnMsgIcon.X = Application.GetRealWidth(329); + } topView.AddChidren(btnMsgIcon); @@ -549,6 +548,41 @@ LoadContentView(); #endregion + +#if DEBUG + bool isPlay = false; + SoundPlayer soundPlayer = new SoundPlayer(); + btnResidenceName.MouseUpEventHandler = (envent, ee) => { + MainPage.Log("sss"); + +#if __ANDROID__ + //HDLLinphoneKit.Instance.MediaPlayerLooping(true); + Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.PlayRingtone(); +#elif __IOS__ + ScheduleLocalNotification ss = new ScheduleLocalNotification(); + ss.SetScheduleLocalNotification(); + + //if (isPlay) + //{ + // isPlay = false; + // soundPlayer.StopSound(); + //} + //else + //{ + // isPlay = true; + // soundPlayer.PlaySound(); + //} + +#endif + //PlaySystemRingtone playSystemRingtone = new PlaySystemRingtone(); + //playSystemRingtone.Play(); + //new System.Threading.Thread(async() => + //{ + // await Common.AliyunLog.AliyunLogClient.PostLogs("鍛婅娴嬭瘯", "娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅娴嬭瘯淇℃伅"); + //}) + //{ IsBackground = true }.Start(); + }; +#endif } catch (Exception ex) { -- Gitblit v1.8.0