Example #1
0
 private void ManualScreenShotBtn_Click(object sender, RoutedEventArgs e)
 {
     if (saveLocationTxtBx.Text != string.Empty)
     {
         if (Directory.Exists(saveLocationTxtBx.Text))
         {
             if (fileNameTxt.Text != string.Empty)
             {
                 ScreenShot(fileNameTxt.Text, saveLocationTxtBx.Text);
                 ScreenShotAmount += 1;
                 SsAmount.Text     = ScreenShotAmount.ToString();
             }
             else
             {
                 fileNameTxt.Focus();
             }
         }
         else
         {
             MessageBox.Show("Save Location Invalid", "Invalid Directory", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
     }
     else
     {
         MessageBox.Show("Save Location Invalid", "Invalid Directory", MessageBoxButton.OK, MessageBoxImage.Exclamation);
     }
 }
Example #2
0
        private void ResetAllBtn_Click(object sender, RoutedEventArgs e)
        {
            //resets all Fields
            saveLocationTxtBx.Text = string.Empty;
            ScreenShotAmount       = 0;
            SsAmount.Text          = ScreenShotAmount.ToString();
            timeMins.Text          = string.Empty;
            timeSecs.Text          = string.Empty;
            fileNameTxt.Text       = string.Empty;

            dispatcherTimer.Stop();
            timeMins.IsEnabled          = true;
            timeSecs.IsEnabled          = true;
            fileNameTxt.IsEnabled       = true;
            saveLocationTxtBx.IsEnabled = true;
            Browse.IsEnabled            = true;
            AutoScreenShotBtn.Content   = "Start Auto Screenshots";
            AutoScreenShotBtn.Style     = (Style)FindResource("StartButton");
        }
Example #3
0
        private void dispatcherTimer_Tick(object sender, EventArgs e)
        {
            //UI Time
            decimal x = TotalSecs / 60;

            SstMins      = (int)Math.Truncate(x);
            SstSecs      = TotalSecs - (SstMins * 60);
            SsTimer.Text = ScreenShotTime;

            //The check if at 0 secs
            if (TotalSecs == 0)
            {
                ScreenShot(fileNameTxt.Text, saveLocationTxtBx.Text);
                ScreenShotAmount += 1;
                SsAmount.Text     = ScreenShotAmount.ToString();
                TotalSecs         = (SetMins * 60) + SetSecs;
            }
            else
            {
                TotalSecs -= 1;
            }
        }
Example #4
0
 private void ResetCountBtn_Click(object sender, RoutedEventArgs e)
 {
     ScreenShotAmount = 0;
     SsAmount.Text    = ScreenShotAmount.ToString();
 }