diff --git a/.vs/Roaming.git/FileContentIndex/418e2143-ecba-4ff6-a9bd-41376fe03fcb.vsidx b/.vs/Roaming.git/FileContentIndex/418e2143-ecba-4ff6-a9bd-41376fe03fcb.vsidx
deleted file mode 100644
index 9dc66b5..0000000
Binary files a/.vs/Roaming.git/FileContentIndex/418e2143-ecba-4ff6-a9bd-41376fe03fcb.vsidx and /dev/null differ
diff --git a/.vs/Roaming.git/FileContentIndex/951119d6-19f8-4a7a-b4f4-84a32139e908.vsidx b/.vs/Roaming.git/FileContentIndex/951119d6-19f8-4a7a-b4f4-84a32139e908.vsidx
new file mode 100644
index 0000000..9f92a01
Binary files /dev/null and b/.vs/Roaming.git/FileContentIndex/951119d6-19f8-4a7a-b4f4-84a32139e908.vsidx differ
diff --git a/.vs/Roaming.git/v17/.suo b/.vs/Roaming.git/v17/.suo
index d2d86c3..0957904 100644
Binary files a/.vs/Roaming.git/v17/.suo and b/.vs/Roaming.git/v17/.suo differ
diff --git a/Roaming/Roaming.cs b/Roaming/Roaming.cs
index ce3387d..304f6ac 100644
--- a/Roaming/Roaming.cs
+++ b/Roaming/Roaming.cs
@@ -264,6 +264,65 @@ namespace Eugen.ESystem
}
}
+ ///
+ /// Checks whether the roaming path exists
+ ///
+ /// 'True' if the roaming path exists, otherwise 'false'
+ public bool RoamingPathExists()
+ {
+ return Directory.Exists(RoamingPath);
+ }
+
+ ///
+ /// Checks whether the main key exists
+ ///
+ /// 'True' if the main key exists, otherwise 'false'
+ public bool MainKeyExists()
+ {
+ return Directory.Exists(RoamingPath + "\\" + MainKey);
+ }
+
+ ///
+ /// Checks whether the sub key exists
+ ///
+ /// 'True' if the sub key exists, otherwise 'false'
+ public bool SubKeyExists()
+ {
+ return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey);
+ }
+
+ ///
+ /// Checks whether the key exists
+ ///
+ /// 'True' if the key exists, otherwise 'false'
+ public bool KeyExists()
+ {
+ return Directory.Exists(RoamingPath + "\\" + MainKey + "\\" + SubKey + "\\" + Key);
+ }
+
+ ///
+ /// Checks whether the key is 'null' or 'empty'
+ ///
+ /// 'True' if the key is 'null' or 'empty', otherwise 'false'
+ public bool ValueIsNullOrEmpty()
+ {
+ if (KeyExists())
+ {
+ if (String.IsNullOrEmpty(ReadKey()))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return true;
+ }
+ }
+
private string GetAppData()
{
return Environment.GetEnvironmentVariable("APPDATA"); //Ermittelt den Pafad des Verzeichnisses '%APPDATA%\Roaming'
diff --git a/Roaming/bin/Debug/heroaming.dll b/Roaming/bin/Debug/heroaming.dll
index 3a2a999..f3eac2c 100644
Binary files a/Roaming/bin/Debug/heroaming.dll and b/Roaming/bin/Debug/heroaming.dll differ
diff --git a/Roaming/bin/Debug/heroaming.pdb b/Roaming/bin/Debug/heroaming.pdb
index 3295e0d..44f13ad 100644
Binary files a/Roaming/bin/Debug/heroaming.pdb and b/Roaming/bin/Debug/heroaming.pdb differ
diff --git a/Roaming/obj/Debug/heroaming.dll b/Roaming/obj/Debug/heroaming.dll
index 3a2a999..f3eac2c 100644
Binary files a/Roaming/obj/Debug/heroaming.dll and b/Roaming/obj/Debug/heroaming.dll differ
diff --git a/Roaming/obj/Debug/heroaming.pdb b/Roaming/obj/Debug/heroaming.pdb
index 3295e0d..44f13ad 100644
Binary files a/Roaming/obj/Debug/heroaming.pdb and b/Roaming/obj/Debug/heroaming.pdb differ
diff --git a/Test_Roaming/Form1.cs b/Test_Roaming/Form1.cs
index af025b2..926b930 100644
--- a/Test_Roaming/Form1.cs
+++ b/Test_Roaming/Form1.cs
@@ -151,6 +151,7 @@ namespace Test_Roaming
roaming.DeleteMainKey(); //Hauptschlüssel löschen
labelResult.Text = "MainKey: " + mainKey + "\nSubKey: " + subKey + "\nKey: " + key + "\nValue: " + value + "\n\nSchreibe Key nach \'AppData\\Roaming\\'\nGelesener Wert: " + redvalue + "\nLösche Key/SubKey/MainKey";
+ labelResult.Text += "\n\nMainKey exist: " + roaming.MainKeyExists() + "\nSubKey exist: " + roaming.SubKeyExists() + "\nKey exist: " + roaming.KeyExists() + "\nValue ist null oder leer: " + roaming.ValueIsNullOrEmpty();
}
catch (Exception ex)
{
diff --git a/Test_Roaming/bin/Debug/Test_Roaming.exe b/Test_Roaming/bin/Debug/Test_Roaming.exe
index 4497f17..1dd57dd 100644
Binary files a/Test_Roaming/bin/Debug/Test_Roaming.exe and b/Test_Roaming/bin/Debug/Test_Roaming.exe differ
diff --git a/Test_Roaming/bin/Debug/Test_Roaming.pdb b/Test_Roaming/bin/Debug/Test_Roaming.pdb
index 66516f0..45b0235 100644
Binary files a/Test_Roaming/bin/Debug/Test_Roaming.pdb and b/Test_Roaming/bin/Debug/Test_Roaming.pdb differ
diff --git a/Test_Roaming/bin/Debug/heroaming.dll b/Test_Roaming/bin/Debug/heroaming.dll
index bf0fef6..f3eac2c 100644
Binary files a/Test_Roaming/bin/Debug/heroaming.dll and b/Test_Roaming/bin/Debug/heroaming.dll differ
diff --git a/Test_Roaming/bin/Debug/heroaming.pdb b/Test_Roaming/bin/Debug/heroaming.pdb
index d0fbd13..44f13ad 100644
Binary files a/Test_Roaming/bin/Debug/heroaming.pdb and b/Test_Roaming/bin/Debug/heroaming.pdb differ
diff --git a/Test_Roaming/obj/Debug/Test_Roaming.csproj.AssemblyReference.cache b/Test_Roaming/obj/Debug/Test_Roaming.csproj.AssemblyReference.cache
index a479e99..b2c16dd 100644
Binary files a/Test_Roaming/obj/Debug/Test_Roaming.csproj.AssemblyReference.cache and b/Test_Roaming/obj/Debug/Test_Roaming.csproj.AssemblyReference.cache differ
diff --git a/Test_Roaming/obj/Debug/Test_Roaming.exe b/Test_Roaming/obj/Debug/Test_Roaming.exe
index 4497f17..1dd57dd 100644
Binary files a/Test_Roaming/obj/Debug/Test_Roaming.exe and b/Test_Roaming/obj/Debug/Test_Roaming.exe differ
diff --git a/Test_Roaming/obj/Debug/Test_Roaming.pdb b/Test_Roaming/obj/Debug/Test_Roaming.pdb
index 66516f0..45b0235 100644
Binary files a/Test_Roaming/obj/Debug/Test_Roaming.pdb and b/Test_Roaming/obj/Debug/Test_Roaming.pdb differ