From f9de7b8e7a567d71e336965117dd9ceb22be07c0 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 10 三月 2021 16:16:57 +0800
Subject: [PATCH] 2021-03-10 1.更新

---
 HDL-ON_iOS/Other/JLCountrycode.cs          |   57 +++++++++++++++++++
 HDL-ON_Android/Other/JLCountrycode.cs      |   72 ++++++++++++++++++++++++
 .vs/HDL_APP_Project/xs/UserPrefs.xml       |   32 +++++++---
 DLL/Android/Shared.Droid.JLCountryCode.dll |    0 
 DLL/IOS/Shared.IOS.JLCountryCode.dll       |    0 
 5 files changed, 152 insertions(+), 9 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 0d123e8..1920b24 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.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>
diff --git a/DLL/Android/Shared.Droid.JLCountryCode.dll b/DLL/Android/Shared.Droid.JLCountryCode.dll
index be50629..d67e2eb 100644
--- a/DLL/Android/Shared.Droid.JLCountryCode.dll
+++ b/DLL/Android/Shared.Droid.JLCountryCode.dll
Binary files differ
diff --git a/DLL/IOS/Shared.IOS.JLCountryCode.dll b/DLL/IOS/Shared.IOS.JLCountryCode.dll
index 245c88c..064a922 100644
--- a/DLL/IOS/Shared.IOS.JLCountryCode.dll
+++ b/DLL/IOS/Shared.IOS.JLCountryCode.dll
Binary files differ
diff --git a/HDL-ON_Android/Other/JLCountrycode.cs b/HDL-ON_Android/Other/JLCountrycode.cs
index cdf913a..487892b 100644
--- a/HDL-ON_Android/Other/JLCountrycode.cs
+++ b/HDL-ON_Android/Other/JLCountrycode.cs
@@ -1,6 +1,9 @@
 锘縰sing 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);
+        }
+
+    }
+
 }
\ No newline at end of file
diff --git a/HDL-ON_iOS/Other/JLCountrycode.cs b/HDL-ON_iOS/Other/JLCountrycode.cs
index f6a2451..176a7df 100644
--- a/HDL-ON_iOS/Other/JLCountrycode.cs
+++ b/HDL-ON_iOS/Other/JLCountrycode.cs
@@ -1,5 +1,7 @@
 锘縰sing 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;
+        }
+
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0