Initial commit. Added a helper class for easy access to the app.config settings.

This commit is contained in:
Admin
2020-11-04 17:13:38 -06:00
commit 7b9744670f
15 changed files with 669 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
namespace DataOrganizer
{
static class GlobalSettings
{
public static bool TryGetStringSetting(string keyName, out string value)
{
value = string.Empty;
try
{
value = ConfigurationManager.AppSettings[keyName];
if (string.IsNullOrEmpty(value)) return false;
return true;
}
catch
{
//toolStripStatusLabel1.Text = "Failed to get app key: " + keyName + ".";
}
return false;
}
}
}