Alan never forgets his watch
if(command == "what time is it")
{
var now = System.DateTime.Now;
await GUIOutput("It's " + now.Hour.ToString("D2") + ":" + now.Minute.ToString("D2"), true);
state = AssistantState.BACKGROUND_DEFAULT;
}
This piece of code takes the current time of the system and uses it to create the output
string to be passed to the GUIOutput
function. Such a function is the one that
handles the visual and audio output: it uses the code snippet for the interaction between
application and UI threads and the function SayAsync
(see here and here for more
details).