Click here to Skip to main content
15,867,704 members
Articles / Programming Languages / C#
Article

Desktop Bob - Instant CP notifications

Rate me:
Please Sign up or sign in to vote.
4.84/5 (38 votes)
26 Oct 20027 min read 326.7K   1.2K   138   91
A tool for acessing CodeProject and have instant notifications of Codeproject's posts

Desktop Bob

A tool for acessing CodeProject and have instant notifications of Codeproject's posts.

Say good bye to refreshing browser pages! Now you finally have a tool and can beat up Nishant posting rate!

With Desktop Bob, you can continue working and Bob will alert you on your systray when there's something new. Before I enter in more details, it is interesting to notice that Desktop Bob was developed on my free time and it's a tool to fit my needs. But I think most CPians may have interest on it.

I won't enter in boring details of how to use Desktop Bob, because it's so easy that all of you should be able to figure out how to install and use immediately. Instead, I will show you the main features of Desktop Bob and some of the design guidelines and decisions I made when developing it. It can be too a nice sample for .NET and C# begginers of a small size, real world application which shows how to:

  1. Use Web Services
  2. Asynchronous Web Services calling
  3. Systray Notifications
  4. Isolated Storage
  5. Saving/Reading user preferences
  6. Using the ListView
  7. Using Windows Forms Layout manager
  8. Creating a popup window like Messenger
  9. Using timers

Message Board Monitoring

Sample Image of DesktopBob

Desktop Bob will continuously monitor CodeProject's message boards. Here it is showing you some of the latest additions to CodeProject.

Quick Forum Access

Sample Image

Now, creating a new thread on a forum or opening a forum is just a click away!

Preferences and Filters

Sample Image
  1. You can choose whether you want to show Desktop Bob's window on single or double click.
  2. You can choose whether you want to popup notifications (Messenger style)
  3. You can choose a WAV file to be played for notifications. If you leave this field blank, Desktop Bob will be mute. I strongly suggest that you use the ALAdmin.wav that comes with ICQ. It's Bob's voice!
  4. You can filter messages on the Post monitor window:
    • All Messages
    • Message Board Messages plus Updated Articles ("Ignore Article Messages")
    • Only Message Board Messages

"New Post" Notification

Old-version style:

Sample ImageSample Image

On the left, we have the normal Desktop Bob's state: no new posts have been added to CP. It shows you the tooltip of Desktop Bob too. On the right, we have Bob with a balloon: this means something was added to Codeproject that interest you. Naturally, Bob will only alert you of filtered messages. So, if you are ignoring Articles, it won't notify you if a new article appears.

New Messenger-style notifications:

Sample Image

This version still only supports the taskbar in its default position, i.e., in the bottom of the screen. A future version will support the taskbar in any position. The number is the count of posts updated.

"New Post" follow-up

Sample Image

When there are new posts, they appear just like above, with an yellow background.

Signature Rotation Tool

If you provide Desktop Bob with a XML file containing your signatures, you can select "Random Signature" on the tray icon menu and Desktop Bob will put a random signature on your clipboard.

The format of the XML to be provided is:

XML
<signatures>
    <sig>This is a signature</sig>
    <sig>This is another signature</sig>
    <sig>This is yet another signature</sig>
</signatures>

There's a "validation feature" of the signature file on Desktop Bob: if you provide an invalid XML signature file, Desktop Bob crashes. Nothing serious, just correct the file and restart Desktop Bob. See "Intented Future Features" for more details.

Smart ClicketyTM

If you've been using Codeproject for some time, you already know what a Clickety is. You may be even have been caught by the Clickety Police. If not, a Clickety is one of those stylish links you'll find in the forums. Codeproject message editing already has a Clickety feature, but sometimes you want a Clickety with a different text, instead the default one. Editing a Clickety is a mess, specially for the not so simple URLs. Smart Clickety provides this. The URL should be in clipboard, and the resulting clickety is put on the clipboard, too. The resulting Clickety will look like this link[^]

HTMLizerTM

When you post some code, specially C++ code, sometimes you have some characters that don't go well with HTML, like &, < and >. The HTMLizer gets the contents of the clipboard, allows you to edit it and, if you click ok, put a HTML-friendly version on the clipboard for you. Really useful for posting code on forums. This way, it's fast to put code like this on articles and messages:

C#
if (clip != null)
{
    clip = clip.Replace("&", "&");
    clip = clip.Replace("<", "<");
    clip = clip.Replace(">", ">");
    Clipboard.SetDataObject(clip);
}

Design Decisions and Considerations

When developing Desktop Bob, I considered doing much more than this: It is easy creating some HTML scrapping code and create a really nice tool for accessing CP and give you a lot of power. I didn't ask Chris about this, but I can imagine the answer: this wouldn't be considered good behavior. Chris managed to build a nice web site for all of us and part (or most?) of his income comes from advertisers. If I were Chris, I wouldn't like someone doing a tool which lowered my income.

So, the main guideline for developing Desktop Bob is: every single CP interaction has to be made by using the WebService or by using the browser. This way, we do not interfere on CP normal functioning and continue being good guests. If Chris decides to extend the CodeProject's webservices, I would gladly extend this tool to accomplish more than it do by now.

Stability & Use of resources

This is a light .NET application. It was my first desktop .NET application and I can say I'm really impressed of how little impact on the system it can have, although the working set of the application seems to be quite big (20 Mb on Task Manager). I'm using it for days long and it does not appear to have any memory leaks, resource leaks or any other stability.

In an AMD Athlon 650 MHz, 256 Mb RAM, it did not affect the overall system performance noticeably. It seems quite stable, though it did not went through any formal stress test. After some days of continuous use, Task Manager shows a use of only 15 seconds of CPU. If you open the main CP page, you may spend more time.

Intended Future Features

Some ideas I have and/or some people suggested and which will be implemented when I have more free time:

  • A RSS browser for news feeds
  • A message editor with auto-preview and spell checking (using Word's spell checker)
  • Signature file validation
  • Signature file editor
  • A visible timer for updates on main window (maybe on a status bar?)
  • Improved filters
  • Creating a "how it works" article for beginners

Platforms Supported

I tested this program on Windows XP and Windows 2000. But I have reasons to believe it also runs on Windows 98/ME. If you successfully run it on these platforms, please leave me a note!

A tip

Desktop Bob will start browser instances for some of Codeproject's interactions. So, if you use Internet Explorer as your default browser, check if it is reusing browser windows, since this affects Desktop Bob behaviour when launching multiple Posts. On IE, go to Tools/Internet Options/Advanced and check/uncheck this option:

Sample Image

Changelog

  • 27/10 - Version 1.3. Added some clipboard manipulation tools: the HTMLizerTM, the Smart ClicketyTM and the signature rotation tool. Added the Changelog to the article, too.
  • 22/10 - Version 1.2. Bug fix when starting IE right after showing the new Messenger-style notification.
  • 20/10 - Version 1.1. Added support for sound notifications and Messenger-style notifications. Faster updates. The about box comes to the scene!
  • 12/10 - Initial Version

The standard disclaimer

As I said before, I tested this on my machine and it works fine. Use it at your own risk: if you use it, you can loose data, profit, have hardware problems, cause radioactive contamination and start a nuclear world war. But, for me, it works fine and never had a problem.

Well, the code in this article is free for you to use any way you want. If you improve it, drop me a note, so I can keep the code in sync. If you make money with this code, you are a genius! You deserve the money. Just remember to send me a "thank you" and give me some tips on money-making. I will not reject any money you send me too.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
CEO
Brazil Brazil
I develop software since I was 11. In the past 20 years, I developed software and used very different machines and languages, since Z80 based ones (ZX81, MSX) to mainframe computers. I still have passion for ASM, though no use for it anymore.
Professionally, I developed systems for managing very large databases, mainly on Sybase and SQL Server. Most of the solutions I write are for the financial market, focused on credit systems.
To date, I learned about 20 computer languages. As the moment, I'm in love with C# and the .NET framework, although I only can say I’m very proficient at C#, VB.NET(I’m not proud of this), T/SQL, C++ and libraries like ATL and STL.
I hate doing user interfaces, whether Web based or not, and I’m quite good at doing server side work and reusable components.
I’m the technical architect and one of the authors of Crivo, the most successful automated credit and risk assessment system available in Brazil.

Comments and Discussions

 
GeneralExcellent! Pin
Jörgen Sigvardsson13-Oct-02 10:36
Jörgen Sigvardsson13-Oct-02 10:36 
GeneralSweet! Pin
Paul Riley12-Oct-02 12:43
Paul Riley12-Oct-02 12:43 
GeneralRe: Sweet! Pin
Paul Riley12-Oct-02 13:21
Paul Riley12-Oct-02 13:21 
GeneralRe: Sweet! Pin
David Stone12-Oct-02 13:32
sitebuilderDavid Stone12-Oct-02 13:32 
GeneralRe: Sweet! Pin
Paul Riley12-Oct-02 14:11
Paul Riley12-Oct-02 14:11 
GeneralRe: Sweet! Pin
Daniel Turini12-Oct-02 13:58
Daniel Turini12-Oct-02 13:58 
GeneralRe: Sweet! Pin
Paul Riley12-Oct-02 14:15
Paul Riley12-Oct-02 14:15 
GeneralMy name :-) Pin
Uwe Keim12-Oct-02 11:35
sitebuilderUwe Keim12-Oct-02 11:35 
Hey cool, you picked my posting as the yellow-higlighted one. I like this example Big Grin | :-D

--
Scanned MSDN Mag ad with YOUR name: www.magerquark.de/misc/CodeProject.html
See me: www.magerquark.de
GeneralRe: My name :-) Pin
Daniel Turini12-Oct-02 13:59
Daniel Turini12-Oct-02 13:59 
GeneralRe: My name :-) Pin
Uwe Keim12-Oct-02 14:10
sitebuilderUwe Keim12-Oct-02 14:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.