/// <summary> /// Displays the tag HoloLens dialog. /// </summary> /// <returns>Task object used for tracking method completion.</returns> private async Task TagHoloLensAsync() { TagInformation tagInfo = new TagInformation(); tagInfo.Name = this.Name; float.TryParse(this.Ipd, out tagInfo.Ipd); ContentDialog dialog = new TagHoloLensDialog(tagInfo); ContentDialogResult result = await dialog.ShowAsync().AsTask <ContentDialogResult>();; // Primary button == "Ok" if (result == ContentDialogResult.Primary) { this.Name = tagInfo.Name; // Update the IPD on the HoloLens try { await this.holoLensMonitor.SetIpd(tagInfo.Ipd); } catch (Exception e) { this.StatusMessage = string.Format( "Unable to update the IPD - {0}", e.Message); } this.holoLensMonitorControl.NotifyTagChanged(); } }
/// <summary> /// Displays the tag HoloLens dialog. /// </summary> /// <returns>Task object used for tracking method completion.</returns> private async Task TagHoloLensAsync() { TagInformation tagInfo = new TagInformation(); tagInfo.Name = this.Name; ContentDialog dialog = new TagHoloLensDialog( this.holoLensMonitor.Address, tagInfo); ContentDialogResult result = await dialog.ShowAsync().AsTask <ContentDialogResult>();; // Primary button == "Ok" if (result == ContentDialogResult.Primary) { this.Name = tagInfo.Name; this.holoLensMonitorControl.NotifyTagChanged(); } }