2 WPF应用程序之间的通信 [英] Communication between two WPF applications

查看:169
本文介绍了2 WPF应用程序之间的通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个WPF应用程序,我需要这两个应用程序能够相互通信。我只是需要这些应用程序的一些通知发送给对方,仅此而已。我已经发现了两个技术然而,一种是使用WCF,而另一个使用DDE。但对我来说这似乎太复杂了我的要求。请所说的其实是去这个最简单的方法是什么?我有什么其他选择?

I have two WPF applications, I need these two applications to be able to communicate with each other. I just need these applications to send some notifications to each other and nothing more. I have found two techniques yet, one is using WCF, and another is using DDE. But to me these seems too much complicated for my requirement. Please suggest what is the simplest way to go about this? What other options I have?

推荐答案

如果他们都在同一个网络(否则你需要移植盼着您使用的端口)上,你可以让他们之间的TCP连接,都需要一个的TCPListener和TCP客户端。这是很容易createre:这里是一个小的教程

If they are both on the same network(otherwise you need to port foward the port that you use), you could make a TCP connection between them, both need a TCPlistener and a TCP client. This is easy to createre: here is a small tutorial

这篇关于2 WPF应用程序之间的通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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