Esempio n. 1
0
        public bool Launch()
        {
            NativeConfig config = new NativeConfig
            {
                ProfilingMode    = ProfilerMode.Sampling,
                ListenPort       = ListenPort,
                SamplingInterval = SamplingInterval,
                CounterInterval  = 1000
            };

            string configString = config.CreateString();
            string argStr       = Executable + " " + Arguments;
            var    psi          = new ProcessStartInfo("Backends\\SlimTuneNative_x86.exe", argStr);

            LauncherCommon.SetProcessOptions(psi, configString, string.Empty, false);
            psi.WorkingDirectory = string.IsNullOrEmpty(WorkingDir) ?
                                   Path.GetDirectoryName(Executable) : WorkingDir;

            try
            {
                Process.Start(psi);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Launch Error");
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
		public bool Launch()
		{
			NativeConfig config = new NativeConfig
			{
				ProfilingMode = ProfilerMode.Sampling,
				ListenPort = ListenPort,
				SamplingInterval = SamplingInterval,
				CounterInterval = 1000
			};

			string configString = config.CreateString();
			string argStr = Executable + " " + Arguments;
			var psi = new ProcessStartInfo("Backends\\SlimTuneNative_x86.exe", argStr);
			LauncherCommon.SetProcessOptions(psi, configString, string.Empty, false);
			psi.WorkingDirectory = string.IsNullOrEmpty(WorkingDir) ?
				Path.GetDirectoryName(Executable) : WorkingDir;

			try
			{
				Process.Start(psi);
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message, "Launch Error");
				return false;
			}

			return true;
		}