我想在通过WAN运行的Windows应用程序上发送消息 [英] I Want to Give A Message On Windows Application Running Over WAN

查看:81
本文介绍了我想在通过WAN运行的Windows应用程序上发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





大家好



我有一个Windows应用程序在个人电脑上通过WAN网络运行

使用vb.net,wcf和Sql Server 2008 R2。



我想发出警报当前正在运行的每台电脑上的消息应用

'喜欢(12点以后不允许申请)'



所以有没有机制显示弹出消息。



请帮助



谢谢

解决方案

有很多方法可以做到这一点,但基本上只有两个你应该看一下:

1)在个人PC应用程序与之通信的中央服务器上使用应用程序 - Socket可能会这样做。如果连接丢失,PC应用程序将关闭。否则,服务器必须记下PC的本地时间并告诉它在适当的位置显示消息。讨厌,笨拙,容易让用户讨厌...

2)如你所述,使用PC应用程序中的计时器检查当地时间(或通过服务器的时间)。如果这种方法减慢了速度,那么您的计时器设置的频率太高,或者您需要将检查时间代码移动到BackgroundWorker任务中以防止它在检查时冻结UI执行。



我会使用计时器 - 这样如果服务器连接丢失,用户可以继续使用该应用程序直到当地时间到期。



Hi All

I have a windows Application which is run over WAN network on Individual PC
Using vb.net ,wcf and Sql Server 2008 R2 .

I want to give a alert message on every pc which is currently running Application
'like (Application is not Allowed after 12 pm )'

so is there any mechanism to display popup Message .

Please Help

Thanks

解决方案

There are ways to do this, but basically there are only two that you should look at:
1) Use an application on a central server that the individual PC apps communicate with - a Socket will probably do it. If the connection is lost, the PC app shuts down. Otherwise the server has to note the local time for the PC and tell it to display the message at the appropriate point. Nasty, clumsy, and prone to annoying users...
2) Use a timer in the PC app to check the local time (or time via a server) as you have described. If this method is slowing things down, then either your timer is set to much too high a frequency, or you need to move the "check the time" code into a BackgroundWorker task to prevent it "freezing" the UI while the check is being performed.

I'd go with the timer - that way if the server connection is lost, the user can continue to use the app until the local time expires.


这篇关于我想在通过WAN运行的Windows应用程序上发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆