通过配置文件启动应用 [英] Launch app through Config file

查看:184
本文介绍了通过配置文件启动应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将我的应用程序关联到某个文件扩展名和
当我双击具有该扩展名的任何文件时,启动程序
(.ccon或其他).

但是,当我双击具有该扩展名的任何文件时,我的应用程序将加载,而不会读取已打开的文件.

我的应用程序可以在任何地方看到它是从app.exe还是具有正确扩展名的文件启动的?

我只需要一些指针即可找到我的问题的完整解决方案.
我希望这已经足够清楚了.

I can make my application associated to a certain file extension and
start the program when i double click any file with that extension
(.ccon or whatever).

BUT,when i double click any file with that extension my application loads without reading from the file that has been opened.

Is there anywhere that my application can see if it was started from the app.exe or a file with right extension?

I just need some pointers where to look not a complete solution to my problem.
I hope this is clear enough.

推荐答案

在您的Program.cs文件中查找:文件名是通过参数"args"传递给Main函数的.
Look in your Program.cs file: the file names are handed to you via the parameter "args" to the Main function.


这篇关于通过配置文件启动应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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