.vs/HDL_APP_Project/xs/UserPrefs.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DLL/Android/Shared.Droid.JLCountryCode.dll | 补丁 | 查看 | 原始文档 | blame | 历史 | |
DLL/IOS/Shared.IOS.JLCountryCode.dll | 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_Android/Other/JLCountrycode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HDL-ON_iOS/Other/JLCountrycode.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,26 +1,40 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> <MonoDevelop.Ide.Workbench> <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" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="Common" expanded="True"> <Node name="Utlis" expanded="True" /> </Node> <Node name="DAL" expanded="True"> <Node name="Server" expanded="True" /> </Node> <Node name="Entity" expanded="True" /> <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="2-Classification" expanded="True" /> <Node name="4-PersonalCenter" expanded="True"> <Node name="AddFunction" expanded="True"> <Node name="AddThirdPartyBrandListpage.cs" selected="True" /> </Node> </Node> </Node> </Node> </Node> <Node name="HDL-ON_Android" expanded="True"> <Node name="MainActivity.cs" selected="True" /> <Node name="ys" expanded="True"> <Node name="Transforms" expanded="True" /> </Node> <Node name="HDL-ON_iOS" expanded="True" /> </Node> </State> </Pad> @@ -33,7 +47,7 @@ <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.822QECU5228FU" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.4b65c4650918" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> DLL/Android/Shared.Droid.JLCountryCode.dllBinary files differ
DLL/IOS/Shared.IOS.JLCountryCode.dllBinary files differ
HDL-ON_Android/Other/JLCountrycode.cs
@@ -1,6 +1,9 @@ using System; using Android.Content; using Com.Widget.Jlcountrycode; using Com.Widget.Jlcountrycode.Sortselect; using System.Collections.Generic; using Java.Util; namespace JLCountrycode { @@ -34,6 +37,53 @@ JLCountryCodeActivity.OnCountryCodeCallback = new OnCountryCodeCallback(action); Shared.Application.Activity.StartActivity(new Intent(Shared.Application.Activity, typeof(JLCountryCodeActivity))); } /// <summary> /// 自定义传入字典数据 选择 /// </summary> /// <param name="titleStr"></param> /// <param name="dic"></param> /// <param name="action"></param> public void ShowSortSelection(string titleStr, Dictionary<string, List<string>> dic, Action<string> action) { try { SortSelectionUtils.Instance.OnSortSelectCallback = new OnSSCallback(action); SortSelectionUtils.Instance.SortSelectTitle = titleStr; SortSelectionUtils.Instance.MSortSelectList = ConvertToHashMap(dic); Shared.Application.Activity.StartActivity(new Intent(Shared.Application.Activity, typeof(JLSortSelectionActivity))); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } /// <summary> /// Dictionary 转 Android HashMap /// </summary> /// <param name="dict"></param> /// <returns></returns> Dictionary<string, ArrayList> ConvertToHashMap(Dictionary<string, List<string>> dict) { Dictionary<string, ArrayList> newDictionary = new Dictionary<string, ArrayList>(); try { foreach (string key in dict.Keys) { var value = dict[key]; var arrayList = new ArrayList(); arrayList.AddAll(value.ToArray()); newDictionary.Add(key, arrayList); } } catch (Exception Ex) { //Logger.LogException(Ex); } return newDictionary; } } /// <summary> @@ -53,4 +103,26 @@ mAction?.Invoke(countryName, code); } } /// <summary> /// OnSortSelectCallback /// </summary> public class OnSSCallback : Java.Lang.Object, IOnSortSelectCallback { Action<string> mAction; public OnSSCallback(Action<string> action) { mAction = action; } public void OnSortSelectCallback(string countryName) { mAction?.Invoke(countryName); } } } HDL-ON_iOS/Other/JLCountrycode.cs
@@ -1,5 +1,7 @@ using System; using Shared.IOS.JLCountryCode; using Foundation; using System.Collections.Generic; namespace JLCountrycode { @@ -40,5 +42,60 @@ Shared.Application.currentVC.NavigationController.PushViewController(mJLCountryCodeController, true); } /// <summary> /// 选择 /// </summary> /// <param name="titleStr"></param> /// <param name="dic"></param> /// <param name="action"></param> public void ShowSortSelection(string titleStr, Dictionary<string, List<string>> dic, Action<string> action) { try { JLSortSelectionViewController vc = new JLSortSelectionViewController(); vc.TitleStr = titleStr; vc.SortedNameDict = ConvertToNativeDictionary(dic); vc.SortSelectionBlock += (countryName) => { action?.Invoke(countryName); }; Shared.Application.currentVC.NavigationController.PushViewController(vc, true); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } /// <summary> /// Dictionary 转 iOS原生 NSMutableDictionary /// </summary> /// <param name="dict"></param> /// <returns></returns> NSMutableDictionary ConvertToNativeDictionary(Dictionary<string, List<string>> dict) { NSMutableDictionary newDictionary = new NSMutableDictionary(); try { //var dictDataList = new NSMutableArray(); foreach (string key in dict.Keys) { var value = dict[key]; newDictionary.Add(new NSString(key), NSArray.FromObjects(value.ToArray())); } } catch (Exception Ex) { Console.WriteLine(Ex.ToString()); } return newDictionary; } } }