Exemple #1
0
 public static AppLauncher.AppInfo Add(string exePath)
 {
     AppLauncher.AppInfo app = new AppLauncher.AppInfo()
     {
         应用名称    = System.IO.Path.GetFileName(exePath),
         ExeFile = exePath,
     };
     _AppInfo.Add(app);
     return(app);
 }
Exemple #2
0
 public static void Delete(AppLauncher.AppInfo app)
 {
     _AppInfo.Remove(app);
     SaveAppInfo();
     #region  除本地配置文件
     if (System.IO.Directory.Exists(app.DataPath))
     {
         System.IO.Directory.Delete(app.DataPath, true);
     }
     #endregion
 }
Exemple #3
0
 public static void StartApp(AppLauncher.AppInfo app)
 {
     System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(app.ExeFile);
     startInfo.WorkingDirectory = app.ExePath;
     System.Diagnostics.Process.Start(startInfo);
 }