应用程序重启 [英] Application Restarter
本文介绍了应用程序重启的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个Windows窗体应用程序(Restarter),该程序用于检查程序是否正在运行,如果未运行,则应重新启动该程序.目前,如果我选择一个程序并单击重新启动按钮,则该程序将被重新启动.现在,我想要的是一旦我的重新启动器应用程序启动,它将检查列表中的所有程序,如果它们已停止,则启动它们.所有要启动的程序都将在xml文件中.任何人都可以帮我提供示例代码或任何建议.信息和控制功能.您可以使用此句柄来初始化WaitHandle.
WaitHandle具有静态方法:
公共 静态 int WaitAny(
WaitHandle [] waitHandles
)
Process.Handle is a handle to a process that can be used as a parameter to many process-information and control functions. You can use this handle to initialize a WaitHandle.
WaitHandle has a static method:
public static int WaitAny( WaitHandle[] waitHandles )
See WaitAny[^] for more info on that method.
The WaitHandle will be signalled when a process terminates/exits.
Regards
Espen Harlinn
这篇关于应用程序重启的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文