protected override void OnNavigatedTo(NavigationEventArgs e) { streamDevice = e.Parameter as NvStreamDevice; if (streamDevice != null) { hostBox.Text = streamDevice.ServerInfo.HostName; } base.OnNavigatedTo(e); }
public static async Task <List <NvStreamDevice> > DiscoverStreamDevices(CryptoProvider cryptoProvider) { List <NvStreamDevice> streamDevices = new List <NvStreamDevice>(); IReadOnlyList <IZeroconfHost> results = await ZeroconfResolver.ResolveAsync(ZEROCONF_PROTOCOL); foreach (var result in results) { NvStreamDevice streamDevice = new NvStreamDevice(IPAddress.Parse(result.IPAddress), cryptoProvider); streamDevice.Online = true; await streamDevice.QueryDataInsecure(); streamDevices.Add(streamDevice); } return(streamDevices); }
private void StreamDevicesGridView_ItemClick(object sender, ItemClickEventArgs e) { NvStreamDevice streamDevice = e.ClickedItem as NvStreamDevice; Frame.Navigate(typeof(ApplicationsPage), streamDevice); }
private async Task GetItemsAsync() { StreamDevicesGridView.ItemsSource = StreamDevices; (await NvStreamDevice.DiscoverStreamDevices(CryptoProvider)).ForEach(StreamDevices.Add); }