void myCalls_GetGuideFinished(object sender, EventArgs e) { Dispatcher.BeginInvoke(() => { alertTextBox.Visibility = System.Windows.Visibility.Collapsed; applicationPivot.Visibility = System.Windows.Visibility.Visible; foreach (Channel currentChannel in myCalls.Model.Channels.OrderBy(x => x.channelId)) { ItemViewModel myModel = new ItemViewModel(); myModel.ChannelString = currentChannel.channelId.ToString(); myModel.LineOne = currentChannel.callSign; myModel.LineTwo = currentChannel.networkName; // myModel.LineThree = currentChannel.callSign; myModel.IsHd = currentChannel.hd; //Image blah = new Image(); //blah.Source = new BitmapImage(new Uri("https://services.timewarnercable.com/imageserver/guide/YNNAT",UriKind.Absolute)); myModel.Type = currentChannel.logoUrl; channelListBoxComplete.Add(myModel); } if (displayOnlyHDChannels) { channelListBox.Items.Clear(); foreach (ItemViewModel currentItem in channelListBoxComplete.Cast<ItemViewModel>().Where(x=>x.IsHd == true)) { channelListBox.Items.Add(currentItem); } } else { channelListBox.Items.Clear(); foreach (ItemViewModel currentItem in channelListBoxComplete.Cast<ItemViewModel>()) { channelListBox.Items.Add(currentItem); } } channelListBox.UpdateLayout(); }); //ImageSource blahblah = new ImageSource(); streamingHelper.SetParameters(myCalls.Parameters); streamingHelper.GetStreamingChannels(myCalls.Model); string hold = ""; }
void myCalls_GetRecordingsFinished(object sender, EventArgs e) { Dispatcher.BeginInvoke(() => { if (myCalls.Model.Recordings != null) { foreach (Recording currentRecording in myCalls.Model.Recordings.OrderBy(x => x.description)) { ItemViewModel myModel = new ItemViewModel(); myModel.ChannelString = currentRecording.title; myModel.LineOne = currentRecording.description; myModel.LineTwo = currentRecording.episodeId; // myModel.LineThree = currentChannel.callSign; myModel.Type = null; //Image blah = new Image(); //blah.Source = new BitmapImage(new Uri("https://services.timewarnercable.com/imageserver/guide/YNNAT",UriKind.Absolute)); //https://services.timewarnercable.com/imageserver/program/EP015054650016?width=120&height=160 //myModel.Type = "https://services.timewarnercable.com/imageserver/program/" + currentRecording.episodeId;// +"?width=50&height=60"; dvrListBox.Items.Add(myModel); } } GetAllShowImages(); }); }