-
Notifications
You must be signed in to change notification settings - Fork 0
/
WinFormsScraperConfig.cs
39 lines (29 loc) · 1.13 KB
/
WinFormsScraperConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
global using static WinFormsScraper.ScrapeType;
using System.Collections.Immutable;
namespace WinFormsScraper;
public enum ScrapeType
{
ALL,
IMPORTANT,
SIZE_AND_LOCATION,
CUSTOM
}
public static class WinFormsScraperConfig
{
public static string Path { get; set; } = "FormDetails.txt";
public static ScrapeType Type { get; set; } = IMPORTANT;
public static HashSet<string> ScrapeFilter { get; set; } = [];
}
public static class ScrapeSets
{
public static readonly ImmutableHashSet<string> All =
ImmutableHashSet.Create("Size", "Location", "ForeColour", "BackColour", "Font");
public static readonly ImmutableHashSet<string> Important =
ImmutableHashSet.Create("Size", "Location", "ForeColour", "BackColour", "Font");
public static readonly ImmutableHashSet<string> SizeLocation =
ImmutableHashSet.Create("Size", "Location", "ForeColour", "BackColour", "Font");
public static readonly ImmutableHashSet<string> Font =
ImmutableHashSet.Create("Font");
public static ImmutableHashSet<string> Custom =>
WinFormsScraperConfig.ScrapeFilter.ToImmutableHashSet();
}