From e1a8f2f7e4d850beedeb1469610b878c1427e976 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 15 十二月 2021 09:01:53 +0800
Subject: [PATCH] 更新
---
SiriIntentsUI/IntentViewController.cs | 71 +++--------------------------------
1 files changed, 7 insertions(+), 64 deletions(-)
diff --git a/SiriIntentsUI/IntentViewController.cs b/SiriIntentsUI/IntentViewController.cs
index a613809..42435b9 100644
--- a/SiriIntentsUI/IntentViewController.cs
+++ b/SiriIntentsUI/IntentViewController.cs
@@ -2,6 +2,7 @@
using CoreGraphics;
using Foundation;
+using HDLSceneSiri;
//using HDLSceneSiri;
using Intents;
using IntentsUI;
@@ -15,20 +16,6 @@
{
}
- //public override void ViewDidLoad()
- //{
- // base.ViewDidLoad();
-
- // // Do any required interface here.
- //}
-
- //public override void DidReceiveMemoryWarning()
- //{
- // // Releases the view if it doesn't have a superview.
- // base.DidReceiveMemoryWarning();
-
- // // Release any cached data, images, etc that aren't in use.
- //}
[Export("configureWithInteraction:context:completion:")]
public void Configure(INInteraction interaction, INUIHostedViewContext context, Action<CGSize> completion)
{
@@ -55,60 +42,16 @@
- //if (@available(iOS 12.0, *))
- {
- //HDLRunSceneIntentResponse rsp = interaction.IntentResponse as HDLRunSceneIntentResponse;
- //if (rsp.Code == HDLRunSceneIntentResponseCode.Success)
- //{
- // this.messageLabel.Text = rsp.SuccessMessage;
- //}
- //else if (rsp.Code == HDLRunSceneIntentResponseCode.Failure || rsp.Code == HDLRunSceneIntentResponseCode.Error)
- //{
- // this.messageLabel.Text = rsp.ErrorMessage;
- //}
- //else
- {
- //messageLabel.Text = "鎵ц鎴愬姛";// rsp.SuccessMessage;
- }
- }
- CGSize size = new CGSize(DesiredSize().Width, 80);
+ HDLRunSceneIntentResponse rsp = interaction.IntentResponse as HDLRunSceneIntentResponse;
+ this.lblMsg.Text = rsp.SuccessMessage;
+ this.lblMsg.TextColor = UIColor.Black;
+ this.lblMsg.Frame = new CGRect(0, 0, DesiredSize().Width, 100);
+ CGSize size = new CGSize(DesiredSize().Width, 100);
- //if (completion != null)
+ if (completion != null)
completion(true, parameters, size);
-
- //var intent = interaction.Intent as OrderSoupIntent;
- //if (intent is null)
- //{
- // completion(false, new NSSet<INParameter>(), CGSize.Empty);
- //}
-
- //var order = Order.FromOrderSoupIntent(intent);
-
- //foreach (var view in View.Subviews)
- //{
- // view.RemoveFromSuperview();
- //}
-
- //// Different UIs can be displayed depending if the intent is in the
- //// confirmation phase or the handle phase.
- //var desiredSize = CGSize.Empty;
-
- //if (interaction.IntentHandlingStatus == INIntentHandlingStatus.Ready)
- //{
- // desiredSize = DisplayInvoice(order, intent);
- //}
- //else if (interaction.IntentHandlingStatus == INIntentHandlingStatus.Success)
- //{
- // var response = interaction.IntentResponse as OrderSoupIntentResponse;
- // if (!(response is null))
- // {
- // desiredSize = DisplayOrderConfirmation(order, intent, response);
- // }
- //}
-
- //completion(true, parameters, desiredSize);
}
--
Gitblit v1.8.0