Skip to content

Commit 86411b4

Browse files
committed
2.5.1.2 - Restored the ability to use milliseconds for the screen capture interval. Fixed bug with schedules that were supposed to override the main interval so that they now actually do override the main interval. Fixed cosmetic issue with Preview button. Fixed cosmetic issue with Screen Capture Status when Optimize Screen Capture was enabled. Command Deck now shows percentage of tolerance when Optimize Screen Capture is enabled.
1 parent af58a90 commit 86411b4

20 files changed

+194
-67
lines changed

AutoScreenCaptureSetup/AutoScreenCaptureSetup.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@
259259
{
260260
"Name" = "8:Microsoft Visual Studio"
261261
"ProductName" = "8:Auto Screen Capture"
262-
"ProductCode" = "8:{00ED60B4-07EA-4D71-ABB8-88BA4453AEBE}"
263-
"PackageCode" = "8:{C275A584-CABB-4884-B222-8A04AE33B503}"
262+
"ProductCode" = "8:{B63F8A9E-4BF8-4EB5-967C-1D69DF79D01C}"
263+
"PackageCode" = "8:{9095ADEE-039C-4C1F-B89C-4B119B9B9EC5}"
264264
"UpgradeCode" = "8:{6B29B7BC-0101-4495-B28C-26B6D3CDCC02}"
265265
"AspNetVersion" = "8:4.0.30319.0"
266266
"RestartWWWService" = "11:FALSE"
267267
"RemovePreviousVersions" = "11:TRUE"
268268
"DetectNewerInstalledVersion" = "11:TRUE"
269269
"InstallAllUsers" = "11:TRUE"
270-
"ProductVersion" = "8:2.5.11"
270+
"ProductVersion" = "8:2.5.12"
271271
"Manufacturer" = "8:Gavin Kendall"
272272
"ARPHELPTELEPHONE" = "8:"
273273
"ARPHELPLINK" = "8:https://sourceforge.net/p/autoscreen/tickets/"

DataConvert.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ public DataConvert()
3636
}
3737

3838
/// <summary>
39-
/// Converts the given hours, minutes, and seconds into an aggregate milliseconds value.
39+
/// Converts the given hours, minutes, seconds, and milliseconds into an aggregate milliseconds value.
4040
/// </summary>
4141
/// <param name="hours">The number of hours to be converted.</param>
4242
/// <param name="minutes">The number of minutes to be converted.</param>
4343
/// <param name="seconds">The number of seconds to be converted.</param>
44-
/// <returns>An integer representing milliseconds.</returns>
45-
public int ConvertIntoMilliseconds(int hours, int minutes, int seconds)
44+
/// <param name="milliseconds">The number of milliseconds to be converted.</param>
45+
/// <returns></returns>
46+
public int ConvertIntoMilliseconds(int hours, int minutes, int seconds, int milliseconds)
4647
{
47-
return 1000 * (hours * 3600 + minutes * 60 + seconds);
48+
return 1000 * (hours * 3600 + minutes * 60 + seconds) + milliseconds;
4849
}
4950

5051
/// <summary>

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.5.1.1")]
36-
[assembly: AssemblyFileVersion("2.5.1.1")]
35+
[assembly: AssemblyVersion("2.5.1.2")]
36+
[assembly: AssemblyFileVersion("2.5.1.2")]
3737
[assembly: NeutralResourcesLanguageAttribute("en-CA")]

app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<assemblyIdentity
44
type="win32"
55
name="GavinKendall.AutoScreenCapture"
6-
version="2.5.1.1"/>
6+
version="2.5.1.2"/>
77
<asmv3:application>
88
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
99
<dpiAware>True/PM</dpiAware>

autoscreen.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# The version of Auto Screen Capture that this configuration file is intended for.
3030
# Be careful if you change the version number and don't provide the correct definitions for the specific version
3131
# as some settings will only work with certain versions of the application. Versioning of the configuration file starts with Auto Screen Capture 2.5.0.0 ("Limoncello").
32-
Version=2.5.1.1
32+
Version=2.5.1.2
3333

3434
# Starting with version 2.5.0.0 the entire configuration file defines all the default application and user settings
3535
# that were previously hard-coded within the application itself. Now you have the ability to define all of the default settings in a single file!

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Auto Screen Capture by Gavin Kendall
22

3+
2.5.1.2 Restored the ability to use milliseconds for the screen capture interval. Fixed bug with schedules that were supposed to override the main interval so that they now actually do override the main interval. Fixed cosmetic issue with Preview button. Fixed cosmetic issue with Screen Capture Status when Optimize Screen Capture was enabled. Command Deck now shows percentage of tolerance when Optimize Screen Capture is enabled.
34
2.5.1.1 Fixed issue with One Time screen capture.
45
2.5.1.0 Fixed issues with the SFTP client and failed screenshot uploads to an SFTP server. A null reference exception error would be thrown during a series of attempts in uploading screenshots that previously failed to upload causing the user to exit the application and start the application again (thereby voiding the failed upload process). It was also discovered that, when screenshots that had previously failed to upload, would upload successfully later (after establishing a successful connection with the SFTP server) the screenshots would be uploaded to the incorrect location. They would be uploaded based on the Folder path and the Macro path instead of simply the Macro path (as they usually do upon successful upload). Now screenshots that previously failed to upload will be uploaded based on the Macro path to keep it consistent with how sucessfully uploaded screenshots are handled.
56
2.5.0.9 Fixed bug if you opened the application without having Dashboard as your selected tab view on startup.

help/changelog.rtf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10225,8 +10225,7 @@ e7fff7e7ffffe7fff7e700040000002701ffff030000000000
1022510225
\pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-360\li720\sa200\sl276\slmult1\cf1\f1\fs19\lang1033 Schedules have scope! This means schedules can take screenshots of individual screens and/or regions instead of all screens and regions (which is still an option)\par
1022610226
{\pntext\f3\'B7\tab}Schedules have their own intervals that run independently from the main interval, but can still control the main interval if needed\par
1022710227
{\pntext\f3\'B7\tab}Multiple schedules can overlap their scheduled time ranges\par
10228-
{\pntext\f3\'B7\tab}Interval no longer uses milliseconds for performance reasons. The -interval command no longer uses milliseconds (-interval=hh:mm:ss should be used going forward) but can still parse the milliseconds part of the command for the purpose of backwards compatibility with older versions of the application so -interval=hh:mm:ss.nnn will still work even though only hours, minutes, and seconds will be used; milliseconds will be ignored\par
10229-
{\pntext\f3\'B7\tab}Schedules no longer use seconds for their One Time and Period options; again this is for performance reasons. Similarly the -captureat, -startat, and -stopat commands no longer require seconds to be defined (but still have their seconds part parsed to maintain backwards compatibility with older versions of the application)\par
10228+
{\pntext\f3\'B7\tab}Schedules no longer use seconds for their One Time and Period options; this is for performance reasons. Similarly the -captureat, -startat, and -stopat commands no longer require seconds to be defined (but still have their seconds part parsed to maintain backwards compatibility with older versions of the application)\par
1023010229
{\pntext\f3\'B7\tab}Module items in module lists have their textbox fields background colour set as a light yellow instead of the standard control grey for easier reading of titles\par
1023110230
{\pntext\f3\'B7\tab}Any module item titles that exceed 20 characters show in a tool tip so you can hover over a long title and read the full title\par
1023210231
{\pntext\f3\'B7\tab}Rewrote the code for hiding the application on startup so it hides better than before (especially if using the -hide command)\par

interface/main/FormMain-CommandLine.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,16 +582,18 @@ private void ParseCommandLineArguments(string[] args)
582582
}
583583
}
584584

585-
// -interval=hh:mm:ss
585+
// -interval=hh:mm:ss.nnn (milliseconds (.nnn) are optional)
586586
if (Regex.IsMatch(arg, REGEX_COMMAND_LINE_INTERVAL))
587587
{
588588
int hours = Convert.ToInt32(Regex.Match(arg, REGEX_COMMAND_LINE_INTERVAL).Groups["Hours"].Value);
589589
int minutes = Convert.ToInt32(Regex.Match(arg, REGEX_COMMAND_LINE_INTERVAL).Groups["Minutes"].Value);
590590
int seconds = Convert.ToInt32(Regex.Match(arg, REGEX_COMMAND_LINE_INTERVAL).Groups["Seconds"].Value);
591+
int milliseconds = Convert.ToInt32(Regex.Match(arg, REGEX_COMMAND_LINE_INTERVAL).Groups["Milliseconds"].Value);
591592

592593
_formSetup.numericUpDownHoursInterval.Value = hours;
593594
_formSetup.numericUpDownMinutesInterval.Value = minutes;
594595
_formSetup.numericUpDownSecondsInterval.Value = seconds;
596+
_formSetup.numericUpDownMillisecondsInterval.Value = milliseconds;
595597

596598
int screenCaptureInterval = GetScreenCaptureInterval();
597599

interface/main/FormMain-Convert.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ namespace AutoScreenCapture
2626
public partial class FormMain : Form
2727
{
2828
/// <summary>
29-
/// Converts the given hours, minutes, and seconds into an aggregate milliseconds value.
29+
/// Converts the given hours, minutes, seconds, and milliseconds into an aggregate milliseconds value.
3030
/// </summary>
3131
/// <param name="hours">The number of hours to be converted.</param>
3232
/// <param name="minutes">The number of minutes to be converted.</param>
3333
/// <param name="seconds">The number of seconds to be converted.</param>
34+
/// <param name="milliseconds">The number of milliseconds to be converted.</param>
3435
/// <returns>An integer representing milliseconds.</returns>
35-
private int ConvertIntoMilliseconds(int hours, int minutes, int seconds)
36+
private int ConvertIntoMilliseconds(int hours, int minutes, int seconds, int milliseconds)
3637
{
37-
return _dataConvert.ConvertIntoMilliseconds(hours, minutes, seconds);
38+
return _dataConvert.ConvertIntoMilliseconds(hours, minutes, seconds, milliseconds);
3839
}
3940

4041
/// <summary>

interface/main/FormMain-Schedules.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,25 @@ private void timerScheduleCheck_Tick(object sender, EventArgs e)
103103
if ((dtNow.Hour == schedule.StartAt.Hour) &&
104104
(dtNow.Minute == schedule.StartAt.Minute))
105105
{
106+
// Set the main interval with the schedule's interval.
107+
decimal screenCaptureIntervalHours = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Hours);
108+
decimal screenCaptureIntervalMinutes = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Minutes);
109+
decimal screenCaptureIntervalSeconds = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Seconds);
110+
decimal screenCaptureIntervalMilliseconds = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Milliseconds);
111+
112+
_formSetup.numericUpDownHoursInterval.Value = screenCaptureIntervalHours;
113+
_formSetup.numericUpDownMinutesInterval.Value = screenCaptureIntervalMinutes;
114+
_formSetup.numericUpDownSecondsInterval.Value = screenCaptureIntervalSeconds;
115+
_formSetup.numericUpDownMillisecondsInterval.Value = screenCaptureIntervalMilliseconds;
116+
117+
// Start the main timer.
106118
StartScreenCapture(schedule.ScreenCaptureInterval, schedule.Scope);
107119
}
108120

109121
if ((dtNow.Hour == schedule.StopAt.Hour) &&
110122
(dtNow.Minute == schedule.StopAt.Minute))
111123
{
124+
// Stop the main timer.
112125
StopScreenCapture();
113126
}
114127
}
@@ -168,7 +181,7 @@ private void addSchedule_Click(object sender, EventArgs e)
168181
_formSchedule.ScheduleObject = null;
169182

170183
int screenCaptureInterval = _dataConvert.ConvertIntoMilliseconds((int)_formSetup.numericUpDownHoursInterval.Value,
171-
(int)_formSetup.numericUpDownMinutesInterval.Value, (int)_formSetup.numericUpDownSecondsInterval.Value);
184+
(int)_formSetup.numericUpDownMinutesInterval.Value, (int)_formSetup.numericUpDownSecondsInterval.Value, (int)_formSetup.numericUpDownMillisecondsInterval.Value);
172185

173186
_formSchedule.ScreenCaptureInterval = screenCaptureInterval;
174187

@@ -280,6 +293,17 @@ private void StartSchedule(Schedule schedule)
280293
// This schedule is being started with the intention that it controls the main timer and overrides its interval and scope.
281294
if (schedule.Logic == 0)
282295
{
296+
// Set the main interval with the schedule's interval.
297+
decimal screenCaptureIntervalHours = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Hours);
298+
decimal screenCaptureIntervalMinutes = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Minutes);
299+
decimal screenCaptureIntervalSeconds = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Seconds);
300+
decimal screenCaptureIntervalMilliseconds = Convert.ToDecimal(TimeSpan.FromMilliseconds(Convert.ToDouble(schedule.ScreenCaptureInterval)).Milliseconds);
301+
302+
_formSetup.numericUpDownHoursInterval.Value = screenCaptureIntervalHours;
303+
_formSetup.numericUpDownMinutesInterval.Value = screenCaptureIntervalMinutes;
304+
_formSetup.numericUpDownSecondsInterval.Value = screenCaptureIntervalSeconds;
305+
_formSetup.numericUpDownMillisecondsInterval.Value = screenCaptureIntervalMilliseconds;
306+
283307
// Start the main timer.
284308
StartScreenCapture(schedule.ScreenCaptureInterval, schedule.Scope);
285309
}

0 commit comments

Comments
 (0)