Example #1
0
 public TimerIdle(ITimer i_session_timer)
 {
     m_idle_dispatcher = new DispatcherTimer
     {
         Interval = TimeSpan.FromSeconds(1)
     };
     m_idle_dispatcher.Tick += TimerTick;
     m_session_timer = i_session_timer as TimerSession;
 }
        private void txtSizeLimit_TextChanged(object sender, TextChangedEventArgs e)
        {

            if (!m_sample_taken)
            {
                TimerSession timeSession = new TimerSession();
                m_sample_size = timeSession.SampleScreenShot();
                m_sample_taken = true;
            }

            if (txtSizeLimit.Text == "" || m_sample_size == 0) return;
            long estimation = (long.Parse(txtSizeLimit.Text) * 1000 * 1000) / m_sample_size;
            SizeLimitPopup.IsOpen = true;
            PopupLabel.Text = "Approx. no. of images: " + estimation;
        }