wxr
2021-11-23 ccd5b1c8dc2d0399745779fb4f9a261d24d75a6d
备份
7个文件已修改
1 文件已重命名
264 ■■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/HDL-ON_iOS.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Other/Siri/Data/SceneDateManager.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Other/SkipControl.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/HDLRunSceneIntentHandlder.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/IntentHandler.cs 167 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/SiriIntents.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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 />
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" />
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);
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();
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)
                {
SiriIntents/HDLRunSceneIntentHandlder.cs
File was renamed from HDL-ON_iOS/Other/Siri/HDLRunSceneIntentHandlder.cs
@@ -2,7 +2,7 @@
using HDLSceneSiri;
using ObjCRuntime;
namespace Other.Siri
namespace SiriIntents
{
    public class HDLRunSceneIntentHandlder : HDLRunSceneIntentHandling
    {
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);
        //}
    }
}
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>