public override void Shot(string skinId) {
Prepare();
PrepareIni(CarId, skinId, ShowroomId);
_process = Process.Start(new ProcessStartInfo {
WorkingDirectory = AcRoot,
FileName = "acShowroom.exe",
Arguments = "pictureMode",
WindowStyle = ProcessWindowStyle.Hidden
});
if (_process == null) {
throw new Exception("Cannot start showroom");
}
_process.WaitForExit();
var filename = Path.Combine(FileUtils.GetCarSkinDirectory(AcRoot, CarId, skinId),
"preview_original.jpg");
if (_terminated) {
throw new ShotingCancelledException();
}
if (!File.Exists(filename)) {
throw new ProcessExitedException();
}
File.Move(filename, Path.Combine(OutputDirectory, skinId + ".bmp"));
}