Skip to content

Commit a9e7e74

Browse files
2.2.0.6 - An existing label can now be selected from a drop down list of available labels and applying a label to each screenshot is now determined by a checkbox value
1 parent bfd76aa commit a9e7e74

File tree

6 files changed

+53
-34
lines changed

6 files changed

+53
-34
lines changed

FormMain.Designer.cs

Lines changed: 24 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FormMain.cs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,10 @@ private void LoadSettings()
333333
numericUpDownKeepScreenshotsForDays.Value = Convert.ToDecimal(Settings.User.GetByKey("IntKeepScreenshotsForDays", defaultValue: 30).Value);
334334
Log.Write("IntKeepScreenshotsForDays = " + numericUpDownKeepScreenshotsForDays.Value);
335335

336-
textBoxScreenshotLabel.Text = Settings.User.GetByKey("StringScreenshotLabel", defaultValue: string.Empty).Value.ToString();
337-
Log.Write("StringScreenshotLabel = " + textBoxScreenshotLabel.Text);
336+
comboBoxScreenshotLabel.Text = Settings.User.GetByKey("StringScreenshotLabel", defaultValue: string.Empty).Value.ToString();
337+
Log.Write("StringScreenshotLabel = " + comboBoxScreenshotLabel.Text);
338+
339+
checkBoxScreenshotLabel.Checked = Convert.ToBoolean(Settings.User.GetByKey("BoolApplyScreenshotLabel", defaultValue: false).Value);
338340

339341
EnableStartCapture();
340342

@@ -576,7 +578,8 @@ private void SaveSettings()
576578
Settings.User.GetByKey("BoolLockScreenCaptureSession", defaultValue: false).Value = checkBoxPassphraseLock.Checked;
577579
Settings.User.GetByKey("StringPassphrase", defaultValue: string.Empty).Value = textBoxPassphrase.Text;
578580
Settings.User.GetByKey("IntKeepScreenshotsForDays", defaultValue: 30).Value = numericUpDownKeepScreenshotsForDays.Value;
579-
Settings.User.GetByKey("StringScreenshotLabel", defaultValue: string.Empty).Value = textBoxScreenshotLabel.Text;
581+
Settings.User.GetByKey("StringScreenshotLabel", defaultValue: string.Empty).Value = comboBoxScreenshotLabel.Text;
582+
Settings.User.GetByKey("BoolApplyScreenshotLabel", defaultValue: false).Value = checkBoxScreenshotLabel.Checked;
580583

581584
Settings.User.Save();
582585

@@ -631,6 +634,12 @@ private void ShowInterface()
631634
SearchDates();
632635
SearchScreenshots();
633636

637+
List<string> labels = _screenshotCollection.GetLabels();
638+
labels.Sort();
639+
640+
comboBoxScreenshotLabel.DataSource = labels;
641+
comboBoxScreenshotLabel.Text = Settings.User.GetByKey("StringScreenshotLabel", defaultValue: string.Empty).Value.ToString();
642+
634643
Show();
635644

636645
Visible = true;
@@ -1084,7 +1093,8 @@ private void EnableStartCapture()
10841093
dateTimePickerScheduleStartAt.Enabled = true;
10851094
dateTimePickerScheduleStopAt.Enabled = true;
10861095

1087-
textBoxScreenshotLabel.Enabled = true;
1096+
checkBoxScreenshotLabel.Enabled = true;
1097+
comboBoxScreenshotLabel.Enabled = true;
10881098
}
10891099
else
10901100
{
@@ -1122,7 +1132,8 @@ private void EnableStopScreenCapture()
11221132
dateTimePickerScheduleStartAt.Enabled = false;
11231133
dateTimePickerScheduleStopAt.Enabled = false;
11241134

1125-
textBoxScreenshotLabel.Enabled = false;
1135+
checkBoxScreenshotLabel.Enabled = false;
1136+
comboBoxScreenshotLabel.Enabled = false;
11261137
}
11271138

11281139
/// <summary>
@@ -2669,7 +2680,7 @@ private void RunRegionCaptures()
26692680
resolutionRatio: region.ResolutionRatio,
26702681
viewId: region.ViewId,
26712682
bitmap: bitmap,
2672-
label: textBoxScreenshotLabel.Text,
2683+
label: checkBoxScreenshotLabel.Checked ? comboBoxScreenshotLabel.Text : string.Empty,
26732684
windowTitle: _screenCapture.ActiveWindowTitle,
26742685
screenCollection: formScreen.ScreenCollection,
26752686
regionCollection: formRegion.RegionCollection,
@@ -2711,7 +2722,7 @@ private void RunScreenCaptures()
27112722
resolutionRatio: screen.ResolutionRatio,
27122723
viewId: screen.ViewId,
27132724
bitmap: bitmap,
2714-
label: textBoxScreenshotLabel.Text,
2725+
label: checkBoxScreenshotLabel.Checked ? comboBoxScreenshotLabel.Text : string.Empty,
27152726
windowTitle: _screenCapture.ActiveWindowTitle,
27162727
screenCollection: formScreen.ScreenCollection,
27172728
regionCollection: formRegion.RegionCollection,
@@ -2752,7 +2763,7 @@ private void RunScreenCaptures()
27522763
resolutionRatio: screen.ResolutionRatio,
27532764
viewId: screen.ViewId,
27542765
bitmap: bitmap,
2755-
label: textBoxScreenshotLabel.Text,
2766+
label: checkBoxScreenshotLabel.Checked ? comboBoxScreenshotLabel.Text : string.Empty,
27562767
windowTitle: _screenCapture.ActiveWindowTitle,
27572768
screenCollection: formScreen.ScreenCollection,
27582769
regionCollection: formRegion.RegionCollection,

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.5")]
36-
[assembly: AssemblyFileVersion("2.2.0.5")]
35+
[assembly: AssemblyVersion("2.2.0.6")]
36+
[assembly: AssemblyFileVersion("2.2.0.6")]
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.2.0.5"/>
6+
version="2.2.0.6"/>
77
<asmv3:application>
88
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
99
<dpiAware>True/PM</dpiAware>

screenshots/ScreenshotCollection.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ public List<Slide> GetSlides(string filterType, string filterValue, string date
161161
return slides;
162162
}
163163

164+
public List<string> GetLabels()
165+
{
166+
return _screenshotList.Where(x => x.Label != null && !string.IsNullOrEmpty(x.Label)).Select(x => x.Label).Distinct().ToList();
167+
}
168+
164169
public Screenshot GetScreenshot(string slideName, Guid viewId)
165170
{
166171
Screenshot foundScreenshot = new Screenshot();

settings/Settings.cs

Lines changed: 2 additions & 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.5";
16+
public static readonly string ApplicationVersion = "2.2.0.6";
1717
public static readonly string ApplicationCodename = "Dalek";
1818

1919
public static SettingCollection Application;
@@ -90,6 +90,7 @@ public static void Initialize()
9090
User.Add(new Setting("StringPassphrase", string.Empty));
9191
User.Add(new Setting("IntKeepScreenshotsForDays", 30));
9292
User.Add(new Setting("StringScreenshotLabel", string.Empty));
93+
User.Add(new Setting("BoolApplyScreenshotLabel", false));
9394

9495
User.Save();
9596
}

0 commit comments

Comments
 (0)