Пример #1
0
        public async void RegisterVoiceCommands()
        {
            VoiceHandler = new DefaultVoiceCommandHandler();
            var storageFile = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///HeyCortanaMyWife.xml"));

            var doc = await XmlDocument.LoadFromFileAsync(storageFile);

            WriteAutoCommandsToHandler(doc);
            await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(storageFile);
        }
Пример #2
0
 public async void RegisterVoiceCommands()
 {
     VoiceHandler = new DefaultVoiceCommandHandler();
     var storageFile = await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///HeyCortanaMyWife.xml"));
     var doc = await XmlDocument.LoadFromFileAsync(storageFile);
     WriteAutoCommandsToHandler(doc);
     await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(storageFile);
     
     
     
 }