Exemplo n.º 1
0
 private async void ManualIPEntry_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         if (!String.IsNullOrEmpty(ManualIPEntry.Text))
         {
             await currentMisty.ConnectAsync(ManualIPEntry.Text, kWebSocketPort);
         }
     }
 }
Exemplo n.º 2
0
        private async Task ConnectToMisty(string ip)
        {
            currentMisty               = new Misty();
            currentMisty.Connected    += CurrentMisty_Connected;
            currentMisty.Disconnected += CurrentMisty_Disconnected;

            Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
            localSettings.Values[kIPKey] = ip;

            await currentMisty.ConnectAsync(ip, kWebSocketPort);
        }