Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public void Dispose()
 {
     m_session = null;
     m_session_dispatcher = null;
     m_screenshot_worker.Dispose();
 }
Exemplo n.º 4
0
 /// <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();
 }
Exemplo n.º 5
0
 public long SampleScreenShot()
 {
     SnapshotSession sample_session = new SnapshotSession();
     return sample_session.CaptureScreen();
 }