feat: installer
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user