« Return to Thread: Check Process state in an GUI app

Check Process state in an GUI app

by hellboy195 :: Rate this Message:

Reply to Author | View in Thread

hi,
I'm currently trying to write a very very simple front-end for ffmpeg with gtk#.
My Code looks like this:

First I check if a file already exits with File.Exits(path)
MessageDialog -> Overwrite YesNO.

Then the I start ffmpeg with Process.Start().
Then I want show a MessageDialog if the process finished so I did it like :

while(!proc.HasExited) {}
MessageDialog -> "Encoding finished";

This is working good but this causes some bugs. E.g: If I do Overwrite it "yes". The MessageDialog isn't destroyed until the process finished. If I delete this while {} it's working correct but the Message appears immediately and not after the process hast Finished. Using if is also not that good I suppose :/

Any solution? Thx in advance :)

 « Return to Thread: Check Process state in an GUI app