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
public async Task ConnectAsync() | |
{ | |
_client = new TcpClient(); | |
await _client.ConnectAsync(_address, 5555); | |
_stream = _client.GetStream(); | |
// unlock the brick (doesn't actually need serial number?) | |
byte[] buff = Encoding.UTF8.GetBytes(UnlockCommand); | |
await _stream.WriteAsync(buff, 0, buff.Length); |
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 static DataRecognitionClient _dataClient; | |
static void Main() | |
{ | |
var mode = SpeechRecognitionMode.LongDictation; | |
var language = "en-US"; | |
var authenticationUri = "https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken"; | |
var crisSubscriptionKey = Config.CrisSubscriptionKey; | |
var crisUri = Config.CrisUri; |
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
readonly RadialController _controller; | |
public MediaPlayerPagePage() | |
{ | |
InitializeComponent(); | |
mpe.PosterSource = new BitmapImage(new Uri(DefaultPoster)); | |
mpe.Source = MediaSource.CreateFromUri(new Uri(DefaultSource)); | |
_controller = RadialController.CreateForCurrentView(); |
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
readonly RadialController _controller; | |
public MapPagePage() | |
{ | |
locationService = new LocationService(); | |
Center = new Geopoint(defaultPosition); | |
ZoomLevel = DefaultZoomLevel; | |
InitializeComponent(); | |
_controller = RadialController.CreateForCurrentView(); |
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
enum ControllerMode { zoom, rotate }; | |
ControllerMode _controllerMode; | |
readonly RadialController _controller; | |
public MapPagePage() | |
{ | |
locationService = new LocationService(); | |
Center = new Geopoint(defaultPosition); | |
ZoomLevel = DefaultZoomLevel; | |
InitializeComponent(); |
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 ReportVisitorsAsync(string pushUrl, int totalVisitors, int totalVisitorsIdentified, string centerName) | |
{ | |
var visitorsMeasurement = new | |
{ | |
TotalVisitors = totalVisitors, | |
TotalRecognizedVisitors = totalVisitorsIdentified, | |
timeStamp = DateTime.Now, | |
CenterName = centerName | |
}; | |
var jsonString = JsonConvert.SerializeObject(visitorsMeasurement); |