Skip to content

Commit 02833c6

Browse files
committed
Added Match Case to Ignore List
Changed hotkey for Edit Ignore List
1 parent 073ed16 commit 02833c6

6 files changed

Lines changed: 42 additions & 15 deletions

File tree

CountyChecker/CountyChecker.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<PackageIcon>CC.png</PackageIcon>
1515
<RepositoryUrl>https://github.com/Stumpy842/CountyChecker</RepositoryUrl>
1616
<PackageTags>CountyCheck</PackageTags>
17-
<PackageReleaseNotes>Recs Out incorrect when Ignore List enabled</PackageReleaseNotes>
18-
<Version>1.0.3</Version>
19-
<VersionPrefix>1.0.3</VersionPrefix>
20-
<AssemblyVersion>1.0.3</AssemblyVersion>
21-
<FileVersion>1.0.3.0</FileVersion>
22-
<InformationalVersion>1.0.3</InformationalVersion>
17+
<PackageReleaseNotes>Added Match Case to Ignore List</PackageReleaseNotes>
18+
<Version>1.0.4</Version>
19+
<VersionPrefix>1.0.4</VersionPrefix>
20+
<AssemblyVersion>1.0.4</AssemblyVersion>
21+
<FileVersion>1.0.4.0</FileVersion>
22+
<InformationalVersion>1.0.4</InformationalVersion>
2323
<Title>CountyChecker Report Generator</Title>
2424
<Copyright>© Steven J. Stover, 2025</Copyright>
2525
</PropertyGroup>

CountyChecker/Form1.Designer.cs

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

CountyChecker/Form1.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public partial class Form1 : Form
8080
// Ignore List
8181
private static List<string> IgnoreListItems = [];
8282
internal static bool optIgnoreEnabled;
83+
internal static StringComparison optMatchCase;
8384

8485
public Form1()
8586
{
@@ -122,6 +123,7 @@ private void LoadIgnoreList()
122123
{
123124
IgnoreList.Load();
124125
IgnoreListItems = IgnoreList.CurrentIgnores.Ignore;
126+
optMatchCase = IgnoreList.CurrentIgnores.MatchCase ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase;
125127
optIgnoreEnabled = IgnoreList.CurrentIgnores.IgnoreEnabled;
126128
disableIgnoreListToolStripMenuItem.Text = optIgnoreEnabled ? "&Disable Ignore List" : "&Enable Ignore List";
127129
}
@@ -387,7 +389,7 @@ static bool IgnoreFound(string line)
387389
if (!optIgnoreEnabled) return false;
388390
foreach (string ign in IgnoreListItems)
389391
{
390-
if (line.Contains(ign))
392+
if (line.Contains(ign, optMatchCase))
391393
{
392394
return true;
393395
}
@@ -406,6 +408,7 @@ static bool IgnoreFound(string line)
406408
if (File.Exists(outFile)) { File.Delete(outFile); }
407409
}
408410
catch { }
411+
409412
// Open the stream for reading. File.OpenRead opens the file with read-only access
410413
// and a default FileShare.Read mode, allowing other processes to read simultaneously.
411414
using StreamReader reader = new(File.OpenRead(inFile));

CountyChecker/IgnoreList.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static void MSG(string ms)
4949
if (editing)
5050
{
5151
CurrentIgnores.Ignore = [.. _ignoreListWindow!.lbxIgnore.Items.Cast<string>()];
52+
CurrentIgnores.MatchCase = _ignoreListWindow.cbMatchCase.Checked;
5253
}
5354
CurrentIgnores.IgnoreEnabled = Form1.optIgnoreEnabled;
5455

@@ -99,7 +100,11 @@ public static void Load()
99100
}
100101
}
101102

102-
_ignoreListWindow?.lbxIgnore.Items.AddRange([.. CurrentIgnores.Ignore]);
103+
if (_ignoreListWindow is not null)
104+
{
105+
_ignoreListWindow.lbxIgnore.Items.AddRange([.. CurrentIgnores.Ignore.ToArray()]);
106+
_ignoreListWindow.cbMatchCase.Checked = CurrentIgnores.MatchCase;
107+
}
103108
}
104109
}
105110

@@ -110,6 +115,7 @@ public class IgnoreData
110115
{
111116
public List<string> Ignore { get; set; } = [];
112117
public bool IgnoreEnabled { get; set; } = true;
118+
public bool MatchCase { get; set; } = true;
113119
}
114120
}
115121
}

CountyChecker/IgnoreListWindow.Designer.cs

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

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ Added Tally of Males/Females to output Windows
2828

2929
Bugfix: Recs Out incorrect when Ignore List enabled and matches found
3030

31+
********** New Version 1.0.4.0 Release **********
32+
33+
Added Match Case to Ignore List
34+
Changed hotkey for Edit Ignore List
35+
3136
**Notes**
3237

3338
CountyChecker is a Windows application which requires the .NET runtime and will not run natively on other platforms such as Mac OS or Linux. It may work with some crossover/emulator solution but this has not been tested.

0 commit comments

Comments
 (0)