Skip to content

Commit

Permalink
added read/write functionality for ruleset in json
Browse files Browse the repository at this point in the history
  • Loading branch information
vigi86 committed May 14, 2023
1 parent 4955b29 commit 29cda8f
Show file tree
Hide file tree
Showing 7 changed files with 299 additions and 56 deletions.
15 changes: 15 additions & 0 deletions src/DLP_Win/DLP_Win/DLP_Win.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,19 @@
<StartupObject>DLP_Win.Program</StartupObject>
</PropertyGroup>

<ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>

</Project>
31 changes: 31 additions & 0 deletions src/DLP_Win/DLP_Win/DirecotryHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Collections.Generic;
using System.IO;

namespace DLP_Win
{
class DirecotryHelper
{

public List<string> getDrives()
{
DriveInfo[] allDrives = DriveInfo.GetDrives();
var drives = new List<string>();
foreach (DriveInfo drive in allDrives)
{

if (drive.DriveType == DriveType.Fixed || drive.DriveType == DriveType.Removable)
{
//string[] files = Directory.GetFiles(drive.RootDirectory.FullName, "*", SearchOption.AllDirectories);

//foreach (string file in files)
//{
// // do something with the file
//}
drives.Add(drive.RootDirectory.FullName);
}
}

return drives;
}
}
}
44 changes: 44 additions & 0 deletions src/DLP_Win/DLP_Win/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/DLP_Win/DLP_Win/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DLP_Win.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="AHV_NR" Type="System.String" Scope="Application">
<Value Profile="(Default)">.*756\.\d{4}\.\d{4}\.\d{2}.*</Value>
</Setting>
<Setting Name="CUSTOMER_NR" Type="System.String" Scope="Application">
<Value Profile="(Default)">\d{2}\.\d{5}-\d</Value>
</Setting>
</Settings>
</SettingsFile>
30 changes: 24 additions & 6 deletions src/DLP_Win/DLP_Win/frmMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 29cda8f

Please sign in to comment.