Restructure resource managers. Add remove resource interface and directory changed event.
This commit is contained in:
@@ -2,10 +2,17 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cryville.Crtr.Browsing {
|
||||
public interface IResourceManager<T> : IReadOnlyList<T> {
|
||||
Uri GetItemUri(int id);
|
||||
public interface IResourceManager {
|
||||
int Count { get; }
|
||||
|
||||
object this[int index] { get; }
|
||||
Uri GetItemUri(int index);
|
||||
|
||||
event Action ItemChanged;
|
||||
bool IsReadOnly { get; }
|
||||
bool ImportFrom(Uri uri);
|
||||
void RemoveAt(int index);
|
||||
|
||||
bool ImportItemFrom(Uri uri);
|
||||
[Obsolete]
|
||||
string[] GetSupportedFormats();
|
||||
[Obsolete]
|
||||
@@ -13,13 +20,15 @@ namespace Cryville.Crtr.Browsing {
|
||||
|
||||
void Activate();
|
||||
void Deactivate();
|
||||
|
||||
event Action ItemChanged;
|
||||
}
|
||||
public interface IResourceManager<T> : IResourceManager {
|
||||
new T this[int index] { get; }
|
||||
}
|
||||
public interface IPathedResourceManager<T> : IResourceManager<T> {
|
||||
string[] CurrentDirectory { get; }
|
||||
void ChangeDirectory(string[] dir);
|
||||
void OpenDirectory(int id);
|
||||
event Action DirectoryChanged;
|
||||
IList<string> CurrentDirectory { get; }
|
||||
void ChangeDirectory(IEnumerable<string> dir);
|
||||
void OpenDirectory(int index);
|
||||
void ReturnToDirectory(int index);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user