.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,28 +1,14 @@ <<<<<<< HEAD <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddThirdPartyBrandListpage.cs"> <Files> <File FileName="HDL_ON/Entity/ResponseEntity/ResidenceMemberInfo.cs" Line="1" Column="1" /> <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="470" Column="50" /> <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="2126" Column="47" /> <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddThirdPartyBrandListpage.cs" Line="116" Column="35" /> ======= <Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Common/HDLCommon.cs"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.08FD445C-3EE8-4ED2-BF28-B42ADD0DA92C" /> <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Common/Constant.cs"> <Files> <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" /> <File FileName="HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs" /> <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" /> <File FileName="HDL-ON_iOS/Info.plist" /> <File FileName="HDL_ON/UI/MainPage.cs" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWaterValvePage.cs" Line="124" Column="46" /> <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="616" Column="84" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs" Line="331" Column="15" /> <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs" Line="758" Column="56" /> <File FileName="HDL_ON/Common/HDLCommon.cs" Line="500" Column="21" /> >>>>>>> origin/temp-wxr <File FileName="HDL-ON_iOS/Other/ESVideo.cs" Line="9" Column="27" /> <File FileName="HDL-ON_Android/Application.cs" Line="30" Column="10" /> <File FileName="HDL_ON/Common/HDLCommon.cs" Line="251" Column="23" /> <File FileName="HDL-ON_Android/Other/JLCountrycode.cs" Line="67" Column="32" /> <File FileName="HDL-ON_Android/Other/JPush/JPushService.cs" Line="1" Column="1" /> <File FileName="HDL-ON_Android/Other/JPush/JPushReceiver.cs" Line="177" Column="52" /> <File FileName="HDL_ON/Common/Constant.cs" Line="241" Column="32" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -30,36 +16,18 @@ <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True"> <<<<<<< HEAD <Node name="Utlis" expanded="True" /> </Node> <Node name="DAL" expanded="True"> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True"> <Node name="Integratedbrand" expanded="True" /> <Node name="ResponseEntity" expanded="True" /> </Node> <Node name="UI" expanded="True"> <Node name="UI2" expanded="True"> <Node name="4-PersonalCenter" expanded="True"> <Node name="AddFunction" expanded="True"> <Node name="AddThirdPartyBrandListpage.cs" selected="True" /> </Node> </Node> </Node> <Node name="Constant.cs" selected="True" /> </Node> </Node> <Node name="ys" expanded="True"> <Node name="Transforms" expanded="True" /> ======= <Node name="HDLCommon.cs" selected="True" /> <Node name="HDL-ON_Android" expanded="True"> <Node name="Other" expanded="True"> <Node name="JPush" expanded="True" /> </Node> </Node> <Node name="HDL-ON_iOS" expanded="True"> <Node name="Resources" expanded="True" /> >>>>>>> origin/temp-wxr <Node name="Other" expanded="True" /> </Node> <Node name="ys" expanded="True" /> </Node> </State> </Pad> @@ -71,13 +39,8 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <<<<<<< HEAD <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> ======= <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> >>>>>>> origin/temp-wxr <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.822QECU5228FU" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> HDL-ON_Android/HDL-ON_Android.csproj
@@ -137,6 +137,7 @@ <Compile Include="Other\JLCountrycode.cs" /> <Compile Include="Other\JPush\JPushReceiver.cs" /> <Compile Include="Other\JPush\JPushService.cs" /> <Compile Include="Other\ESOnVideo.cs" /> </ItemGroup> <ItemGroup> <None Include="Resources\AboutResources.txt" /> HDL-ON_Android/Other/ESOnVideo.cs
New file @@ -0,0 +1,106 @@ using System; 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; } } public void InitESVideoSDK() { //ESVideo. } /// <summary> /// 监控页面 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) { } /// <summary> /// 被呼叫页面 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo) { } /// <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 { ShowESvideoVideoIntercom(eSVideoInfo); } } } public class ESVideoInfo { /// <summary> /// 室外机的UUID /// 例:JJY000007FSEYX /// </summary> public string ESVideoUUID = string.Empty; /// <summary> /// 当前用户的房间ID /// 例: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; } } HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -63,8 +63,10 @@ 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> HDL-ON_Android/Resources/Resource.designer.cs
Diff too large 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、英文海外key EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); Console.WriteLine("FinishedLaunching"); return true; } @@ -317,7 +306,7 @@ expandData = expandDataNSD.ToString(); if(expandDataNSD.ContainsKey(new NSString("messageType"))){ messageType = expandDataNSD["messageType"] as NSString; Utlis.WriteLine("messageType: "+ messageType); Utlis.WriteLine("messageType: " + messageType); } } @@ -341,14 +330,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 +356,7 @@ } catch { //HDLCommon.Current.ShowAlert("catch2222"); } } @@ -384,7 +380,7 @@ if (userInfo != null) { HandleNotificationMessageUserInfo(userInfo, true); //HandleNotificationMessageUserInfo(userInfo, true); } } 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> @@ -92,6 +92,9 @@ </Reference> <Reference Include="EZSDK.IOS"> <HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath> </Reference> <Reference Include="Shared.IOS.ESVideoOnSDK"> <HintPath>..\..\ESVideoPhoneSDKProject\On+\xamarin\Shared.IOS.ESVideoOnSDK\Shared.IOS.ESVideoOnSDK\bin\Release\Shared.IOS.ESVideoOnSDK.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -471,7 +474,7 @@ <Compile Include="ZXingOverlayView.cs" /> <Compile Include="Other\JLCountrycode.cs" /> <Compile Include="BlueWifi.cs" /> <Compile Include="Other\ESVideo.cs" /> <Compile Include="Other\ESOnVideo.cs" /> </ItemGroup> <ItemGroup> <BundleResource Include="Resources\Phone\LoginIcon\ShowPasswordIcon.png" /> HDL-ON_iOS/Other/ESOnVideo.cs
New file @@ -0,0 +1,117 @@ using System; using Shared.IOS.ESVideoOnSDK; 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; } } public void InitESVideoSDK() { //ESVideo. } /// <summary> /// 监控页面 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) { ESOnMonitorViewController vc = new ESOnMonitorViewController(); vc.MESVideoID = mESVideoInfo.ESVideoUUID; vc.MESRoomID = mESVideoInfo.ESRoomID; vc.DeviceName = mESVideoInfo.DeviceName; vc.RoomName = mESVideoInfo.RoomName; Shared.Application.currentVC.NavigationController.PushViewController(vc, true); } /// <summary> /// 被呼叫页面 /// </summary> /// <param name="mESVideoInfo"></param> public void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo) { ESOnIntercomViewController vc = new ESOnIntercomViewController(); vc.MESVideoID = mESVideoInfo.ESVideoUUID; vc.MESRoomID = mESVideoInfo.ESRoomID; vc.DeviceName = mESVideoInfo.DeviceName; vc.RoomName = mESVideoInfo.RoomName; Shared.Application.currentVC.NavigationController.PushViewController(vc, true); } /// <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 { ShowESvideoVideoIntercom(eSVideoInfo); } } } public class ESVideoInfo { /// <summary> /// 室外机的UUID /// 例:JJY000007FSEYX /// </summary> public string ESVideoUUID = string.Empty; /// <summary> /// 当前用户的房间ID /// 例: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; } } HDL-ON_iOS/Other/ESVideo.cs
File was deleted 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 HDL_APP_Project.sln
@@ -9,6 +9,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,5 +57,17 @@ {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU {2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU {DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU EndGlobalSection EndGlobal HDL_ON/Common/HDLCommon.cs
@@ -248,44 +248,58 @@ #region ■ 推送处理_______________________ /// <summary> /// 推送消息处理 /// 注意:Android要在主线程(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包含Alarm关键字的) if (jpushMessageInfo.messageType != null && jpushMessageInfo.messageType.Contains("Alarm")) { //报警推送弹窗提示 ShowAlarmPushMessage(jpushMessageInfo); //new Alert(jpushMessageInfo.Title, jpushMessageInfo.Content, Language.StringByID(StringId.Close)).Show(); } GetPushMessageAction?.Invoke(); }); return; //messageType为空不处理 if (string.IsNullOrEmpty(jpushMessageInfo.messageType)) return; //报警推送才弹窗提示(messageType包含Alarm关键字的) if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString())) { //报警推送弹窗提示 ShowAlarmPushMessage(jpushMessageInfo); } else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) { #if DEBUG #if __Android__ ShowAlert("来电通知!!!!"); #else ESOnVideo.Current.Test(); #endif #endif //解析呼叫的门口机UUID信息,并跳转丰林呼叫页面 //ESVideoInfo eSVideoInfo = new ESVideoInfo() //{ // DeviceName = "室外机88", // ESVideoUUID = "JJY000019VPLLF", //}; //ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo); } } } catch catch(Exception EX) { Utlis.WriteLine("catch: " + EX.ToString()); } } HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -254,7 +254,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()) { HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -186,10 +186,17 @@ bodyView.AddChidren(btnIcon_bg); #if DEBUG btnIcon_bg.MouseUpEventHandler += (sender, e) => { ESOnVideo.Current.Test(); }; bool b = false; btnIcon.MouseUpEventHandler += (sender, e) => { //return; ESOnVideo.Current.Test(false); return; if (b) { etAccount.Text = "18316672920";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654"; HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -260,21 +260,21 @@ { EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var page = new BrandListPage(); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; //var page = new BrandListPage(); //MainPage.BasePageView.AddChidren(page); //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; HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirMain.cs
@@ -1,5 +1,6 @@ using System; using System.Collections.Generic; using System.Text; using HDL_ON.Entity; using HDL_ON.UI.UI2.Intelligence.Automation.LogicView; using Shared; @@ -354,20 +355,24 @@ for (int str = 0; str < brandList.Count; str++) { string s = brandList[str].brandName; var bool_if = brandSupportStrList.Find((c) => s.Contains(c)); if (bool_if != null) { strList.Add(s); } //var bool_if = brandSupportStrList.Find((c) => s.Contains(c)); //if (bool_if != null) //{ // strList.Add(s); //} strList.Add(s); } Application.RunOnMainThread(() => { BrandList brandObj = new BrandList(); MainPage.BasePageView.AddChidren(brandObj); brandObj.Show(brandList, strList, strings[1]); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }); //Application.RunOnMainThread(() => //{ // BrandList brandObj = new BrandList(); // MainPage.BasePageView.AddChidren(brandObj); // brandObj.Show(brandList, strList, strings[1]); // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; //}); GoToShowSortSelection(strList); }); @@ -380,6 +385,174 @@ GetDeviceTypeList(); } 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> /// 获取品牌支持 /// </summary>