This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.1"> | |
<CommandSet xml:lang="en" Name="CortanaCommands_en"> | |
<CommandPrefix>Switch the light</CommandPrefix> | |
<Example>Switch the light in the bathroom on.</Example> | |
<Command Name="switchLight"> | |
<Example>in the bathroom on</Example> | |
<ListenFor>in [the] {room} {status}</ListenFor> | |
<Feedback>{room}light will be switched {status}.</Feedback> | |
<Navigate /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register Cortana voice commands | |
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///CortanaCommands.xml")); | |
await Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows.ApplicationModel.VoiceCommands.VoiceCommnadDefinition.VoiceCommandSet commandSet; | |
if (Windows.ApplicationModel.VoiceCommands.VoiceCommandDefinitionManager.InstalledCommandSets.TryGetValue("CortanaCommands_en", out commandSet)) | |
{ | |
await commandSetEnUs.SetPhraseListAsync("room", new string[] {"Bathroom", "Kitchen", "Livingroom", "Bedroom"}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnActivated(IActivatedEventArgs args) | |
{ | |
base.OnActivated(args); | |
string infos = string.Empty; | |
// Get voice data | |
if (args.Kind == ActivationKind.VoiceCommand) | |
{ | |
var commandArgs = args as VoiceCommandActivatedEventArgs; | |
var speechRecognitionResult = commandArgs.Result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override async void OnNavigatedTo(NavigationEventArgs e) | |
{ | |
base.OnNavigatedTo(e); | |
if (!string.IsNullOrEmpty(e.Parameter as string)) | |
{ | |
// Check if all paramters for accessing the light are set | |
if (App.HomeMatic != null && App.SelectedLightId != 0) | |
{ | |
var args = ((string)e.Parameter).Split('|'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Application | |
x:Class="App1.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:App1" | |
RequestedTheme="Light"> | |
<Application.Resources> | |
<!-- The custom color for the new placeholder --> | |
<SolidColorBrush x:Key="MyCustomPlaceholderForegroundColor" Color="{StaticResource SystemBaseHighColor}"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use LiquidCrystal library to communicate with LCD | |
#include <LiquidCrystal.h> | |
// Select the pins used on the LCD panel | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
// Define message to show | |
String message = "My future tweets will be in this format"; | |
void setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use LiquidCrystal library | |
#include <LiquidCrystal.h> | |
// Define button values | |
#define btnNONE 0 | |
#define btnRIGHT 1 | |
#define btnUP 2 | |
#define btnDOWN 3 | |
#define btnLEFT 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DachauTemp.Windows.Models; | |
using Newtonsoft.Json; | |
using System; | |
using System.Globalization; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
using Windows.Security.Cryptography; | |
using Windows.Security.Cryptography.Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<ContentPage | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:local="clr-namespace:ZeissCantinaMenuSample" | |
x:Class="ZeissCantinaMenuSample.ZeissCantinaMenuSamplePage"> | |
<local:MenuItem x:Name="TestMenuItem" Text="Hallo" Image="AlertIcon.png" Clicked="TestMenuItem_Clicked" /> | |
</ContentPage> |
OlderNewer