public TimerManager() { m_dispatch_timer = new DispatcherTimer(); m_idle_timer = new DispatcherTimer(); m_screenshot_worker = new BackgroundWorker(); m_session = new SnapshotSession(); m_screenshot_worker.DoWork += ScreenshotWorker_DoWork; m_screenshot_worker.RunWorkerCompleted += ScreenshotWorker_RunWorkerCompleted; }
public TimerSession(MainWindow i_main_window) { m_session_dispatcher = new DispatcherTimer { Interval = SettingsManager.Instance.GetSnapshotSettings().GetFrequency() }; m_screenshot_worker = new BackgroundWorker(); m_screenshot_worker.WorkerSupportsCancellation = true; m_session = new SnapshotSession(); m_window = i_main_window; }
public void Dispose() { m_session = null; m_session_dispatcher = null; m_screenshot_worker.Dispose(); }
/// <summary> /// This method is used for estimating how many images the current resolution and size limit can support /// by taking sample screenshot /// </summary> /// <returns>Returns the size of the sample image taken.</returns> public long SampleScreenShot() { var sampleSession = new SnapshotSession(); sampleSession.CaptureScreen(true); return sampleSession.GetCurrentTotalSize(); }
public long SampleScreenShot() { SnapshotSession sample_session = new SnapshotSession(); return sample_session.CaptureScreen(); }