开发者

Restart WPF Application

开发者 https://www.devze.com 2023-03-22 03:08 出处:网络
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 t

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

精彩评论

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