void BtnGameClick(object sender, EventArgs ea) { string path = PathHelper.Combine(Config.GamePath, "Vindictus.exe"); string arg = " -stage -dev -lang " + Config.GameCode + " -noupdate -localized"; var process = new Process(); process.StartInfo.FileName = path; process.StartInfo.WorkingDirectory = Path.GetDirectoryName(path); //设定程式执行参数 // process.StartInfo.UseShellExecute = false; // process.StartInfo.CreateNoWindow = true; process.StartInfo.Arguments = arg; try{ process.Start(); Keys.F10 Pid = process.Id; this.WindowState = FormWindowState.Minimized; }catch (Exception e) { this.Error("启动游戏失败。\n" + (path + " " + arg) + "\n" + e); } if ((int)Config.ClientPriority > 0) { try{ process.PriorityClass = Config.ClientPriority; }catch { } } }
new Key(Keys.F10, VirtualKeyCode.F10, "F10", "F10"),