Add resource action. Implement play chart and import resource action.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using Cryville.Crtr.UI;
|
||||
using System;
|
||||
|
||||
namespace Cryville.Crtr.Browsing.Actions {
|
||||
internal class ImportResourceAction : IResourceAction {
|
||||
readonly IResourceManager _destination;
|
||||
public ImportResourceAction(IResourceManager destination) {
|
||||
_destination = destination;
|
||||
}
|
||||
|
||||
public string Name { get { return "Import"; } }
|
||||
public int Priority { get { return 0; } }
|
||||
|
||||
public void Invoke(Uri uri, object resource) {
|
||||
if (_destination.ImportFrom(uri))
|
||||
Popup.Create("Import succeeded");
|
||||
else
|
||||
Popup.Create("Import failed");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user