protected virtual void Prepare() {
if (_prepared) return;
_prepared = true;
if (AcRoot == null) throw new Exception("AcRoot is null");
if (CarId == null) throw new Exception("CarId is null");
if (ShowroomId == null) throw new Exception("ShowroomId is null");
if (!Directory.Exists(FileUtils.GetShowroomDirectory(AcRoot, ShowroomId))) {
throw new ShotingCancelledException("Showroom not found");
}
if (UseBmp) {
_changes.Add(new ScreenshotFormatChange(AcRoot, "BMP"));
}
if (DisableWatermark) {
_changes.Add(new DisableShowroomWatermarkChange(AcRoot));
}
if (DisableSweetFx) {
_changes.Add(new DisableSweetFxChange(AcRoot));
}
_changes.Add(new VideoIniChange(Filter, Fxaa, SpecialResolution, MaximizeVideoSettings));
if (TemporaryDirectory == null) {
TemporaryDirectory = Path.GetTempPath();
}
OutputDirectory = Path.Combine(TemporaryDirectory, "AcToolsShot_" + CarId + "_" + DateTime.Now.Ticks);
Directory.CreateDirectory(OutputDirectory);
}