获取ClickOnce文件关联的路径 [英] Getting the path of a ClickOnce File Association

查看:64
本文介绍了获取ClickOnce文件关联的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ClickOnce,并且正在为文件关联而苦苦挣扎。我可以建立协会。双击关联文件甚至会启动应用程序。

I've using ClickOnce and I'm struggling with file associations. I can set up the association. Double-clicking an associated file even launches the application.

...但是...

我不不知道如何访问 单击文件的路径 以启动应用程序。

I don't know how to get access to the path of the file clicked to launch the App.

有人

推荐答案

.NET的官方方式(不带注册表)是查看

The official .NET way (w/o Registry) is to look at

启动后,AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData

AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData

。这是一个字符串[]

after startup. It is a string[]

这篇关于获取ClickOnce文件关联的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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