32 lines
923 B
C#
32 lines
923 B
C#
using System;
|
|
using System.Windows.Input;
|
|
using JD.Asset.Database;
|
|
using Plume.WPF.Commands;
|
|
using Action = Plume.Interfaces.WPF.Actions.Action;
|
|
|
|
namespace JD.AssetBrowser.Actions
|
|
{
|
|
public class UpdateDependenciesAction : Action
|
|
{
|
|
public UpdateDependenciesAction()
|
|
:base("Update dependencies",
|
|
"Update the dependencies of all the assets",
|
|
new Uri("/JD.AssetBrowser;component/Resources/update-dependencies.png", UriKind.Relative),
|
|
new DoubleKeyGesture(ModifierKeys.Control, Key.U))
|
|
{
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override async void TryExecute()
|
|
{
|
|
await AssetDatabase.Instance.RefreshDependenciesAsync();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override bool CanExecute()
|
|
{
|
|
return !AssetDatabase.Instance.TaskInProgress;
|
|
}
|
|
}
|
|
}
|