public MainPage() { this.InitializeComponent(); roverWatcher = new RoverWatcher(roverBusAttachment); roverWatcher.Added += RoverWatcher_Added; roverWatcher.Start(); }
private async void RoverWatcher_Added(RoverWatcher sender, AllJoynServiceInfo args) { RoverJoinSessionResult joinSessionResult = await RoverConsumer.JoinSessionAsync(args, sender); if (joinSessionResult.Status == AllJoynStatus.Ok) { roverConsumer = joinSessionResult.Consumer; button1.IsEnabled = true; StopButton.IsEnabled = true; LeftButton.IsEnabled = true; RightButton.IsEnabled = true; Reverse.IsEnabled = true; Autonomous.IsEnabled = true; } }