简体   繁体   English

在WPF应用中运行网络浏览器?

[英]Running web browser inside WPF app?

I have a WPF application that interacts with audio hardware on the machine that I am looking to add new features to. 我有一个WPF应用程序,可以与要添加新功能的计算机上的音频硬件进行交互。 A lot of the features that I am looking to add (chat support, social networking, etc.) are all things that can be easily handled with AngularJS, SignalR, and other various web app tools. 我希望添加的许多功能(聊天支持,社交网络等)都是可以使用AngularJS,SignalR和其他各种Web应用程序工具轻松处理的所有功能。 I'm trying to figure out if I can program these features as a web app and can this inside my WPF app. 我试图弄清楚是否可以将这些功能编程为Web应用程序,并且可以在WPF应用程序中使用。 A few things need to happen: 需要发生一些事情:

  • User authenticates with website & receives ASP.net forms auth cookie 用户通过网站进行身份验证并接收ASP.net表单身份验证Cookie

  • User is taken to web app 用户被带到Web应用

  • Web app contains hyperlinks that are recognized by WPF app & allow the app to interact with audio hardware on the computer. Web应用程序包含WPF应用程序可以识别的超链接,并允许该应用程序与计算机上的音频硬件进行交互。

With Silverlight out of the picture I'm not sure if there's a better way to interact with hardware. 有了Silverlight,我不确定是否有更好的与硬件交互的方法。 Am I better off doing away with the whole 'web app' concept and build everything inside WPF? 我是否最好放弃整个“ Web应用程序”概念,并在WPF中构建所有内容? Eventually this will need to be cross platform, which also seems to favor the web app. 最终,这将需要跨平台,这似乎也有利于Web应用程序。

If you need to provide a web application (REST or more) distributed from/by your WPF application I can recommand you NancyFX which is easy to handle and to add features to fit you needs. 如果您需要提供一个从WPF应用程序分发或由WPF应用程序分发的Web应用程序(REST或更多),我可以建议您轻松处理NancyFX并添加适合您需要的功能。

You can that way create a HTTP listener to a port, and provide links that are related to that web service (and handle the correct behavior in the application). 您可以通过这种方式为端口创建HTTP侦听器,并提供与该Web服务相关的链接(并处理应用程序中的正确行为)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM