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#
Raw Normal View History

2023-03-27 00:19:30 +02:00
using Profiles;
2023-03-24 10:17:54 +01:00
namespace Password_Manager
{
2023-03-27 09:17:06 +02:00
public delegate string ProfileDataRequest(); //Fire whenever a specific field of ProfileHandler.CurrentProfile is needed
2023-03-24 10:17:54 +01:00
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
ApplicationConfiguration.Initialize();
2023-03-27 00:19:30 +02:00
ProfileHandler.Init();
2023-03-24 14:03:09 +01:00
Application.Run(mainForm);
}
2023-03-27 00:19:30 +02:00
public static MainForm mainForm = new MainForm(
() => ProfileHandler.CurrentProfile.Name,
() => ProfileHandler.CurrentProfile.Path,
() => ProfileHandler.ListOfProfiles.GetNameList(),
2023-03-27 09:17:06 +02:00
(profileName) => ProfileHandler.ChangeProfiles(profileName),
() => ProfileHandler.SaveProfiles(),
(profileName, profilePath) => ProfileHandler.AddProfile(profileName, profilePath)
2023-03-27 00:19:30 +02:00
); //needed at creation so that MainForm may pass this method down to other classes in its constructor
2023-03-24 10:17:54 +01:00
}
}