using System;
|
using HDLSceneSiri;
|
//using HdlSiri;
|
|
namespace SiriKit
|
{
|
public class HDLRunSceneIntentHandlder : HDLRunSceneIntentHandling
|
{
|
|
override public void ConfirmRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion)
|
{
|
Console.WriteLine("ConfirmRunScene");
|
|
//SceneDateManager sdm = new SceneDateManager();
|
//if(sdm.IsLgoin)
|
{
|
//执行成功
|
HDLRunSceneIntentResponse rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Success,null);
|
rsp.SceneName = intent.SceneName;
|
rsp.SuccessMessage = @"请等待...";
|
completion(rsp);
|
}
|
//else
|
//{
|
// completion(new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null) { ErrorMessage = "未登录" });
|
//}
|
|
}
|
|
public override void HandleRunScene(HDLRunSceneIntent intent, Action<HDLRunSceneIntentResponse> completion)
|
{
|
Console.WriteLine("HandleRunScene");
|
|
//SceneDateManager sdm = new SceneDateManager();
|
//if (sdm.IsLgoin)
|
{
|
//执行成功
|
HDLRunSceneIntentResponse rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Success, null);
|
rsp.SceneName = intent.SceneName;
|
rsp.SuccessMessage = @"执行成功";
|
completion(rsp);
|
}
|
//else
|
//{
|
// completion(new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Error, null) { ErrorMessage = "未登录" });
|
//}
|
|
//throw new NotImplementedException();
|
}
|
}
|
}
|