WPF应用程序如何重启当前的Application
2024-10-02 01:33:00
// Restart current process Method 1
System.Windows.Forms.Application.Restart();
Application.Current.Shutdown(); // Restart current process Method 2
System.Reflection.Assembly.GetEntryAssembly();
string startpath = System.IO.Directory.GetCurrentDirectory();
System.Diagnostics.Process.Start(startpath + “\\xxx.exe”);
Application.Current.Shutdown(); // Restart current process Method 3
Process p = new Process();
p.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory + “xxx.exe”;
p.StartInfo.UseShellExecute = false;
p.Start();
Application.Current.Shutdown();
最新文章
- Java transient 关键字
- Cocos2d-x 3.X 事件分发机制
- 感知机的对偶形式——python3实现
- ubuntu 14.04 LTS 安装ss客户端
- [转]Android的Handler总结
- JSON返回的自定义
- IT全称
- redis 基本使用
- jsonp总结
- 【NOIP2016提高组】蚯蚓
- 获取redis主从复制链SHELL脚本
- three.js 使用DragControls.js 拖动元素
- APP压力稳定性测试之monkey入门
- 《Java大学教程》—第18章 高级图形编程
- redis(三)
- Qt编写自定义控件9-导航按钮控件
- 介绍一款jquery ui组件gijgo(含tree树状结构、grid表格),特点:简易、文档全清晰易懂、示例代码
- MySQL参数文件及参数修改方法
- python导入模块总结与分析
- Linux云主机 监控方案浅析
热门文章
- nopCommerce 3.9 接口笔记
- JAVA中String类的intern()方法的作用
- Dll注入技术之消息钩子
- nodebb中文社区
- android:layout_gravity和android:gravity属性的差别
- Light libraries是一组通用的C基础库,目标是为减少重复造轮子而写(全部用POSIX C实现)
- VS版本 与 .NET版本以及C#版本之间的关系
- Oracle主键(Primary Key)使用详细的说明
- Mac的GUI哲学
- Java10 新特性