我已经为此苦苦挣扎了一个多月,但正在慢慢学习。这是我所拥有的:
包含 3 个项目的 C# 解决方案
-Universal Windows Platform App (Cortana Voice Support)
::Above just shows a floating PNG image and is Cortana enabled
-Universal Windows Service (Cortana Background Service)
::Needed for the Cortana Support
-.Net 4.5 C# App with HTML DOM Automation
::Automates locating elements and clicking of a website
我无法在通用应用程序中重新编码 .Net 应用程序的功能,因为它使用的某些库无法安装。 (GhostDriver、PhantomJS 和通过 NuGet 提供的 HotKey 库。在通用平台上安装所有 3 个库均失败)。
需要什么:
-Master Universal Windows App or Service sends signal to .Net App
-.Net App receives signal and calls method/function providing my functionality.
我从未尝试过在同一解决方案中调用其他应用程序中的方法,并且想知道是否有一些代码解决方法。我认为我需要的是一种进程间通信或事件的方法,但找不到任何 UWP 的示例。大多数是.Net 与其他较旧的非通用应用程序通信。
非常感谢!
最佳答案
如果我理解正确的话,您正在开发一个可以通过 Cortana 自动执行 DOM 操作的应用程序。
您需要将此应用程序提交到App Store吗?
如果没有,正如 Scott 所说,您可以使用 WCF 在 UWP 进程和 .NET 4.5 桌面应用进程之间进行通信。
关于c# - 如何在同一解决方案中将通用 Windows 应用程序与旧版 .Net 4.5 应用程序进行实时通信。工控机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33139904/