RSS Ticker

Soldato
Joined
26 Dec 2003
Posts
16,522
Location
London
Spent yesterday afternoon writing this since I still hadn't played with some of the features in .NET 2.0:

screenshot.png


screenshot2.png


Automatically downloads headlines from Google News every 5 minutes and displays them in a ticker format that's rewindable, pausable and fast-forwardable. You can customise the RSS feed it displays and the time limit between "ticks" by editing the .config file, but I'm going to write a little options dialogue for it too.

Download

(Requires version 2.0 of the .NET framework, which you can get here if you don't have it already)

Tell me what you think!
 
Last edited:
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
Quite a nice little app there, very neat :)

One thing I noticed, though, is that you can maximise it if you double click on the title bar, or by right clicking on it on the taskbar.

Also, HTML special characters aren't converted, so you end up with things like & #39;West Wing& #39; finale... (put spaces in there to prevent the forum from converting them)

edit: It doesn't seem to like Slashdot's RSS feed. Which RSS versions does it support?
 
Last edited:
Soldato
OP
Joined
26 Dec 2003
Posts
16,522
Location
London
Oh dearie me I shall hop on those right away!

Does .NET have anything in-built to convert HTML entities? I would've thought it would given its wealth of XML functions but I'll have a look.
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
Not entirely sure, but it would be pretty easy to do yourself. Just strip the &# and ; away, then convert the remaining number into a character. Of course, if you come accross things like & then it gets more tricky :p
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
Other than downloading some kind of third party library or writing your own conversion table, then I can't see how you'd do it :confused:

Edit: found another bug; clicking on any of the buttons on the tool strip toggles the Always On Top button :p

Edit 2: and another :o
If it can't load the feed, then clicking on the bar where the feed entry would normall be results in an unhandled exception! Should have a bottom level exception catching mecanism there :)
 
Last edited:
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
Just had a quick look a the code... you appear to be toggling the TopMost property of the form whenever any toolstrip button is clicked... did you mean to do that? :confused:

edit: nevermind, was looking at old source code :p
 
Last edited:
Soldato
OP
Joined
26 Dec 2003
Posts
16,522
Location
London
Inquisitor said:
Just had a quick look a the code... you appear to be toggling the TopMost property of the form whenever any toolstrip button is clicked... did you mean to do that? :confused:

edit: nevermind, was looking at old source code :p

Yah that was the accident that caused it :k
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
A quick note: as a general rule, all IDisposable objects should be Dispose()d of when you've finished using them, which is best done with a using block:
Code:
using (WebClient client = new WebClient())
{
    // stuff here
}
Otherwise, you could potentially end up with a memory leak as IDisposable objects tend to be memory hogs.

Also, encapsulate your fields! ;)
 
Soldato
OP
Joined
26 Dec 2003
Posts
16,522
Location
London
Inquisitor said:
A quick note: as a general rule, all IDisposable objects should be Dispose()d of when you've finished using them, which is best done with a using block:
Code:
using (WebClient client = new WebClient())
{
    // stuff here
}
Otherwise, you could potentially end up with a memory leak as IDisposable objects tend to be memory hogs.

kk :cool:

Inquisitor said:
Also, encapsulate your fields :)

Yah I'm rubbish at organising stuff in terms of layout within a class :o

More tips please, I don't get to flex my C# muscles enough so I miss quite a bit of the best-practices stuff!
 
Soldato
Joined
12 Apr 2004
Posts
11,788
Location
Somewhere
A little suggestion for the control you're using there...
If you want to get rid of the dotted border around the current item, then you can just set the selection mode to none, and use the TopIndex property of the listbox to set the top most visible item, and hence scroll up and down. That's just being picky though :p
 
Soldato
Joined
12 Jun 2005
Posts
5,361
Slightly OT:

If anyone is thinking, good idea, i would like to try something like that and fancy doing something differnt.

For people that have rubbish PC's we need to close all our antivirus and other serivces before going into a game. If there was a program out there where you could choose the process' you wanted to shutdown when u wanted to load and game and save that to a config file. Then you could have like a drop down box to choose which game you wanted. and then you click run game....it would close all the programs and open the game and then minimizes to taskbar.

And then when you have finished gaming you could click on the icon in the taskbar and click a button and it would open all those programs up again.

A sort of Game Loader....

anywho....I think it would be a good idea
 
Back
Top Bottom