开发者

Restart WPF Application

My application has many views and I am using an AutoLogoffHelper class which maintains the timer for the application. Due to inactivity if the timer is 0, it call the log off event (which is also in the A开发者_StackOverflowutoLogoffhelper class).

As of now I am using Application.shutdown to completely shutdown the Application.

But Is there a way to restart the application or delete navigation history and session information and navigate to login screen?

Thanks.


To restart you can use Process.Start and the command line args (which automatically contain the application's path):

Process.Start(Environment.GetCommandLineArgs()[0]);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜