1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
private void button1_Click(object sender, EventArgs e)
{
nb = textBox1.ToString();
Process myApp = new Process() ;
myApp.StartInfo.FileName = "p:\\gmp\\isprem.exe" ;
myApp.StartInfo.Arguments = nb;
myApp.StartInfo.UseShellExecute = false;
myApp.StartInfo.RedirectStandardOutput = true;
myApp.Start();
output = myApp.StandardOutput.;
myApp.WaitForExit();
textBox1.Text = output.ToString();
if(output.ToString() == "1") {checkBox1.Checked = true; checkBox2.Checked=false; }
else{checkBox1.Checked = false; checkBox2.Checked=true;}
} |
Partager