Пример #1
0
 /// <summary>
 /// Снимает и сохраняет скриншот в случае когда флаг
 /// CruciatusFactory.Settings.AutomaticScreenshotCapture равен true.
 /// </summary>
 public static void AutomaticScreenshotCaptureIfNeeded(this IScreenshoter screenshoter)
 {
     if (CruciatusFactory.Settings.AutomaticScreenshotCapture)
     {
         screenshoter.TakeScreenshot();
     }
 }
Пример #2
0
        public static void TakeScreenshot(this IScreenshoter screenshoter)
        {
            var timeStamp      = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss-fff");
            var screenshotPath = Path.Combine(CruciatusFactory.Settings.ScreenshotsPath, timeStamp + ".png");

            screenshoter.GetScreenshot().SaveAsFile(screenshotPath);
            CruciatusFactory.Logger.Info("Saved screenshot to '{0}' file.", Path.GetFullPath(screenshotPath));
        }