Created
January 14, 2015 02:58
-
-
Save olafloogman/8768564e6686601c9c9e to your computer and use it in GitHub Desktop.
ColorDataToMobileService
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
private async void lstColor_SelectionChanged(object sender, SelectionChangedEventArgs e) | |
{ | |
if (e.AddedItems.Count > 0) | |
{ | |
(Application.Current as App).CurrentColorItem = ((ColorItem)e.AddedItems[0]); | |
var Color = ((ColorItem)e.AddedItems[0]).Color; | |
SensorData item = new SensorData | |
{ | |
DeviceId = "PhoneEmulator", | |
SensorId = "ColorPicker", | |
EventType = "RGB", | |
EventData = string.Format("{0};{1};{2}", Color.R, Color.G, Color.B) | |
}; | |
await App.MobileService.GetTable<SensorData>().InsertAsync(item); | |
this.NavigationService.GoBack(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment