Deleted everything profile related and started semi-fresh

This commit is contained in:
2023-03-27 10:24:40 +02:00
parent 60c6982663
commit 6dd08d15b5
17 changed files with 118 additions and 687 deletions

View File

@@ -1,8 +1,6 @@
using Profiles;
namespace Password_Manager
{
public delegate string ProfileDataRequest(); //Fire whenever a specific field of ProfileHandler.CurrentProfile is needed
public delegate string DataRequest(); //Fire whenever a specific field of ProfileHandler.CurrentProfile is needed
internal static class Program
{
/// <summary>
@@ -12,17 +10,11 @@ namespace Password_Manager
static void Main()
{
ApplicationConfiguration.Initialize();
ProfileHandler.Init();
Application.Run(mainForm);
}
public static MainForm mainForm = new MainForm(
() => ProfileHandler.CurrentProfile.Name,
() => ProfileHandler.CurrentProfile.Path,
() => ProfileHandler.ListOfProfiles.GetNameList(),
(profileName) => ProfileHandler.ChangeProfiles(profileName),
() => ProfileHandler.SaveProfiles(),
(profileName, profilePath) => ProfileHandler.AddProfile(profileName, profilePath)
() => ConfigFileManager.GetPath()
); //needed at creation so that MainForm may pass this method down to other classes in its constructor
}
}