Since the users of this application usually dump very large database, i thought it would be nice to show a progress bar on screen. The problem is that i don't know how i can do it.
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = "mysqldump.exe"
Process process = Process.Start(psi);
while (!process.StandardOutput.EndOfStream)
{
(sender as BackgroundWorker).ReportProgress(// insert percentage here));
writer.Write((char)process.StandardOutput.Read());
}
process.WaitForExit();
writer.Close();
process.Close();
this is a piece of my code, and i would like to send to report progress my percentage.
I know that mysqldump has something like --show-progress-size, but that should show the progress inside the shell, and since i'm running mysqldump from codebehind of my WPF application, i don't know how can i get that.