在“Project Centennial"中获取协议激活参数;应用程序 [英] Get protocol activation args in "Project Centennial" app

查看:22
本文介绍了在“Project Centennial"中获取协议激活参数;应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在转换为 UWP 应用的 Winforms 应用中访问协议激活参数?

How can I access the protocol activation arguments in a Winforms app that's converted into a UWP app?

问题是 OnActivated 方法不存在,所以我无法获得 IActivatedEventArgs.

The problem is that the OnActivated method is absent so I can't get the IActivatedEventArgs.

推荐答案

我假设您想要处理文件类型,在这种情况下,您可以正常检查 Environment.GetCommandLineArgs() 以获取参数.第二个参数是激活的文件或协议.

I'm assuming you want to handle file types in which case you can check Environment.GetCommandLineArgs() as normal for arguments. The second argument will be the file or protocol activated.

这篇关于在“Project Centennial"中获取协议激活参数;应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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