如何在其他PC上举办活动? [英] How to raise an event on a other PC?

查看:108
本文介绍了如何在其他PC上举办活动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:

我有5台PC-s,其中一台是Base,另一台PC是客户端。所有设备都通过触摸控制。在基础PC上,我们发布了一份包含不同文章的订单。每台客户端PC都提供特定的文章集。通过从基本PC发布订单,每个客户端PC都可以看到它所服务的文章,如果完成部署,用户可以点击每篇文章。



作为数据库我们正在使用SQL Server。



当他们订购更多的奶酪汉堡时,它就像MC Donalds中的PC-s;)





我的解决方案:

我有一个5行的SQL表。每行代表一台PC,它有一个布尔值作为值。如果布尔值为真,则事件被激活并且我在基本PC上将文章标记为已完成,将布尔值保存为false。但是,每台PC上每2秒检查一次这些值会导致服务器崩溃。因此,我们需要比这更好的东西。



问题:

如何制作能够识别客户端PC何时拥有的事件文章完成后我可以在基本PC上标记它吗?实时。



是否有可以通过基本机器上的不同机器引发和识别的事件?

Problem:
I have 5 PC-s where one of them is a Base and the other PC-s are Clients. All devices are controled by touch. On the Base PC we release an order with diferent articles. Each Client PC serves a specific collection of articles. By releasing a Order from the Base PC every Client PC sees the articles it serves where the users can click on each article if it is finished for deployment.

As Database we are using a SQL Server.

It is something like the PC-s in MC Donalds when they order more chees burgers ;)


My solution:
I have a SQL table with 5 rows. Every row is representing a PC and it has a boolean as value. If the boolean value is true a "event is rased" and I mark the article on the Base PC as done an save the boolean value as false. But checking that values every 2 seconds on each PC is crashing the server after a wile. Because of that we need something better than that.

Question:
How can I make a event that recognises when a Client PC has a article finished so that I can mark it as done on the Base PC? In real time.

Are there events that can be raised and recognised trough diferent machines over a base machine?

推荐答案

这样的东西可能很有用:



服务器: https://msdn.microsoft.com/en-us/library/fx6588te(v = vs.110).aspx [ ^ ]



客户: https:// msdn。 microsoft.com/en-us/library/bew39x2a(v=vs.110).aspx [ ^ ]



我只需要时间来实现它应用程序。



更新:

套接字是正确的方法,但是常量连接不是一个好的id EA。所以使用UDP套接字现在是我在局域网环境中找到其他机器上的事件的最好方法。



在这个链接上是一个很好的例子如何使用它们: https://social.msdn.microsoft.com/Forums/en-US/92846ccb-fad3-469a-baf7-bb153ce2d82b/simple-udp-example-code?forum=netfxnetcom [ ^ ]



我添加到后台工作者的监听器,因此用户界面仍在工作,并且已完成:)
Something like this could be useful:

Server: https://msdn.microsoft.com/en-us/library/fx6588te(v=vs.110).aspx[^]

Client: https://msdn.microsoft.com/en-us/library/bew39x2a(v=vs.110).aspx[^]

I just need time to implement it to the application.

UPDATE:
Sockets are the right way but a constant connection is not a good idea. So using UDP Sockets is for now the best way I can find to rais a event on a other machine in a LAN environment.

On this link is a greate example of how to use them: https://social.msdn.microsoft.com/Forums/en-US/92846ccb-fad3-469a-baf7-bb153ce2d82b/simple-udp-example-code?forum=netfxnetcom[^]

The listener I added to a background worker so the UI is still working and it is done :)


这篇关于如何在其他PC上举办活动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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