AoMDdtConverter.Form1.ImportDdt C# (CSharp) Method

ImportDdt() private method

private ImportDdt ( string input, string output, string importSettings ) : void
input string
output string
importSettings string
return void
        private void ImportDdt(string input, string output, string importSettings)
        {
            this.UpdateOutput(importSettings + Environment.NewLine);
            string arguments = importSettings + string.Format(" -i \"{0}\" -o \"{1}\"", input, output);

            Process process = new Process();

            process.StartInfo.FileName = Path.Combine(Application.StartupPath, "TextureCompiler.exe");
            process.StartInfo.Arguments = arguments;
            process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.Start();

            string stdoutput = process.StandardOutput.ReadToEnd();
            string stderror = process.StandardError.ReadToEnd();

            process.WaitForExit();
            this.UpdateProcessOutput(stdoutput, stderror);
        }