命令行参数和单实例WPF应用程序 [英] Command line arguments and single instance WPF application

查看:158
本文介绍了命令行参数和单实例WPF应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WPF应用程序我也经过重新设计,使用标签和是单实例。现在的新规定是,当用命令行选项启动和应用程序的一个实例已在运行 - 已在运行的实例,应根据CMDLINE选项打开一个新的标签,并做了一些工作。

the WPF app I have has been redesigned to use tabs and be single instance. The new requirement is now that when launched with command line options and an instance of the app is already running - the already running instance should open a new tab and do some work based on the cmdline options.

单个实例是没有概率 - 但如何通过CMD行参数从刚开始实例已经运行

the single instance is no prob - but how to pass the cmd line args from the just started instance the the already running?

感谢任何提示!

推荐答案

我将与任何一个插座解决方案处理这或只是有新的实例写命令行参数到由现有的实例检查,然后刷新文件

I would approach this with either a sockets solution or just have the new instance write the command line args to a file which is checked and then flushed by the existing instance.

这篇关于命令行参数和单实例WPF应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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