开发者

How to create screen saver (having Constantly change able data based on subscriptions) in C#?

I need to create a 开发者_开发问答screen saver (a window that's continuously changing its contents) in C#.

The window will have to subscribe to a remote server over the web, which will update the window's contents based on subscriptions.

Do I need to implement Observer pattern for this, or some other mechanism?

I want to implement a FOREX trading application which will subscribe to some stream pricing server and get the updates of prices on the basis of subscriptions.

Windows needs to connect and subscribe to the pricing server first, based on the subscription the prices should be updated accordingly.

After clicking on some price an internet browser should be opened and should show the trading platform to place a trade over there.


You should use a pub-sub system like SignalR to have your server able to push updates to your clients without having to run a polling mechanism yourself.

SignalR has a great sample stock ticker that does this. It works with both web and Windows clients (.NET).

SignalR is open source on github, so you can inspect it as well to learn about how the implement and follow the Observer pattern.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜