This commit is contained in:
2023-03-27 00:19:30 +02:00
parent 01a926d316
commit df33170f71
28 changed files with 543 additions and 125 deletions

View File

@@ -1,5 +1,8 @@
using Profiles;
namespace Password_Manager
{
public delegate string ProfileDataRequest();
internal static class Program
{
/// <summary>
@@ -8,11 +11,17 @@ namespace Password_Manager
[STAThread]
static void Main()
{
ProfileHandler.ListOfProfiles = new ProfileList();
ApplicationConfiguration.Initialize();
ProfileHandler.Init();
Application.Run(mainForm);
}
public static MainForm mainForm = new MainForm();
public static MainForm mainForm = new MainForm(
() => ProfileHandler.CurrentProfile.Name,
() => ProfileHandler.CurrentProfile.Path,
() => ProfileHandler.ListOfProfiles.GetNameList(),
(profileName) => ProfileHandler.ChangeProfiles(profileName)
); //needed at creation so that MainForm may pass this method down to other classes in its constructor
}
}