تونستم بلاخره یه برنامه بنویسم که میاد CMD رو راه اندازی می کنه و از طریق اون متصل میشه به کامپایلر و بعد برنامه ای که بهش آدرس دادم رو کامپایل می کنه
string path = @"cd /d E:\SAEED\amuzesh\C#\WPF PROJECT\MyIDE\MinGW\bin";
string arguments = "g++ -o test test.cpp";
Process myProcess = new Process();
//{
//ProcessStartInfo info = new ProcessStartInfo(path);
myProcess.StartInfo.FileName = @"C:\Windows\System32\cmd.exe";
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.RedirectStandardInput = true;
myProcess.StartInfo.UseShellExecute = false;
//myProcess.Start();
try { myProcess.Start(); }
catch (Exception ex)
{
textBox.Text=ex.ToString();
return;
}
StreamWriter myStreamWriter = myProcess.StandardInput;
myStreamWriter.WriteLine(path);
myStreamWriter.WriteLine(arguments);
myStreamWriter.Close();
myProcess.WaitForExit();
Console.ReadLine();