mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 15:36:20 +00:00
Execute method implementation
This commit is contained in:
parent
45ab678d5b
commit
388e446b96
6 changed files with 43 additions and 43 deletions
|
|
@ -30,8 +30,10 @@ namespace MapControl.UiTools
|
|||
{
|
||||
Click += async (s, e) =>
|
||||
{
|
||||
if (DataContext is MapBase map && await Execute(map))
|
||||
if (DataContext is MapBase map)
|
||||
{
|
||||
await Execute(map);
|
||||
|
||||
foreach (var item in ParentMenuItems.OfType<MapProjectionMenuItem>())
|
||||
{
|
||||
item.IsChecked = map.MapProjection.CrsId == item.MapProjection;
|
||||
|
|
@ -40,7 +42,7 @@ namespace MapControl.UiTools
|
|||
};
|
||||
}
|
||||
|
||||
public override Task<bool> Execute(MapBase map)
|
||||
public override Task Execute(MapBase map)
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
|
|
@ -57,7 +59,9 @@ namespace MapControl.UiTools
|
|||
}
|
||||
}
|
||||
|
||||
return Task.FromResult(success);
|
||||
IsChecked = success;
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue