This repository has been archived on 2025-09-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Password-Manager-Legacy/Password Manager/Program.cs

28 lines
1.0 KiB
C#

using Profiles;
namespace Password_Manager
{
public delegate string ProfileDataRequest(); //Fire whenever a specific field of ProfileHandler.CurrentProfile is needed
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
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)
); //needed at creation so that MainForm may pass this method down to other classes in its constructor
}
}