Code refactoring
This commit is contained in:
@@ -5,21 +5,21 @@ namespace Common;
|
||||
public static class ConfigFileManager
|
||||
{
|
||||
#region Config flags
|
||||
/*Configuration: (format: fieldname=value)
|
||||
/*Configuration: (format: fieldname=value)
|
||||
|
||||
password_store_path: path to the folder which contains the .gpg files
|
||||
recipient: whose public key to use for encryption when a new password is created
|
||||
*/
|
||||
private static string CONFIGPATH = SpecialDirectories.CurrentUserApplicationData + "\\config.cfg";
|
||||
private static char DELIMETER = '=';
|
||||
private static string RECIPIENT = "recipient";
|
||||
private static string PATH = "password_store_path";
|
||||
password_store_path: path to the folder which contains the .gpg files
|
||||
recipient: whose public key to use for encryption when a new password is created
|
||||
*/
|
||||
private static string CONFIGPATH = SpecialDirectories.CurrentUserApplicationData + "\\config.cfg";
|
||||
private static char DELIMETER = '=';
|
||||
private static string RECIPIENT = "recipient";
|
||||
private static string PATH = "password_store_path";
|
||||
#endregion
|
||||
|
||||
private static Config Configuration;
|
||||
private static Config Configuration;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
while (!success)
|
||||
@@ -63,17 +63,17 @@ public static class ConfigFileManager
|
||||
CreateDefaultConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetPath()
|
||||
{
|
||||
return Configuration.PasswordStorePath;
|
||||
return Configuration.PasswordStorePath;
|
||||
}
|
||||
|
||||
public static string GetRecipient()
|
||||
{
|
||||
return Configuration.Recipient;
|
||||
}
|
||||
public static string GetRecipient()
|
||||
{
|
||||
return Configuration.Recipient;
|
||||
}
|
||||
|
||||
private static void CreateDefaultConfig()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user