From 4e95d87dec43de5f7e8bd6ef579053c1fb44414d Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期日, 22 九月 2024 22:09:54 +0800
Subject: [PATCH] 西墨可视对讲
---
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 46 +--------------
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs | 12 +++
HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs | 45 ++++++++++++--
HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs | 3
HDL_ON/UI/UI0-Public/TopViewDiv.cs | 25 --------
5 files changed, 53 insertions(+), 78 deletions(-)
diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
index 4898a28..02610db 100644
--- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -127,7 +127,17 @@
//鐧诲綍sip鏈嶅姟鍣�
#if __IOS__
- Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm,"UDP");
+ string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion;
+ System.Version currentVersion = new System.Version(systemVersion);
+ System.Version version17 = new System.Version(17, 0);
+ if (currentVersion.CompareTo(version17) > 0)
+ {
+ HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, "udp");
+ }
+ else
+ {
+ HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, DB_ResidenceData.Instance.linphoneConnectType.ToString());
+ }
#else
if (mInterphoneType == InterphoneType.FREEVIEW.ToString())
{
diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index a98c233..e20186f 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -228,31 +228,6 @@
};
}
- public void LoadTopView_Linphone()
- {
- LoadTopView();
-
- var btnSetting = new Button()
- {
- X = Application.GetRealWidth(337),
- Y = Application.GetRealHeight(28 + maginY),
- Width = Application.GetMinRealAverage(32),
- Height = Application.GetMinRealAverage(32),
- UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
- };
- contentView.AddChidren(btnSetting);
-
- btnSetting.MouseUpEventHandler = (sender, e) =>
- {
- var infoView = new FunctionBaseInfoSetPage();
- MainPage.BasePageView.AddChidren(infoView);
- infoView.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
- }
-
-
-
/// <summary>
/// 鎴块棿鏍囬鍖哄煙
/// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index dc884e4..0311623 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -53,12 +53,6 @@
actionRefresh = action;
}
- public FunctionBaseInfoSetPage()
- {
- bodyView = this;
-
- }
-
public override void RemoveFromParent()
{
new System.Threading.Thread(() =>
@@ -90,10 +84,10 @@
ScrollEnabled = false,
};
bodyView.AddChidren(contentView);
- //鍙瀵硅
- if(function == null)
- {
+ //鍙瀵硅
+ if (function.spk == SPK.LinphoneXiMo)
+ {
var linphoneConnectView = new FrameLayout()
{
Height = Application.GetRealHeight(55),
@@ -250,8 +244,6 @@
return;
}
-
-
#region name view
@@ -741,38 +733,6 @@
}
#endregion
-#if stage2
- #region 娣诲姞鍒版闈�
- var addToDesktopView = new FrameLayout()
- {
- Height = Application.GetRealHeight(55),
- BackgroundColor = CSS_Color.MainBackgroundColor,
- };
- contentView.AddChidren(addToDesktopView);
-
- var btnAddToDesktopText = new Button()
- {
- X = Application.GetRealWidth(16),
- Width = Application.GetRealWidth(160),
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = CSS_Color.FirstLevelTitleColor,
- TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.AddToDesktop,
- };
- addToDesktopView.AddChidren(btnAddToDesktopText);
-
- var btnAddToDesktopRight = new Button()
- {
- X = Application.GetRealWidth(339),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetMinRealAverage(16),
- Height = Application.GetMinRealAverage(16),
- UnSelectedImagePath = "Public/RightIcon.png",
- };
- addToDesktopView.AddChidren(btnAddToDesktopRight);
-
- #endregion
-#endif
if (function.spk == SPK.ElectricEnergy)
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs
index ec7cc75..a53e62b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/TopView.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Drawing.Printing;
+using HDL_ON.Entity;
using HDL_ON.UI.Music;
using Shared;
@@ -123,7 +124,7 @@
btnSetting.MouseUpEventHandler = (sender, e) =>
{
- var infoView = new FunctionBaseInfoSetPage();
+ var infoView = new FunctionBaseInfoSetPage(new Entity.Function() { spk = SPK.LinphoneXiMo }, () => { });
MainPage.BasePageView.AddChidren(infoView);
infoView.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
index 835a0ed..8597513 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Video/VideoMainView.cs
@@ -24,16 +24,45 @@
#region 甯冨眬鐣岄潰
this.BackgroundColor = MusicColor.ViewColor;
var topView = new TopView();
+ //this.AddChidren(topView.TopFLayoutView());
+
+
+
+#if __IOS__
+ // 鑾峰彇褰撳墠绯荤粺鐨勭増鏈彿
+ string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion;
+ // 灏嗙郴缁熺増鏈瓧绗︿覆杞崲涓� Version 瀵硅薄
+ System.Version currentVersion = new System.Version(systemVersion);
+ // 瀹氫箟 iOS 17 浣滀负姣旇緝鐨勭増鏈�
+ System.Version version17 = new System.Version(17, 0);
+ // 姣旇緝褰撳墠鐗堟湰鏄惁澶т簬 iOS 17
+ if (currentVersion.CompareTo(version17) > 0)
+ {
this.AddChidren(topView.TopFLayoutView());
- //if (xiMoVideoList.Count > 0)
- //{
- // this.AddChidren(topView.TopFLayoutView());
- //}
- //else
- //{
- // this.AddChidren(topView.TopFLayoutView2());
- //}
+ }
+ else
+ {
+ if (xiMoVideoList.Count > 0)
+ {
+ this.AddChidren(topView.TopFLayoutView2());
+ }
+ else
+ {
+ this.AddChidren(topView.TopFLayoutView());
+ }
+ topView.topNameBtn.TextID = StringId.keshiduijiang;
+ }
+#else
+ if (xiMoVideoList.Count > 0)
+ {
+ this.AddChidren(topView.TopFLayoutView2());
+ }
+ else
+ {
+ this.AddChidren(topView.TopFLayoutView());
+ }
topView.topNameBtn.TextID = StringId.keshiduijiang;
+#endif
var pageView = new PageLayout()
--
Gitblit v1.8.0