chore: updated to .NET 8.0
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user