Exemple #1
0
 public static void RunGame()
 {
     try {
         ConfigParser configParser = new ConfigParser();
         if (!configParser.ConfigIsValid(ConfigParser.Config))
         {
             configParser.SetConfig(ConfigParser.Config);
         }
         if (!System.IO.File.Exists(Path.Combine(GameFolder, "Client.lnk")))
         {
             WshShell wshShell = new WshShell();
             var      shortCut = wshShell.CreateShortcut(Path.Combine(GameFolder, "Client.lnk")) as IWshShortcut;
             shortCut.TargetPath       = Path.Combine(GameFolder, "Client.exe");
             shortCut.WorkingDirectory = GameFolder;
             shortCut.Save();
         }
         System.Diagnostics.Process.Start(Path.Combine(GameFolder, "Client.lnk"));
         new GameRunScript().Run();
     }
     catch (Exception) {
     }
 }