Model.AppManagerComponent.StartProcess C# (CSharp) Méthode

StartProcess() private méthode

private StartProcess ( int appId ) : void
appId int
Résultat void
		private void StartProcess(int appId)
		{
			OptionComponent optionComponent = Game.Scene.GetComponent<OptionComponent>();
			StartConfigComponent startConfigComponent = Game.Scene.GetComponent<StartConfigComponent>();
			string configFile = optionComponent.Options.Config;
			StartConfig startConfig = startConfigComponent.Get(appId);
#if __MonoCS__
			const string exe = @"mono";
			string arguments = $"--debug App.exe --appId={startConfig.AppId} --appType={startConfig.AppType} --config={configFile}";
#else
			const string exe = @"App.exe";
			string arguments = $"--appId={startConfig.AppId} --appType={startConfig.AppType} --config={configFile}";
#endif

			Log.Info($"{exe} {arguments}");
			try
			{
				ProcessStartInfo info = new ProcessStartInfo { FileName = exe, Arguments = arguments, CreateNoWindow = true, UseShellExecute = true };

				Process process = Process.Start(info);
				this.processes.Add(startConfig.AppId, process);
			}
			catch (Exception e)
			{
				Log.Error(e.ToString());
			}
		}