chore: updated to .NET 8.0

This commit is contained in:
2026-03-02 16:26:17 +01:00
parent a6112bec44
commit 9b261dbf78
4 changed files with 16 additions and 151 deletions

View File

@@ -127,8 +127,8 @@ namespace CarManagerV3
detailsForm.ShowDialog();
};
ContextMenu cm = new ContextMenu();
cm.MenuItems.Add(new MenuItem("Move Up", (s, e) =>
ContextMenuStrip cms = new ContextMenuStrip();
cms.Items.Add("Move up", null, (s, e) =>
{
int order = car.Order;
// find car with order just less than this one
@@ -142,11 +142,10 @@ namespace CarManagerV3
SafeManager.SaveCars(filepath, cars);
refreshCars(cars);
}
}));
});
cm.MenuItems.Add(new MenuItem("Move Down", (s, e) =>
cms.Items.Add("Move down", null, (s, e) =>
{
int order = car.Order;
// find car with order just greater than this one
Car other = cars.Where(c => c.Order > order).OrderBy(c => c.Order).FirstOrDefault();
@@ -159,9 +158,9 @@ namespace CarManagerV3
SafeManager.SaveCars(filepath, cars);
refreshCars(cars);
}
}));
});
card.ContextMenu = cm;
card.ContextMenuStrip = cms;
if (isNew)
{