From f676a4c180fc54cc82eecbfcd24d32fe7d8581db Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 26 三月 2021 18:16:58 +0800
Subject: [PATCH] Merge branch 'CJL' into temp-wxr
---
DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll | 0
HDL-ON_iOS/ViewController.cs | 20 -
HDL-ON_Android/.DS_Store | 0
DLL/FL/Android/VideoLibs.dll | 0
DLL/FL/Android/videophone.dll | 0
HDL-ON_iOS/HDL-ON_iOS.csproj | 6
HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs | 20
DLL/FL/Android/http.dll | 0
HDL-ON_iOS/AppDelegate.cs | 118 +++---
HDL_ON/DAL/Mqtt/MqttClient.cs | 2
HDL_ON/HDL_ON.projitems | 2
DLL/FL/Android/crypt.dll | 0
/dev/null | 0
HDL_ON/DAL/Server/NewAPI.cs | 44 ++
HDL_ON/DAL/Server/NewApiRes.cs | 5
HDL_ON/Common/HDLCommon.cs | 78 +++-
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs | 169 ++++++++++
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs | 16
DLL/FL/Android/corelooper.dll | 0
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 445 +++++++++++++++++++++++++++
HDL_ON/UI/UI1-Login/LoginPage.cs | 9
DLL/FL/Android/cloudp2p.dll | 0
HDL-ON_Android/Other/JPush/JPushReceiver.cs | 8
23 files changed, 821 insertions(+), 121 deletions(-)
diff --git a/DLL/FL/Android/VideoLibs.dll b/DLL/FL/Android/VideoLibs.dll
new file mode 100644
index 0000000..c7532f0
--- /dev/null
+++ b/DLL/FL/Android/VideoLibs.dll
Binary files differ
diff --git a/DLL/FL/Android/cloudp2p.dll b/DLL/FL/Android/cloudp2p.dll
new file mode 100644
index 0000000..ba21133
--- /dev/null
+++ b/DLL/FL/Android/cloudp2p.dll
Binary files differ
diff --git a/DLL/FL/Android/corelooper.dll b/DLL/FL/Android/corelooper.dll
new file mode 100644
index 0000000..9e6f49c
--- /dev/null
+++ b/DLL/FL/Android/corelooper.dll
Binary files differ
diff --git a/DLL/FL/Android/crypt.dll b/DLL/FL/Android/crypt.dll
new file mode 100644
index 0000000..782c48b
--- /dev/null
+++ b/DLL/FL/Android/crypt.dll
Binary files differ
diff --git a/DLL/FL/Android/http.dll b/DLL/FL/Android/http.dll
new file mode 100644
index 0000000..7815c3a
--- /dev/null
+++ b/DLL/FL/Android/http.dll
Binary files differ
diff --git a/DLL/FL/Android/videophone.dll b/DLL/FL/Android/videophone.dll
new file mode 100644
index 0000000..f94cf42
--- /dev/null
+++ b/DLL/FL/Android/videophone.dll
Binary files differ
diff --git a/DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll b/DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll
new file mode 100644
index 0000000..7bda3d7
--- /dev/null
+++ b/DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll
Binary files differ
diff --git a/HDL-ON_Android/.DS_Store b/HDL-ON_Android/.DS_Store
index 58f9321..9a2b94c 100644
--- a/HDL-ON_Android/.DS_Store
+++ b/HDL-ON_Android/.DS_Store
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/.DS_Store b/HDL-ON_Android/Assets/Phone/.DS_Store
deleted file mode 100644
index 1875923..0000000
--- a/HDL-ON_Android/Assets/Phone/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index 48ee1fc..ccc38c0 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -57,14 +57,17 @@
if (jpushExpandData != null && jpushExpandData.messageType != null)
{
pushMes.messageType = jpushExpandData.messageType;
+ pushMes.expantContent = jpushExpandData.expantContent;
Utlis.WriteLine("PushMes messageType : " + pushMes.messageType);
}
Utlis.WriteLine("PushMes title : " + pushMes.Title);
Utlis.WriteLine("PushMes message : " + pushMes.Content);
Utlis.WriteLine("PushMes extras : " + pushMes.Extras);
-
- HDLCommon.Current.AdjustPushMessage(pushMes);
+ Shared.Application.RunOnMainThread(() =>
+ {
+ HDLCommon.Current.AdjustPushMessage(pushMes);
+ });
}
/// <summary>
@@ -157,6 +160,7 @@
if (jpushExpandData != null && jpushExpandData.messageType != null)
{
pushMes.messageType = jpushExpandData.messageType;
+ pushMes.expantContent = jpushExpandData.expantContent;
Utlis.WriteLine("PushMes messageType : " + pushMes.messageType);
}
diff --git a/HDL-ON_Android/libs/.DS_Store b/HDL-ON_Android/libs/.DS_Store
deleted file mode 100644
index ae45fc3..0000000
--- a/HDL-ON_Android/libs/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 0efe330..99caa0e 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -132,6 +132,8 @@
}
Console.WriteLine(userInfo);
+ //HDLCommon.Current.ShowAlert("DidReceiveRemoteNotification:" + userInfo.ToString());
+
if (application.ApplicationState == UIApplicationState.Active || application.ApplicationState == UIApplicationState.Background)
{
@@ -215,17 +217,44 @@
}
+ /// <summary>
+ /// 璁剧疆褰撳墠浣跨敤璇█
+ /// </summary>
+ void SetCurrentLanguage()
+ {
+ if (string.IsNullOrEmpty(OnAppConfig.Instance.SetLanguage))
+ {
+ if (NSLocale.PreferredLanguages[0].Contains("zh-"))
+ {
+ Language.CurrentLanguage = "Chinese";
+ }
+ else if (NSLocale.PreferredLanguages[0].Contains("cs-"))
+ {
+ Language.CurrentLanguage = "Czech";
+ }
+ else
+ {
+ Language.CurrentLanguage = "English";
+ }
+ }
+ else
+ {
+ Language.CurrentLanguage = OnAppConfig.Instance.SetLanguage;
+ }
+ }
+
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
+ SetCurrentLanguage();
//Shared.Application.FontSize = 12;
//Bugly.Bugly.StartWithAppId("b58fb35436");
-
//鍙栨秷EditText榛樿瀵嗙爜杈撳叆鏂瑰紡
//Shared.Application.IsEditTextContentTypePassword = false;
//榛樿浣跨敤鑻规柟瀛椾綋
Shared.Application.IsUsePingFang = true;
//淇濇寔灞忓箷甯镐寒鎴栬�呰嚜鍔ㄩ攣灞�
application.IdleTimerDisabled = false;
+ base.FinishedLaunching(application, launchOptions);
Window = new UIWindow(UIScreen.MainScreen.Bounds);
rootViewController = new UINavigationController(new ViewController()) { NavigationBarHidden = true };
@@ -234,59 +263,19 @@
AppCenter.Start("e1add75a-82c6-4a5c-a902-4705b195748e", typeof(Analytics), typeof(Crashes));
- base.FinishedLaunching(application, launchOptions);
-
SharedMethod.SharedMethod.sharedApp = application;
//NSString* nsCount = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode];
application.StatusBarStyle = UIStatusBarStyle.DarkContent;
-
- //string nsCount = NSLocale.CurrentLocale.CountryCode;
-
- //if ( UserInfo.Current != null && nsCount != UserInfo.Current.areaCode.ToString())
- //{
- // //int.TryParse(nsCount,out UserInfo.Current.areaCode);
- // //2020-11-18
- // UserInfo.Current.areaCode = nsCount;
- // OnAppConfig.Instance.SaveUserConfig();
- //}
-
-
- application.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound);
-
//window.AccessibilityNavigationStyle = UIAccessibilityNavigationStyle.Automatic;
// check for a notification
DealWithPushMes(launchOptions);
-
- if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
- {
- var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null);
- application.RegisterUserNotificationSettings(notificationSettings);
- application.RegisterForRemoteNotifications();
- }
- else
- {
- //==== register for remote notifications and get the device token
- // set what kind of notification types we want
- UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge;
- // register for remote notifications
- UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes);
- }
- if (UIApplication.SharedApplication.ApplicationIconBadgeNumber > 0)
- {
- //RemoteInfo.Current.ReadMsgList(true);
- }
-
- //Harpy.Harpy.SharedInstance.PresentingViewController = this.Window.RootViewController;
- //Harpy.Harpy.SharedInstance.WeakDelegate = this;
- //Harpy.Harpy.SharedInstance.AlertType = Harpy.HarpyAlertType.Skip;
- //Harpy.Harpy.SharedInstance.DebugEnabled = false;
- //Harpy.Harpy.SharedInstance.ForceLanguageLocalization = Harpy.Constants.HarpyLanguageChineseSimplified;
-
+ //if (UIApplication.SharedApplication.ApplicationIconBadgeNumber > 0)
+ //{
+ // //RemoteInfo.Current.ReadMsgList(true);
+ //}
//涓枃鍥藉唴key銆佽嫳鏂囨捣澶杒ey
EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
-
-
Console.WriteLine("FinishedLaunching");
return true;
}
@@ -306,6 +295,7 @@
var title = alert["title"] as NSString;
var expandData = "";
var messageType = "";
+ var expantContent = "";
if (userInfo.ContainsKey(new NSString("expandData")))
{
var expandDataStr = userInfo["expandData"] as NSString;
@@ -317,9 +307,15 @@
expandData = expandDataNSD.ToString();
if(expandDataNSD.ContainsKey(new NSString("messageType"))){
messageType = expandDataNSD["messageType"] as NSString;
- Utlis.WriteLine("messageType: "+ messageType);
+ Utlis.WriteLine("messageType: " + messageType);
}
-
+
+ if (expandDataNSD.ContainsKey(new NSString("expantContent")))
+ {
+ expantContent = expandDataNSD["expantContent"] as NSString;
+ Utlis.WriteLine("expantContent: " + expantContent);
+ }
+
}
}
else
@@ -333,7 +329,8 @@
Title = title,
Content = body,
Extras = expandData,
- messageType = messageType
+ messageType = messageType,
+ expantContent = expantContent
};
Utlis.WriteLine("PushMes title : " + pushMes.Title);
Utlis.WriteLine("PushMes message : " + pushMes.Content);
@@ -341,14 +338,21 @@
if (bFinishedLaunching)
{
- if (pushMes.Extras != null && pushMes.Extras.Contains("OffLine"))
+ if (pushMes.Extras != null)
{
- //haveToSignOut = true;
- //寮哄埗涓嬬嚎
- UserInfo.Current.LastTime = DateTime.MinValue;
- UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//閲嶇疆鐢ㄦ埛澶村儚
- UserInfo.Current.SaveUserInfo();
- HDLCommon.Current.ShowAlert(Language.StringByID(StringId.LoggedOnOtherDevices));
+ if (pushMes.Extras.Contains("OffLine"))
+ {
+ //haveToSignOut = true;
+ //寮哄埗涓嬬嚎
+ UserInfo.Current.LastTime = DateTime.MinValue;
+ UserInfo.Current.headImagePagePath = "LoginIcon/2.png";//閲嶇疆鐢ㄦ埛澶村儚
+ UserInfo.Current.SaveUserInfo();
+ HDLCommon.Current.ShowAlert(Language.StringByID(StringId.LoggedOnOtherDevices));
+ }
+ else
+ {
+ HDLCommon.Current.AdjustPushMessage(pushMes);
+ }
}
}
else
@@ -360,7 +364,7 @@
}
catch
{
-
+ //HDLCommon.Current.ShowAlert("catch2222");
}
}
@@ -384,7 +388,7 @@
if (userInfo != null)
{
- HandleNotificationMessageUserInfo(userInfo, true);
+ //HandleNotificationMessageUserInfo(userInfo, true);
}
}
diff --git a/HDL-ON_iOS/Assets.xcassets/.DS_Store b/HDL-ON_iOS/Assets.xcassets/.DS_Store
deleted file mode 100644
index aa203c0..0000000
--- a/HDL-ON_iOS/Assets.xcassets/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/.DS_Store b/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
--- a/HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index c9fb05f..e8ec69f 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -54,7 +54,7 @@
<MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs>
<MtouchEnableSGenConc>false</MtouchEnableSGenConc>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
-<CodesignProvision>ComHdlOnProDevelopment20210305-1</CodesignProvision>
+<CodesignProvision>ComHdlOnProDevelopment20210225-1</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
@@ -91,6 +91,9 @@
</Reference>
<Reference Include="EZSDK.IOS">
<HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath>
+ </Reference>
+ <Reference Include="Shared.IOS.ESVideoOnSDK">
+ <HintPath>..\DLL\FL\iOS\Shared.IOS.ESVideoOnSDK.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -470,7 +473,6 @@
<Compile Include="ZXingOverlayView.cs" />
<Compile Include="Other\JLCountrycode.cs" />
<Compile Include="BlueWifi.cs" />
- <Compile Include="Other\ESVideo.cs" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Phone\LoginIcon\ShowPasswordIcon.png" />
diff --git a/HDL-ON_iOS/Other/ESVideo.cs b/HDL-ON_iOS/Other/ESVideo.cs
deleted file mode 100644
index 4dffcef..0000000
--- a/HDL-ON_iOS/Other/ESVideo.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-锘�//using System;
-//using Shared.IOS.ESVideoPhoneSDK;
-
-//namespace Shared
-//{
-// public static class ESVideo
-// {
-// //public ESVideo()
-// //{
-
-// //}
-
-// public static void InitESVideoSDK()
-// {
-// ESVideo.InitESVideoSDK();
-// }
-
-// /// <summary>
-// /// 鐩戞帶椤甸潰
-// /// </summary>
-// /// <param name="mESVideoInfo"></param>
-// public static void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
-// {
-// ESVideoMonitorViewController mESVideoMonitorViewController = new ESVideoMonitorViewController();
-
-// mESVideoMonitorViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
-// mESVideoMonitorViewController.MESRoomID = mESVideoInfo.ESRoomID;
-// mESVideoMonitorViewController.DeviceName = mESVideoInfo.DeviceName;
-// mESVideoMonitorViewController.RoomName = mESVideoInfo.RoomName;
-// mESVideoMonitorViewController.IsCollect = mESVideoInfo.IsCollect;
-
-// Shared.Application.currentVC.NavigationController.PushViewController(mESVideoMonitorViewController, true);
-// }
-
-
-
-// /// <summary>
-// /// 琚懠鍙〉闈�
-// /// </summary>
-// /// <param name="mESVideoInfo"></param>
-// public static void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
-// {
-// ESvideoVideoIntercomViewController mESvideoVideoIntercomViewController = new ESvideoVideoIntercomViewController();
-// mESvideoVideoIntercomViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
-// mESvideoVideoIntercomViewController.MESRoomID = mESVideoInfo.ESRoomID;
-// mESvideoVideoIntercomViewController.DeviceName = mESVideoInfo.DeviceName;
-// mESvideoVideoIntercomViewController.RoomName = mESVideoInfo.RoomName;
-// mESvideoVideoIntercomViewController.IsCollect = mESVideoInfo.IsCollect;
-
-// Shared.Application.currentVC.NavigationController.PushViewController(mESvideoVideoIntercomViewController, true);
-// }
-// }
-
-// public class ESVideoInfo
-// {
-// /// <summary>
-// /// 瀹ゅ鏈虹殑UUID
-// /// 渚嬶細JJY000007FSEYX
-// /// </summary>
-// public string ESVideoUUID=string.Empty;
-// /// <summary>
-// /// 褰撳墠鐢ㄦ埛鐨勬埧闂碔D
-// /// 渚嬶細0801
-// /// </summary>
-// public int ESRoomID;
-// /// <summary>
-// /// 瀹ゅ鏈虹殑鍚嶇О
-// /// 渚嬶細瀹ゅ鏈�
-// /// </summary>
-// public string DeviceName = string.Empty;
-// /// <summary>
-// /// 鎴块棿鍛藉悕
-// /// 渚嬶細8鏍�1鍗曞厓0801
-// /// </summary>
-// public string RoomName = string.Empty;
-// /// <summary>
-// /// 鏄惁鏀惰棌
-// /// </summary>
-// public bool IsCollect;
-
-// }
-
-
-//}
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/.DS_Store b/HDL-ON_iOS/Resources/Phone/FunctionIcon/.DS_Store
deleted file mode 100644
index 04233c5..0000000
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
deleted file mode 100644
index 76483dd..0000000
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs
index 72d80b7..05c71bf 100644
--- a/HDL-ON_iOS/ViewController.cs
+++ b/HDL-ON_iOS/ViewController.cs
@@ -26,26 +26,6 @@
{
base.ViewDidLoad();
-
- if (string.IsNullOrEmpty(OnAppConfig.Instance.SetLanguage))
- {
- if (NSLocale.PreferredLanguages[0].Contains("zh-"))
- {
- Language.CurrentLanguage = "Chinese";
- }
- else if (NSLocale.PreferredLanguages[0].Contains("cs-"))
- {
- Language.CurrentLanguage = "Czech";
- }
- else
- {
- Language.CurrentLanguage = "English";
- }
- }
- else
- {
- Language.CurrentLanguage = OnAppConfig.Instance.SetLanguage;
- }
HDL_ON.MainPage.Show();
try
diff --git a/HDL_ON/.DS_Store b/HDL_ON/.DS_Store
deleted file mode 100644
index b92307c..0000000
--- a/HDL_ON/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 70b5864..6ab29de 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -248,44 +248,82 @@
#region 鈻� 鎺ㄩ�佸鐞哶______________________
/// <summary>
/// 鎺ㄩ�佹秷鎭鐞�
+ /// 娉ㄦ剰锛欰ndroid瑕佸湪涓荤嚎绋嬶紙UI绾跨▼锛夋墽琛�
/// </summary>
/// <param name="jpushMessageInfo"></param>
public void AdjustPushMessage(JPushMessageInfo jpushMessageInfo)
{
try
{
- if (jpushMessageInfo.Extras != null && jpushMessageInfo.Extras.Contains("OffLine"))
- {
- Shared.Application.RunOnMainThread(() =>
- {
- ////璐﹀彿鍦ㄥ埆澶勭櫥闄嗭紝琚涪涓嬬嚎 璺宠浆鍒扮櫥褰曢〉闈�
- //new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
- //閫�鍑虹櫥褰曟搷浣�
- CheckLogout();
+ //Extras涓虹┖涓嶅鐞�
+ if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return;
- });
- return;
+ if (jpushMessageInfo.Extras.Contains(PushMessageType.OffLine.ToString()))
+ {
+ CheckLogout();
}
else
{
- Shared.Application.RunOnMainThread(() =>
+ GetPushMessageAction?.Invoke();
+
+ //messageType涓虹┖涓嶅鐞�
+ if (string.IsNullOrEmpty(jpushMessageInfo.messageType)) return;
+
+ //鎶ヨ鎺ㄩ�佹墠寮圭獥鎻愮ず锛坢essageType鍖呭惈Alarm鍏抽敭瀛楃殑锛�
+ if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString()))
{
- GetPushMessageAction?.Invoke();
- //鎶ヨ鎺ㄩ�佹墠寮圭獥鎻愮ず锛坢essageType鍖呭惈Alarm鍏抽敭瀛楃殑锛�
- if (jpushMessageInfo.messageType != null && jpushMessageInfo.messageType.Contains("Alarm"))
+ //鎶ヨ鎺ㄩ�佸脊绐楁彁绀�
+ ShowAlarmPushMessage(jpushMessageInfo);
+ }
+ else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString()))
+ {
+ if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
+
+ ESVideoInfo eSVideoInfo = GetESOnVideoJson(jpushMessageInfo.expantContent);
+
+ if (eSVideoInfo == null) return;
+
+ if (string.IsNullOrEmpty(eSVideoInfo.uuid)) return;
+
+ if (eSVideoInfo.uuid.Contains(","))
{
- //鎶ヨ鎺ㄩ�佸脊绐楁彁绀�
- ShowAlarmPushMessage(jpushMessageInfo);
- //new Alert(jpushMessageInfo.Title, jpushMessageInfo.Content, Language.StringByID(StringId.Close)).Show();
+ var uuid = eSVideoInfo.uuid.Split(',');
+ eSVideoInfo.ESVideoUUID = uuid[0];
+ }
+ else
+ {
+ eSVideoInfo.ESVideoUUID = eSVideoInfo.uuid;
}
- });
- return;
+ ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo);
+
+ }
}
+ }
+ catch(Exception EX)
+ {
+ Utlis.WriteLine("catch: " + EX.ToString());
+ }
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="jsonStr"></param>
+ /// <returns></returns>
+ ESVideoInfo GetESOnVideoJson(string jsonStr)
+ {
+ try
+ {
+ if (!string.IsNullOrEmpty(jsonStr))
+ {
+ return Newtonsoft.Json.JsonConvert.DeserializeObject<ESVideoInfo>(jsonStr);
+ }
+ return null;
}
catch
{
-
+ return null;
}
}
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 4a58025..13fbff6 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -287,7 +287,7 @@
try
{
var topic = e.ApplicationMessage.Topic;
- MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
+ //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
//涓�绔彛涓婚澶勭悊
if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
{
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index e016870..a77318d 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -532,7 +532,51 @@
public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
+ /// <summary>
+ /// 绾㈠瀹�/閬ユ帶鍣ㄥ垹闄�
+ /// </summary>
+ public const string API_POST_Ir_DeviceDel= "/home-wisdom/app/device/remove";
+ /// <summary>
+ /// 淇敼绾㈠瀹濆悕绉�
+ /// </summary>
+ public const string API_POST_Ir_DeviceRename = "/home-wisdom/app/device/rename";
+
+ #endregion
+
+ #region 鈻� -- 涓版灄鐩稿叧鐩稿叧鎺ュ彛___________________________
+ /// <summary>
+ /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋楋紝骞惰幏鍙栭棬鍙f満鍒楄〃
+ /// </summary>
+ public const string API_POST_FL_Check = "/home-wisdom/app/fl/vi/check";
+ /// <summary>
+ /// 鎺ュ惉
+ /// </summary>
+ public const string API_POST_FL_Answer = "/home-wisdom/app/fl/vi/answer";
+ /// <summary>
+ /// 鎷掓帴
+ /// </summary>
+ public const string API_POST_FL_Reject = "/home-wisdom/app/fl/vi/reject";
+ /// <summary>
+ /// 寮�閿佹垚鍔�
+ /// </summary>
+ public const string API_POST_FL_Unlock= "/home-wisdom/app/fl/vi/unlock";
+ /// <summary>
+ /// 閫氳瘽瑙嗛鎴浘涓婁紶
+ /// </summary>
+ public const string API_POST_FL_Screenshot = "/home-wisdom/app/fl/vi/screenshot";
+ /// <summary>
+ /// 鎸傛柇
+ /// </summary>
+ public const string API_POST_FL_HangUp = "/home-wisdom/app/fl/vi/hang-up";
+ /// <summary>
+ /// 鑾峰彇閫氳瘽璁板綍
+ /// </summary>
+ public const string API_POST_FL_GetCallList = "/home-wisdom/app/fl/vi/list";
+ /// <summary>
+ /// 鍒犻櫎閫氳瘽璁板綍
+ /// </summary>
+ public const string API_POST_FL_DeleteCallInfo = "/home-wisdom/app/fl/vi/delete";
#endregion
diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs
index e30c1fb..c23dac9 100644
--- a/HDL_ON/DAL/Server/NewApiRes.cs
+++ b/HDL_ON/DAL/Server/NewApiRes.cs
@@ -1434,6 +1434,11 @@
/// 淇℃伅绫诲瀷
/// </summary>
public string messageType = "";
+ /// <summary>
+ /// 鎵╁睍鏁版嵁鍐呭
+ /// </summary>
+ public string expantContent = "";
+
}
diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
new file mode 100644
index 0000000..6b310f0
--- /dev/null
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -0,0 +1,445 @@
+锘縰sing System;
+using HDL_ON;
+using HDL_ON.DAL.Server;
+using System.Threading;
+using System.Collections.Generic;
+
+#if __IOS__
+using Shared.IOS.ESVideoOnSDK;
+using UIKit;
+using Foundation;
+#else
+
+using Android.Content;
+
+#endif
+
+namespace Shared
+{
+ /// <summary>
+ /// 涓版灄鍙瀵硅
+ /// </summary>
+ public class ESOnVideo
+ {
+ /// <summary>
+ ///
+ /// </summary>
+ private static ESOnVideo m_Current = null;
+ /// <summary>
+ ///
+ /// </summary>
+ public static ESOnVideo Current
+ {
+ get
+ {
+ if (m_Current == null)
+ {
+ m_Current = new ESOnVideo();
+ }
+ return m_Current;
+ }
+ }
+
+ /// <summary>
+ /// 闂ㄥ彛鏈恒�佷赴鏋楀皬鍖轰俊鎭拰鎴块棿淇℃伅绛夊弬鏁�
+ /// </summary>
+ public ESVideoInfo esVideoInfo;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public void InitESVideoSDK()
+ {
+ //ESVideo.
+ }
+
+ /// <summary>
+ /// 鐩戞帶椤甸潰
+ /// </summary>
+ /// <param name="mESVideoInfo"></param>
+ public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
+ {
+ this.esVideoInfo = mESVideoInfo;
+
+#if __IOS__
+ ESOnMonitorViewController vc = new ESOnMonitorViewController();
+ vc.MESVideoID = mESVideoInfo.ESVideoUUID;
+ //vc.MESRoomID = mESVideoInfo.ESRoomID;
+ vc.DeviceName = mESVideoInfo.DeviceName;
+ //vc.RoomName = mESVideoInfo.RoomName;
+ vc.MESCallDelegate = new OnESCallDelegate(this);
+ Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+#else
+
+ Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+ intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+ intent.PutExtra("uuid", mESVideoInfo.uuid);
+ intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+ intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+ intent.PutExtra("roomno", mESVideoInfo.roomno);
+ intent.PutExtra("unitno", mESVideoInfo.unitno);
+ intent.PutExtra("HomeID", mESVideoInfo.HomeID);
+ intent.PutExtra("callId", mESVideoInfo.callId);
+ intent.PutExtra("Type", 0);
+ Shared.Application.Activity.StartActivity(intent);
+
+#endif
+ }
+
+
+
+ /// <summary>
+ /// 琚懠鍙〉闈�
+ /// </summary>
+ /// <param name="mESVideoInfo"></param>
+ public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
+ {
+ this.esVideoInfo = mESVideoInfo;
+#if __IOS__
+ ESOnIntercomViewController vc = new ESOnIntercomViewController();
+ vc.MESVideoID = mESVideoInfo.ESVideoUUID;
+ //vc.MESRoomID = mESVideoInfo.ESRoomID;
+ vc.DeviceName = mESVideoInfo.DeviceName;
+ //vc.RoomName = mESVideoInfo.RoomName;
+ //vc.MESCallDelegate = new OnESCallDelegate(this);
+ mOnESCallDelegate = new OnESCallDelegate(this);
+ vc.MESCallDelegate = mOnESCallDelegate;
+ Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+#else
+
+ Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+ intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+ intent.PutExtra("uuid", mESVideoInfo.uuid);
+ intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+ intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+ intent.PutExtra("roomno", mESVideoInfo.roomno);
+ intent.PutExtra("unitno", mESVideoInfo.unitno);
+ intent.PutExtra("HomeID", mESVideoInfo.HomeID);
+ intent.PutExtra("callId", mESVideoInfo.callId);
+ intent.PutExtra("Type", 1);
+ Shared.Application.Activity.StartActivity(intent);
+
+#endif
+ }
+
+ #region 鍔ㄤ綔鍥炶皟锛屾彁浜よ褰曞埌浜戠
+
+ /// <summary>
+ /// 鍒ゆ柇callId鏄惁涓虹┖
+ /// </summary>
+ /// <returns></returns>
+ bool CheckESVideoInfoIsNullOrEmpty()
+ {
+ return (esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId));
+ }
+
+ /// <summary>
+ /// 鎺ュ惉
+ /// </summary>
+ void AnswerAction()
+ {
+ //Utlis.WriteLine("AnswerAction");
+
+ if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ new Thread(() =>
+ {
+ var requestJson = HttpUtil.GetSignRequestJson(esVideoInfo);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Answer, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ //Utlis.WriteLine("POST 鎺ュ惉鎴愬姛");
+ }
+ else
+ {
+ Utlis.WriteLine("POST 鎺ュ惉澶辫触 code: " + revertObj.Code);
+ }
+
+ })
+ { IsBackground = false }.Start();
+
+ }
+
+ /// <summary>
+ /// 鎸傛柇
+ /// </summary>
+ /// <param name="callDuration"></param>
+ void HangUpAction(int callDuration)
+ {
+ //Utlis.WriteLine("HangUpAction :" + callDuration);
+
+ if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ new Thread(() =>
+ {
+ Dictionary<string, object> dic = new Dictionary<string, object>();
+ dic.Add("callId", esVideoInfo.callId);
+ dic.Add("callDuration", callDuration);
+
+ var requestJson = HttpUtil.GetSignRequestJson(dic);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_HangUp, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ //Utlis.WriteLine("POST 鎸傛柇鎴愬姛");
+ }
+ else
+ {
+ Utlis.WriteLine("POST 鎸傛柇澶辫触 code: "+ revertObj.Code);
+ }
+
+ })
+ { IsBackground = false }.Start();
+ }
+
+ /// <summary>
+ /// 鎷掓帴
+ /// </summary>
+ void RejectCallAction()
+ {
+ //Utlis.WriteLine("RejectCallAction");
+
+ if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ new Thread(() =>
+ {
+ Dictionary<string, object> dic = new Dictionary<string, object>();
+ dic.Add("callId", esVideoInfo.callId);
+
+ var requestJson = HttpUtil.GetSignRequestJson(dic);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Reject, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ //Utlis.WriteLine("POST 鎷掓帴鎴愬姛");
+ }
+ else
+ {
+ Utlis.WriteLine("POST 鎷掓帴澶辫触 code: " + revertObj.Code);
+ }
+
+ })
+ { IsBackground = false }.Start();
+ }
+
+ /// <summary>
+ /// 鎴浘鎴愬姛
+ /// </summary>
+ void ScreenshotSuccessfulAction(byte[] dataBytes)
+ {
+ //Utlis.WriteLine("ScreenshotSuccessfulAction");
+
+ if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ new Thread(() =>
+ {
+ //var imageName = Guid.NewGuid().ToString();
+ Dictionary<string, object> dic = new Dictionary<string, object>();
+ dic.Add("callId", esVideoInfo.callId);
+ dic.Add("images", dataBytes);
+#if __IOS__
+ dic.Add("imagesName", "_IOS.jpg");
+#else
+ dic.Add("imagesName", "_Android.jpg");
+#endif
+
+ var requestJson = HttpUtil.GetSignRequestJson(dic);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Screenshot, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ //Utlis.WriteLine("POST 鎴浘涓婁紶鎴愬姛");
+ }
+ else
+ {
+ Utlis.WriteLine("POST 鎴浘涓婁紶澶辫触 code: " + revertObj.Code);
+ }
+
+ })
+ { IsBackground = false }.Start();
+
+ }
+
+ DateTime UnlockDateTime = DateTime.MinValue;
+ /// <summary>
+ /// 寮�閿佹垚鍔�
+ /// </summary>
+ void UnlockAction()
+ {
+ //Utlis.WriteLine("UnlockAction");
+
+ if (CheckESVideoInfoIsNullOrEmpty()) return;
+
+ //3S鍐呬笉鍏佽瑙﹀彂绗簩娆�
+ if(UnlockDateTime.AddSeconds(3) > DateTime.Now)
+ {
+
+ Utlis.WriteLine("3S鍐呬笉鍏佽瑙﹀彂绗簩娆�");
+ //涓版灄SDKbug锛屽懠鍙殑鏃跺�欏紑閿佹垚鍔熶細鏈�2娆″洖璋冿紝
+ return;
+ }
+
+ UnlockDateTime = DateTime.Now;
+
+ new Thread(() =>
+ {
+ Dictionary<string, object> dic = new Dictionary<string, object>();
+ dic.Add("callId", esVideoInfo.callId);
+
+ var requestJson = HttpUtil.GetSignRequestJson(dic);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Unlock, requestJson);
+ if (revertObj.Code == StateCode.SUCCESS)
+ {
+ //Utlis.WriteLine("POST 寮�閿佹垚鍔�");
+ }
+ else
+ {
+ Utlis.WriteLine("POST 寮�閿佸け璐� code: " + revertObj.Code);
+ }
+
+ })
+ { IsBackground = false }.Start();
+ }
+
+#endregion
+
+#if __IOS__
+#region OnESCallDelegate
+ /////// <summary>
+ /////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢
+ /////// </summary>
+ OnESCallDelegate mOnESCallDelegate;
+
+ /// <summary>
+ ///
+ /// </summary>
+ public class OnESCallDelegate : ESCallDelegate
+ {
+
+ [Weak] ESOnVideo _ESOnVideo;
+
+ public OnESCallDelegate(ESOnVideo mESOnVideo)
+ {
+ _ESOnVideo = mESOnVideo;
+ }
+
+ /// <summary>
+ /// 鎺ュ惉
+ /// </summary>
+ public override void OnAnswerAction()
+ {
+ _ESOnVideo.AnswerAction();
+ }
+
+ /// <summary>
+ /// 鎸傛柇
+ /// </summary>
+ /// <param name="callDuration"></param>
+ public override void OnHangUpAction(int callDuration)
+ {
+ _ESOnVideo.HangUpAction(callDuration);
+ }
+
+ /// <summary>
+ /// 鎷掓帴
+ /// </summary>
+ public override void OnRejectCallAction()
+ {
+ _ESOnVideo.RejectCallAction();
+ }
+
+ /// <summary>
+ /// 鎴浘鎴愬姛
+ /// </summary>
+ /// <param name="image"></param>
+ public override void OnScreenshotSuccessfulAction(UIImage image)
+ {
+ //NSData imageData = UIImagePNGRepresentation(image); UIImage
+ NSData imageData = image.AsPNG();
+ byte[] dataBytes = new byte[imageData.Length];
+ System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length));
+ //image.g
+ _ESOnVideo.ScreenshotSuccessfulAction(dataBytes);
+ }
+
+ /// <summary>
+ /// 寮�閿佹垚鍔�
+ /// </summary>
+ public override void OnUnlockAction()
+ {
+ _ESOnVideo.UnlockAction();
+ }
+
+ }
+
+#endregion
+#endif
+
+ /// <summary>
+ /// 娴嬭瘯鏂规硶
+ /// </summary>
+ /// <param name="isMonitor"></param>
+ public void Test(bool isMonitor = true)
+ {
+ ESVideoInfo eSVideoInfo = new ESVideoInfo()
+ {
+ DeviceName = "瀹ゅ鏈�88",
+ ESVideoUUID = "JJY000019VPLLF",
+
+ };
+ if (isMonitor)
+ {
+ ShowESVideoMonitor(eSVideoInfo);
+ }
+ else
+ {
+ eSVideoInfo.callId = "88888";
+ ShowESvideoVideoIntercom(eSVideoInfo);
+ }
+
+ }
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ public class ESVideoInfo
+ {
+ /// <summary>
+ /// 瀹ゅ鏈虹殑UUID
+ /// 渚嬶細JJY000007FSEYX
+ /// </summary>
+ public string ESVideoUUID = string.Empty;
+ /// <summary>
+ /// 瀹ゅ鏈虹殑鍚嶇О
+ /// 渚嬶細瀹ゅ鏈�
+ /// </summary>
+ public string DeviceName = "瀹ゅ鏈�";
+ /// <summary>
+ /// 涓版灄璇锋眰鐨勫敮涓�id
+ /// </summary>
+ public string uuid;
+ /// <summary>
+ /// 涓版灄绀惧尯id
+ /// </summary>
+ public string cmtID;
+ /// <summary>
+ /// 涓版灄鎴块棿鍙�
+ /// </summary>
+ public string roomno;
+ /// <summary>
+ /// 涓版灄妤兼爧鍙�
+ /// </summary>
+ public string unitno;
+ ///// <summary>
+ ///// 涓版灄浣忓畢Id
+ ///// </summary>
+ //public string HomeID;
+ /// <summary>
+ /// 鍛煎彨璁板綍Id
+ /// </summary>
+ public string callId;
+
+ }
+
+
+
+
+}
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 530060b..a9e358b 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -391,6 +391,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\Send.cs" />
<Compile Include="$(MSBuildThisFileDirectory)FengLinVideo\ESOnVideo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)DAL\" />
@@ -433,5 +434,6 @@
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\View\" />
<Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\" />
+ <Folder Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/HDL_ON/UI/.DS_Store b/HDL_ON/UI/.DS_Store
deleted file mode 100644
index aa35eb6..0000000
--- a/HDL_ON/UI/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 5de3a2d..1ddf012 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -185,10 +185,17 @@
};
bodyView.AddChidren(btnIcon_bg);
- #if DEBUG
+#if DEBUG
+ btnIcon_bg.MouseUpEventHandler += (sender, e) =>
+ {
+ //ESOnVideo.Current.Test();
+ };
+
bool b = false;
btnIcon.MouseUpEventHandler += (sender, e) =>
{
+ //ESOnVideo.Current.Test(false);
+
//return;
if (b)
{
diff --git a/HDL_ON/UI/UI2/.DS_Store b/HDL_ON/UI/UI2/.DS_Store
deleted file mode 100644
index 1f6e40e..0000000
--- a/HDL_ON/UI/UI2/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/.DS_Store b/HDL_ON/UI/UI2/3-Intelligence/Automation/.DS_Store
deleted file mode 100644
index b2074c1..0000000
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
index fa1831f..0b26a18 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -72,15 +72,15 @@
bodyView.AddChidren(btnOnTitle);
#if DEBUG
- //btnOnIcon.MouseUpEventHandler += (sender, e) =>
- //{
- // ESOnVideo.Current.Test();
- //};
+ btnOnIcon.MouseUpEventHandler += (sender, e) =>
+ {
+ ESOnVideo.Current.Test();
+ };
- //btnOnTitle.MouseUpEventHandler += (sender, e) =>
- //{
- // ESOnVideo.Current.Test(false);
- //};
+ btnOnTitle.MouseUpEventHandler += (sender, e) =>
+ {
+ ESOnVideo.Current.Test(false);
+ };
#endif
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
index 7a96fac..5c6cd7a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -265,16 +265,16 @@
page.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
//鑾峰彇鍒楄〃
- //HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () =>
- //{
- // Application.RunOnMainThread(() =>
- // {
- // var page = new UI2.PersonalCenter.PirDevice.PirMain();
- // MainPage.BasePageView.AddChidren(page);
- // page.Show();
- // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- // });
- //});
+ HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.GetPirDeviceList(this, () =>
+ {
+ Application.RunOnMainThread(() =>
+ {
+ var page = new UI2.PersonalCenter.PirDevice.PirMain();
+ MainPage.BasePageView.AddChidren(page);
+ page.Show();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ });
+ });
};
btnResidenceAddFunctionIcon.MouseUpEventHandler = eventHandler;
btnResidenceAddFunctionText.MouseUpEventHandler = eventHandler;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
index e05fc9a..981952e 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Text;
using HDL_ON.Entity;
using HDL_ON.UI.UI2.Intelligence.Automation.LogicView;
using Shared;
@@ -149,6 +150,174 @@
UIView(vv);
}
+
+ void GoToShowSortSelection(List<string> dataList)
+ {
+ Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>();
+
+ foreach (var data in dataList)
+ {
+ //鎻愬彇瀛楃涓茬涓�浣�
+ //string s = data.Substring(0, 1);
+ var key = GetCharSpellCode(data);
+
+ if (dict.ContainsKey(key))
+ {
+ var value = dict[key];
+ if (value == null)
+ {
+ value = new List<string>();
+ }
+ value.Add(data);
+
+
+ }
+ else
+ {
+ var value = new List<string>();
+ value.Add(data);
+ dict.Add(key, value);
+ }
+
+
+ }
+
+
+ Application.RunOnMainThread(() =>
+ {
+ JLCountrycode.CountryCodeView.Current.ShowSortSelection("閫夋嫨绾㈠鍝佺墝", dict, (countryName) =>
+ {
+ //Console.WriteLine("countryName: " + countryName);
+ Utlis.ShowTip("閫変腑浜�:" + countryName);
+
+
+ });
+ });
+ }
+
+ /// <summary>
+ /// 鑾峰彇姹夊瓧棣栧瓧姣�
+ /// </summary>
+ /// <param name="textValue"></param>
+ /// <returns></returns>
+ private string GetCharSpellCode(string textValue)
+ {
+ long iCnChar;
+
+ byte[] ZW = Encoding.GetEncoding("gb2312").GetBytes(textValue);
+
+ //濡傛灉鏄瓧姣嶏紝鍒欑洿鎺ヨ繑鍥�
+ if (ZW.Length == 1)
+ {
+ return textValue.ToUpper();
+ }
+ else
+ {
+ // get the array of byte from the single char
+ int i1 = (short)(ZW[0]);
+ int i2 = (short)(ZW[1]);
+ iCnChar = i1 * 256 + i2;
+ }
+
+
+
+ // iCnChar match the constant
+ if ((iCnChar >= 45217) && (iCnChar <= 45252))
+ {
+ return "A";
+ }
+ else if ((iCnChar >= 45253) && (iCnChar <= 45760))
+ {
+ return "B";
+ }
+ else if ((iCnChar >= 45761) && (iCnChar <= 46317))
+ {
+ return "C";
+ }
+ else if ((iCnChar >= 46318) && (iCnChar <= 46825))
+ {
+ return "D";
+ }
+ else if ((iCnChar >= 46826) && (iCnChar <= 47009))
+ {
+ return "E";
+ }
+ else if ((iCnChar >= 47010) && (iCnChar <= 47296))
+ {
+ return "F";
+ }
+ else if ((iCnChar >= 47297) && (iCnChar <= 47613))
+ {
+ return "G";
+ }
+ else if ((iCnChar >= 47614) && (iCnChar <= 48118))
+ {
+ return "H";
+ }
+ else if ((iCnChar >= 48119) && (iCnChar <= 49061))
+ {
+ return "J";
+ }
+ else if ((iCnChar >= 49062) && (iCnChar <= 49323))
+ {
+ return "K";
+ }
+ else if ((iCnChar >= 49324) && (iCnChar <= 49895))
+ {
+ return "L";
+ }
+ else if ((iCnChar >= 49896) && (iCnChar <= 50370))
+ {
+ return "M";
+ }
+
+ else if ((iCnChar >= 50371) && (iCnChar <= 50613))
+ {
+ return "N";
+ }
+ else if ((iCnChar >= 50614) && (iCnChar <= 50621))
+ {
+ return "O";
+ }
+ else if ((iCnChar >= 50622) && (iCnChar <= 50905))
+ {
+ return "P";
+ }
+ else if ((iCnChar >= 50906) && (iCnChar <= 51386))
+ {
+ return "Q";
+ }
+ else if ((iCnChar >= 51387) && (iCnChar <= 51445))
+ {
+ return "R";
+ }
+ else if ((iCnChar >= 51446) && (iCnChar <= 52217))
+ {
+ return "S";
+ }
+ else if ((iCnChar >= 52218) && (iCnChar <= 52697))
+ {
+ return "T";
+ }
+ else if ((iCnChar >= 52698) && (iCnChar <= 52979))
+ {
+ return "W";
+ }
+ else if ((iCnChar >= 52980) && (iCnChar <= 53640))
+ {
+ return "X";
+ }
+ else if ((iCnChar >= 53689) && (iCnChar <= 54480))
+ {
+ return "Y";
+ }
+ else if ((iCnChar >= 54481) && (iCnChar <= 55289))
+ {
+ return "Z";
+ }
+ else return ("");
+ }
+
/// <summary>
/// 鍔犺浇UI鐣岄潰
/// </summary>
diff --git a/ThirdPartyIntegration/.DS_Store b/ThirdPartyIntegration/.DS_Store
deleted file mode 100644
index fce4452..0000000
--- a/ThirdPartyIntegration/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/ys/.DS_Store b/ys/.DS_Store
deleted file mode 100644
index 46585ec..0000000
--- a/ys/.DS_Store
+++ /dev/null
Binary files differ
--
Gitblit v1.8.0