This again?

Windows Central Podcast 37: Windows 10 Mobile is still dead

Redefining the PC

Why Microsoft's Surface phone could be MUCH more than a mere 'phone'

Surface Pwn 5

Surface Pro 5, Project NEON details leaked on LinkedIn?

XP-YESSSSSSS

Dell's already awesome XPS 15 gets even better in 2017

Surface table meets Windows 10

Yes, we did put Windows 10 on the original Surface table ... and it rocks

Cream o' the crop

Before buying a Microsoft laptop, check out our pick for the absolute best

Simple and secure, just the way I like it

We think Windows 10 Cloud is a great idea, here's why

uber micro

Halo Wars 2 has something for everyone. Here's our full review.

Oldie but goldie

We reviewed Microsoft's decade-old Surface table

Creators Update comin' at ya

These are the coolest new features in the next big Xbox One update (video)

Buyer's guide

The Razer Blade 14 is the best laptop Razer has to offer

Windows 10 app gems

10 terrific Windows 10 apps you should be using

Tower of power

Here's what we think of Dell's XPS Tower Special Edition

Quite a deal

Grab the complete C# coding bootcamp for $41!

Your go-to laptop guide

Introducing our ultimate laptop buyer's guide

Listen here

Attn Android and iPhone users: What you need to know about Windows phone

Old is new?

The original Surface Pro still holds its own in the 2-in-1 world

Xbox Greenlight?

No, internet, Microsoft isn't opening Xbox to all UWP games

Falling in love

HP Envy 34 review: An ultrawide curved all-in-one after my heart

2015 machine in 2017?

Surface 3 still holds its own in 2017

< >
Welcome to the Windows Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 2 of 2
  1. Daniel Ratcliffe's Avatar
    Retired Moderator

    Posts
    3,046 Posts
    Global Posts
    4,703 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
       #1  
    Hey guys, as part of my app, I am wanting to pull in information about things like the on-air DJ, the currently playing song, etc. Now, my station manager has provided a plain text HTML page for displaying the data (eg the artist bio can be found here http://1radio.org/listen/bio.html). My question is, how can I import that into the phone with it sticking to the themes. So it appears on the Listen Panorama control that I have set up within my app, which follows the phone's theming (I use a dark theme with magenta accent so white or magenta text with font Segoe WP on a black background for me, however your themes may cause different results). I also want it to re-poll the data every ten seconds so as to always show the latest data. Note: there are zero APIs available for me to do this. I am having to use workarounds to achieve this.
  2. theomodsim's Avatar
    Developer

    Posts
    56 Posts
    Global Posts
    146 Global Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #2  
    Create a method that contains the logic that you want to execute on the fixed interval. In your case, you'll want to:
    1. Download the required HTML pages (you can use WebClient.DownloadStringAsync Method (System.Net) to download the content of each page)
    2. Parse the required HTML pages (I'd recommend using Html Agility Pack - Home for this; The HTML Agility Pack exposes the contents of HTML pages as XML-like documents so it's much easier to work with and less error-prone).
    3. Update the GUI with the updated data (either set up data binding beforehand and update the properties of the bound object accordingly, or update the GUI directly)


    To have the UI update every 10 seconds, check out the DispatcherTimer Class (System.Windows.Threading) class. With that class you can specify the time interval (in your case, 10 seconds) between executions of the code you want to execute. Then set the Tick event handler to call the method that you wrote to fetch the pages.

Similar Threads

  1. Help. Lost important text message
    By mjgates in forum Windows Phone 7
    Replies: 2
    Last Post: 09-03-2012, 12:11 AM
  2. Texts with attachments.
    By mbranscum in forum Nokia Lumia 900
    Replies: 6
    Last Post: 07-02-2012, 12:33 PM
  3. Error sending text with MMS pic?
    By pdawg17 in forum Windows Phone 7
    Replies: 8
    Last Post: 10-29-2011, 07:09 AM
  4. Texting with numpad on HTC Trophy
    By justletmesignup in forum HTC Trophy
    Replies: 2
    Last Post: 10-24-2011, 11:33 AM

Posting Permissions

";