feat: installer

This commit is contained in:
2026-03-05 11:31:36 +01:00
parent 835286b629
commit ff3805f8d1
7 changed files with 1038 additions and 71 deletions

View File

@@ -13,13 +13,18 @@ namespace CarManagerV3
List<Car> cars = new List<Car>();
string filepath = "";
public MainForm()
public MainForm(string pathToOpen = "")
{
InitializeComponent();
// Open the most recent file if it exists. Otherwise, use default filepath.
List<string> recentFiles = SafeManager.GetRecentPaths();
if (recentFiles.Count > 0)
if (!String.IsNullOrEmpty(pathToOpen))
{
filepath = pathToOpen;
SafeManager.AddRecentPath(filepath);
}
else if (recentFiles.Count > 0)
{
filepath = recentFiles[0];
}