From ccd5b1c8dc2d0399745779fb4f9a261d24d75a6d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 23 十一月 2021 14:43:13 +0800
Subject: [PATCH] 备份

---
 SiriIntents/SiriIntents.csproj                 |    1 
 SiriIntents/HDLRunSceneIntentHandlder.cs       |    2 
 HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs |   43 ++++++++
 HDL_ON/Common/HDLCommon.cs                     |    2 
 HDL-ON_iOS/HDL-ON_iOS.csproj                   |    1 
 SiriIntents/IntentHandler.cs                   |  167 +++++++++++++++++----------------
 .vs/HDL_APP_Project/xs/UserPrefs.xml           |   45 +++-----
 HDL-ON_iOS/Other/SkipControl.cs                |    3 
 8 files changed, 153 insertions(+), 111 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index d7a6429..38b6359 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -2,40 +2,29 @@
   <MonoDevelop.Ide.ItemProperties.SiriIntentUI>
     <MonoDevelop.MacDev.AppleDevelopmentTeam />
   </MonoDevelop.Ide.ItemProperties.SiriIntentUI>
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.3E789E7C-7F16-463D-8CAD-6AA84628D6C8" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="SiriIntents/HDLRunSceneIntentHandlder.cs">
     <Files>
-      <File FileName="SiriIntents/IntentHandler.cs" Line="17" Column="32" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs" />
-      <File FileName="HDL-ON_iOS/Other/Siri/Data/DataManager.cs" />
-      <File FileName="HDL-ON_iOS/Other/Siri/Support/NSUserDefaultsHelper.cs" />
-      <File FileName="HDL-ON_iOS/Other/Siri/SiriBaseView.cs" />
-      <File FileName="HDL-ON_iOS/Other/Siri/HDLRunSceneIntentHandlder.cs" />
-      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="603" Column="52" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPageBLL.cs" />
+      <File FileName="HDL-ON_iOS/Other/SkipControl.cs" Line="24" Column="30" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="603" Column="1" />
+      <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="1" Column="1" />
+      <File FileName="HDL_ON/Common/UserInfo.cs" Line="96" Column="22" />
+      <File FileName="HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs" Line="95" Column="21" />
+      <File FileName="HDL-ON_iOS/Other/Siri/Data/DataManager.cs" Line="30" Column="18" />
+      <File FileName="HDL-ON_iOS/Other/Siri/Support/NSUserDefaultsHelper.cs" Line="8" Column="52" />
+      <File FileName="SiriIntents/HDLRunSceneIntentHandlder.cs" Line="18" Column="33" />
     </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="DAL" expanded="True">
-                <Node name="Server" expanded="True">
-                  <Node name="HttpServerRequest.cs" selected="True" />
-                </Node>
-              </Node>
-              <Node name="UI" expanded="True">
-                <Node name="UI1-Login" expanded="True" />
-              </Node>
-            </Node>
             <Node name="HDL-ON_iOS" expanded="True">
               <Node name="Other" expanded="True">
-                <Node name="Siri" expanded="True">
-                  <Node name="Data" expanded="True" />
-                  <Node name="Support" expanded="True" />
-                </Node>
+                <Node name="Siri" expanded="True" />
               </Node>
+            </Node>
+            <Node name="SiriIntents" expanded="True">
+              <Node name="HDLRunSceneIntentHandlder.cs" selected="True" />
             </Node>
           </Node>
         </State>
@@ -54,16 +43,16 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
     <String>SiriIntent/SiriIntent.csproj</String>
-    <String>SiriLibrary/SiriLibrary.csproj</String>
     <String>SceneKit/SceneKit.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
   <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="28" column="1" />
-      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL-ON_iOS/Other/SkipControl.cs" relfile="HDL-ON_iOS/Other/SkipControl.cs" line="25" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL-ON_iOS/Other/SkipControl.cs" relfile="HDL-ON_iOS/Other/SkipControl.cs" line="28" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HdlSiriKit/SkipControl.cs" relfile="HdlSiriKit/SkipControl.cs" line="14" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL-ON_iOS/Other/SkipControl.cs" relfile="HDL-ON_iOS/Other/SkipControl.cs" line="47" column="1" />
     </BreakpointStore>
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
   <MultiItemStartupConfigurations />
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index a33f04f..906a197 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -509,7 +509,6 @@
         </Compile>
         <Compile Include="Other\Siri\VoiceShortcutDataManager.cs" />
         <Compile Include="Other\Siri\SiriScene.cs" />
-        <Compile Include="Other\Siri\HDLRunSceneIntentHandlder.cs" />
         <Compile Include="Other\Siri\Data\SceneDateManager.cs" />
         <Compile Include="Other\Siri\Data\DataManager.cs" />
         <Compile Include="Other\Siri\Support\NSUserDefaultsHelper.cs" />
diff --git a/HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs b/HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs
index ab33c54..a7651af 100644
--- a/HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs
+++ b/HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs
@@ -76,19 +76,62 @@
         }
         #endregion
 
+        public NSData GetData(string key)
+        {
+            var data = UserDefaults.DataForKey(key);
+            var d = UserDefaults.BoolForKey(key);
+            return data;
+        }
+
+        public bool IsLgoin
+        {
+            get
+            {
+                var d = UserDefaults.BoolForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GIsLogin);
+                return d;
+            }
+        }
 
         public void SetIsLoginValue(bool value)
         {
             UserDefaults.SetBool(value, NSUserDefaultsHelper.StorageKeys.GLOBAL_GIsLogin);
         }
+
+        public string AccessToken
+        {
+            get
+            {
+                var d = UserDefaults.StringForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken);
+                return d;
+            }
+        }
         public void SetAccessTokenValue(string accessToken)
         {
             UserDefaults.SetString(accessToken, NSUserDefaultsHelper.StorageKeys.GLOBAL_GAccessToken);
         }
+
+        public string RefreshToken
+        {
+            get
+            {
+                var d = UserDefaults.StringForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GRefreshToken);
+                return d;
+            }
+        }
         public void SetRefreshTokenValue(string refreshToken)
         {
             UserDefaults.SetString(refreshToken, NSUserDefaultsHelper.StorageKeys.GLOBAL_GRefreshToken);
         }
+
+
+        public string RegionUrl
+        {
+            get
+            {
+                var d = UserDefaults.StringForKey(NSUserDefaultsHelper.StorageKeys.GLOBAL_GRegionUrl);
+                return d;
+            }
+        }
         public void SetRegionUrlValue(string regionUrl)
         {
             UserDefaults.SetString(regionUrl, NSUserDefaultsHelper.StorageKeys.GLOBAL_GRegionUrl);
diff --git a/HDL-ON_iOS/Other/SkipControl.cs b/HDL-ON_iOS/Other/SkipControl.cs
index 7706928..1613887 100644
--- a/HDL-ON_iOS/Other/SkipControl.cs
+++ b/HDL-ON_iOS/Other/SkipControl.cs
@@ -20,6 +20,9 @@
             //user.View.BackgroundColor = new UIColor(242, 243, 247, 1);
 
             //HDL_ON_iOS.AppDelegate.rootViewController.PushViewController(user, true);
+            var sDM = new SceneDateManager();
+            var isLogin = sDM.IsLgoin;//sDM.GetData(NSUserDefaultsHelper.StorageKeys.GLOBAL_GIsLogin);
+
 
 
             NSMutableArray list = new NSMutableArray();
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 5cf2a74..9caea08 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -426,6 +426,8 @@
                     DB_ResidenceData.Instance.EixtAccount();
                     //4.娉ㄩ攢HDLSIP璐﹀彿鐧诲綍 2021-08-20
                     HDLLinphone.Current.LogoutAllAccount();
+                    //5.娓呯┖Siri鍏变韩鏁版嵁淇℃伅
+                    new Other.SkipControl().SetData(false, "", "", "");
                 }
                 catch (Exception ex)
                 {
diff --git a/HDL-ON_iOS/Other/Siri/HDLRunSceneIntentHandlder.cs b/SiriIntents/HDLRunSceneIntentHandlder.cs
similarity index 96%
rename from HDL-ON_iOS/Other/Siri/HDLRunSceneIntentHandlder.cs
rename to SiriIntents/HDLRunSceneIntentHandlder.cs
index e3df810..78adabf 100644
--- a/HDL-ON_iOS/Other/Siri/HDLRunSceneIntentHandlder.cs
+++ b/SiriIntents/HDLRunSceneIntentHandlder.cs
@@ -2,7 +2,7 @@
 using HDLSceneSiri;
 using ObjCRuntime;
 
-namespace Other.Siri
+namespace SiriIntents
 {
     public class HDLRunSceneIntentHandlder : HDLRunSceneIntentHandling
     {
diff --git a/SiriIntents/IntentHandler.cs b/SiriIntents/IntentHandler.cs
index c4086f2..9270fdf 100644
--- a/SiriIntents/IntentHandler.cs
+++ b/SiriIntents/IntentHandler.cs
@@ -15,7 +15,7 @@
     // "<myApp> John saying hello"
     // "Search for messages in <myApp>"
     [Register("IntentHandler")]
-    public class IntentHandler : INExtension, IINSendMessageIntentHandling, IINSearchForMessagesIntentHandling, IINSetMessageAttributeIntentHandling
+    public class IntentHandler : INExtension//, IINSendMessageIntentHandling, IINSearchForMessagesIntentHandling, IINSetMessageAttributeIntentHandling
     {
         protected IntentHandler(IntPtr handle) : base(handle)
         {
@@ -27,102 +27,107 @@
             // This is the default implementation.  If you want different objects to handle different intents,
             // you can override this and return the handler you want for that particular intent.
 
+            if(intent is HDLSceneSiri.HDLRunSceneIntent)
+            {
+                return new HDLRunSceneIntentHandlder();
+            }
+
             return this;
         }
 
-        // Implement resolution methods to provide additional information about your intent (optional).
-        [Export("resolveRecipientsForSearchForMessages:withCompletion:")]
-        public void ResolveRecipients(INSendMessageIntent intent, Action<INPersonResolutionResult[]> completion)
-        {
-            var recipients = intent.Recipients;
-            // If no recipients were provided we'll need to prompt for a value.
-            if (recipients.Length == 0)
-            {
-                completion(new INPersonResolutionResult[] { INPersonResolutionResult.NeedsValue });
-                return;
-            }
+        //// Implement resolution methods to provide additional information about your intent (optional).
+        //[Export("resolveRecipientsForSearchForMessages:withCompletion:")]
+        //public void ResolveRecipients(INSendMessageIntent intent, Action<INPersonResolutionResult[]> completion)
+        //{
+        //    var recipients = intent.Recipients;
+        //    // If no recipients were provided we'll need to prompt for a value.
+        //    if (recipients.Length == 0)
+        //    {
+        //        completion(new INPersonResolutionResult[] { INPersonResolutionResult.NeedsValue });
+        //        return;
+        //    }
 
-            var resolutionResults = new List<INPersonResolutionResult>();
+        //    var resolutionResults = new List<INPersonResolutionResult>();
 
-            foreach (var recipient in recipients)
-            {
-                var matchingContacts = new INPerson[] { recipient }; // Implement your contact matching logic here to create an array of matching contacts
-                if (matchingContacts.Length > 1)
-                {
-                    // We need Siri's help to ask user to pick one from the matches.
-                    resolutionResults.Add(INPersonResolutionResult.GetDisambiguation(matchingContacts));
-                }
-                else if (matchingContacts.Length == 1)
-                {
-                    // We have exactly one matching contact
-                    resolutionResults.Add(INPersonResolutionResult.GetSuccess(recipient));
-                }
-                else
-                {
-                    // We have no contacts matching the description provided
-                    resolutionResults.Add(INPersonResolutionResult.Unsupported);
-                }
-            }
+        //    foreach (var recipient in recipients)
+        //    {
+        //        var matchingContacts = new INPerson[] { recipient }; // Implement your contact matching logic here to create an array of matching contacts
+        //        if (matchingContacts.Length > 1)
+        //        {
+        //            // We need Siri's help to ask user to pick one from the matches.
+        //            resolutionResults.Add(INPersonResolutionResult.GetDisambiguation(matchingContacts));
+        //        }
+        //        else if (matchingContacts.Length == 1)
+        //        {
+        //            // We have exactly one matching contact
+        //            resolutionResults.Add(INPersonResolutionResult.GetSuccess(recipient));
+        //        }
+        //        else
+        //        {
+        //            // We have no contacts matching the description provided
+        //            resolutionResults.Add(INPersonResolutionResult.Unsupported);
+        //        }
+        //    }
 
-            completion(resolutionResults.ToArray());
-        }
+        //    completion(resolutionResults.ToArray());
+        //}
 
-        [Export("resolveContentForSendMessage:withCompletion:")]
-        public void ResolveContent(INSendMessageIntent intent, Action<INStringResolutionResult> completion)
-        {
-            var text = intent.Content;
-            if (!string.IsNullOrEmpty(text))
-                completion(INStringResolutionResult.GetSuccess(text));
-            else
-                completion(INStringResolutionResult.NeedsValue);
-        }
+        //[Export("resolveContentForSendMessage:withCompletion:")]
+        //public void ResolveContent(INSendMessageIntent intent, Action<INStringResolutionResult> completion)
+        //{
+        //    var text = intent.Content;
+        //    if (!string.IsNullOrEmpty(text))
+        //        completion(INStringResolutionResult.GetSuccess(text));
+        //    else
+        //        completion(INStringResolutionResult.NeedsValue);
+        //}
 
-        // Once resolution is completed, perform validation on the intent and provide confirmation (optional).
-        [Export("confirmSendMessage:completion:")]
-        public void ConfirmSendMessage(INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion)
-        {
-            // Verify user is authenticated and your app is ready to send a message.
+        //// Once resolution is completed, perform validation on the intent and provide confirmation (optional).
+        //[Export("confirmSendMessage:completion:")]
+        //public void ConfirmSendMessage(INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion)
+        //{
+        //    // Verify user is authenticated and your app is ready to send a message.
 
-            var userActivity = new NSUserActivity("INSendMessageIntent");
-            var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Ready, userActivity);
-            completion(response);
-        }
+        //    var userActivity = new NSUserActivity("INSendMessageIntent");
+        //    var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Ready, userActivity);
+        //    completion(response);
+        //}
 
-        // Handle the completed intent (required).
-        public void HandleSendMessage(INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion)
-        {
-            // Implement your application logic to send a message here.
+        //// Handle the completed intent (required).
+        //public void HandleSendMessage(INSendMessageIntent intent, Action<INSendMessageIntentResponse> completion)
+        //{
+        //    // Implement your application logic to send a message here.
 
-            var userActivity = new NSUserActivity("INSendMessageIntent");
-            var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Success, userActivity);
-            completion(response);
-        }
+        //    var userActivity = new NSUserActivity("INSendMessageIntent");
+        //    var response = new INSendMessageIntentResponse(INSendMessageIntentResponseCode.Success, userActivity);
+        //    completion(response);
+        //}
 
-        // Implement handlers for each intent you wish to handle.
-        // As an example for messages, you may wish to add HandleSearchForMessages and HandleSetMessageAttribute.
+        //// Implement handlers for each intent you wish to handle.
+        //// As an example for messages, you may wish to add HandleSearchForMessages and HandleSetMessageAttribute.
 
-        public void HandleSearchForMessages(INSearchForMessagesIntent intent, Action<INSearchForMessagesIntentResponse> completion)
-        {
-            // Implement your application logic to find a message that matches the information in the intent.
+        //public void HandleSearchForMessages(INSearchForMessagesIntent intent, Action<INSearchForMessagesIntentResponse> completion)
+        //{
+        //    // Implement your application logic to find a message that matches the information in the intent.
 
-            var userActivity = new NSUserActivity("INSearchForMessagesIntent");
-            var response = new INSearchForMessagesIntentResponse(INSearchForMessagesIntentResponseCode.Success, userActivity);
+        //    var userActivity = new NSUserActivity("INSearchForMessagesIntent");
+        //    var response = new INSearchForMessagesIntentResponse(INSearchForMessagesIntentResponseCode.Success, userActivity);
 
-            // Initialize with found message's attributes
-            var sender = new INPerson(new INPersonHandle("sarah@example.com", INPersonHandleType.EmailAddress), null, "Sarah", null, null, null);
-            var recipient = new INPerson(new INPersonHandle("+1-415-555-5555", INPersonHandleType.PhoneNumber), null, "John", null, null, null);
-            var message = new INMessage("identifier", "I am so excited about SiriKit!", NSDate.Now, sender, new INPerson[] { recipient });
-            response.Messages = new INMessage[] { message };
-            completion(response);
-        }
+        //    // Initialize with found message's attributes
+        //    var sender = new INPerson(new INPersonHandle("sarah@example.com", INPersonHandleType.EmailAddress), null, "Sarah", null, null, null);
+        //    var recipient = new INPerson(new INPersonHandle("+1-415-555-5555", INPersonHandleType.PhoneNumber), null, "John", null, null, null);
+        //    var message = new INMessage("identifier", "I am so excited about SiriKit!", NSDate.Now, sender, new INPerson[] { recipient });
+        //    response.Messages = new INMessage[] { message };
+        //    completion(response);
+        //}
 
-        public void HandleSetMessageAttribute(INSetMessageAttributeIntent intent, Action<INSetMessageAttributeIntentResponse> completion)
-        {
-            // Implement your application logic to set the message attribute here.
+        //public void HandleSetMessageAttribute(INSetMessageAttributeIntent intent, Action<INSetMessageAttributeIntentResponse> completion)
+        //{
+        //    // Implement your application logic to set the message attribute here.
 
-            var userActivity = new NSUserActivity("INSetMessageAttributeIntent");
-            var response = new INSetMessageAttributeIntentResponse(INSetMessageAttributeIntentResponseCode.Success, userActivity);
-            completion(response);
-        }
+        //    var userActivity = new NSUserActivity("INSetMessageAttributeIntent");
+        //    var response = new INSetMessageAttributeIntentResponse(INSetMessageAttributeIntentResponseCode.Success, userActivity);
+        //    completion(response);
+        //}
     }
 }
diff --git a/SiriIntents/SiriIntents.csproj b/SiriIntents/SiriIntents.csproj
index 36f35e5..ef7a6ef 100644
--- a/SiriIntents/SiriIntents.csproj
+++ b/SiriIntents/SiriIntents.csproj
@@ -99,6 +99,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="IntentHandler.cs" />
+    <Compile Include="HDLRunSceneIntentHandlder.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />
 </Project>
\ No newline at end of file

--
Gitblit v1.8.0