Skip to content

Commit a775e48

Browse files
2.2.0.10 - Fixed bug with count value when display is not available
1 parent 346e4db commit a775e48

File tree

5 files changed

+13
-40
lines changed

5 files changed

+13
-40
lines changed

FormMain.cs

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,17 +2410,20 @@ private void TakeScreenshot()
24102410
{
24112411
formScreen.RefreshScreenDictionary();
24122412

2413-
_screenCapture.Count++;
2413+
if (_screenCapture.GetScreenImages(0, 0, 0, 0, 0, false, out Bitmap bitmap))
2414+
{
2415+
_screenCapture.Count++;
24142416

2415-
_screenCapture.DateTimePreviousCycle = DateTime.Now;
2417+
_screenCapture.DateTimePreviousCycle = DateTime.Now;
24162418

2417-
_screenCapture.ActiveWindowTitle = _screenCapture.GetActiveWindowTitle();
2419+
_screenCapture.ActiveWindowTitle = _screenCapture.GetActiveWindowTitle();
24182420

2419-
_screenCapture.ActiveWindowProcessName = _screenCapture.GetActiveWindowProcessName();
2421+
_screenCapture.ActiveWindowProcessName = _screenCapture.GetActiveWindowProcessName();
24202422

2421-
RunRegionCaptures();
2423+
RunRegionCaptures();
24222424

2423-
RunScreenCaptures();
2425+
RunScreenCaptures();
2426+
}
24242427
}
24252428

24262429
/// <summary>
@@ -2690,18 +2693,9 @@ private void RunRegionCaptures()
26902693
}
26912694
else
26922695
{
2693-
_screenCapture.Count--;
26942696
ScreenshotTakenWithFailure();
26952697
}
26962698
}
2697-
else
2698-
{
2699-
_screenCapture.Count--;
2700-
}
2701-
}
2702-
else
2703-
{
2704-
_screenCapture.Count--;
27052699
}
27062700
}
27072701
}
@@ -2742,19 +2736,10 @@ private void RunScreenCaptures()
27422736
}
27432737
else
27442738
{
2745-
_screenCapture.Count--;
27462739
ScreenshotTakenWithFailure();
27472740
break;
27482741
}
27492742
}
2750-
else
2751-
{
2752-
_screenCapture.Count--;
2753-
}
2754-
}
2755-
else
2756-
{
2757-
_screenCapture.Count--;
27582743
}
27592744
}
27602745
else
@@ -2793,19 +2778,10 @@ private void RunScreenCaptures()
27932778
}
27942779
else
27952780
{
2796-
_screenCapture.Count--;
27972781
ScreenshotTakenWithFailure();
27982782
break;
27992783
}
28002784
}
2801-
else
2802-
{
2803-
_screenCapture.Count--;
2804-
}
2805-
}
2806-
else
2807-
{
2808-
_screenCapture.Count--;
28092785
}
28102786
}
28112787
}

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.2.0.9")]
36-
[assembly: AssemblyFileVersion("2.2.0.9")]
35+
[assembly: AssemblyVersion("2.2.0.10")]
36+
[assembly: AssemblyFileVersion("2.2.0.10")]
3737
[assembly: NeutralResourcesLanguageAttribute("en-CA")]

ScreenCapture.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,9 @@ public bool GetScreenImages(int component, int x, int y, int width, int height,
249249

250250
if (bitmap != null)
251251
{
252-
Log.Write("Images of screens retrieved");
253252
return true;
254253
}
255254

256-
Log.Write("No screen images available. User may not be logged in");
257-
258255
return false;
259256
}
260257

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.2.0.9"/>
6+
version="2.2.0.10"/>
77
<asmv3:application>
88
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
99
<dpiAware>True/PM</dpiAware>

settings/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace AutoScreenCapture
1313
public static class Settings
1414
{
1515
public static readonly string ApplicationName = "Auto Screen Capture";
16-
public static readonly string ApplicationVersion = "2.2.0.9";
16+
public static readonly string ApplicationVersion = "2.2.0.10";
1717
public static readonly string ApplicationCodename = "Dalek";
1818

1919
public static SettingCollection Application;

0 commit comments

Comments
 (0)