Code cleanup.
This commit is contained in:
@@ -10,8 +10,8 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
internal static class ExtensionManager {
|
internal static class ExtensionManager {
|
||||||
static readonly Dictionary<string, List<ResourceConverter>> _converters
|
static readonly Dictionary<string, List<ResourceConverter>> _converters
|
||||||
= new Dictionary<string, List<ResourceConverter>>();
|
= new Dictionary<string, List<ResourceConverter>>();
|
||||||
public static IEnumerable<string> GetSupportedFormats() {
|
public static ISet<string> GetSupportedFormats() {
|
||||||
return _converters.Keys;
|
return new HashSet<string>(_converters.Keys);
|
||||||
}
|
}
|
||||||
public static bool TryGetConverters(string extension, out IEnumerable<ResourceConverter> converters) {
|
public static bool TryGetConverters(string extension, out IEnumerable<ResourceConverter> converters) {
|
||||||
List<ResourceConverter> outResult;
|
List<ResourceConverter> outResult;
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
DirectoryInfo[] _filteredItems = new DirectoryInfo[0];
|
DirectoryInfo[] _filteredItems = new DirectoryInfo[0];
|
||||||
string _filter = string.Empty;
|
string _filter = string.Empty;
|
||||||
readonly List<string> _dirParts = new List<string>();
|
readonly List<string> _dirParts = new List<string>();
|
||||||
public IList<string> CurrentDirectory { get { return _dirParts.AsReadOnly(); } }
|
readonly IList<string> m_dirParts;
|
||||||
|
public IList<string> CurrentDirectory { get { return m_dirParts; } }
|
||||||
public int Count { get { return _filteredItems.Length; } }
|
public int Count { get { return _filteredItems.Length; } }
|
||||||
|
|
||||||
static bool _init;
|
static bool _init;
|
||||||
@@ -34,6 +35,7 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
_init = true;
|
_init = true;
|
||||||
ExtensionManager.Init(rootPath);
|
ExtensionManager.Init(rootPath);
|
||||||
}
|
}
|
||||||
|
m_dirParts = _dirParts.AsReadOnly();
|
||||||
_watcher.Changed += OnFileChanged;
|
_watcher.Changed += OnFileChanged;
|
||||||
_watcher.Created += OnFileChanged;
|
_watcher.Created += OnFileChanged;
|
||||||
_watcher.Deleted += OnFileChanged;
|
_watcher.Deleted += OnFileChanged;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace Cryville.Crtr {
|
|||||||
static double renderStep = 0.05;
|
static double renderStep = 0.05;
|
||||||
public static double actualRenderStep = 0;
|
public static double actualRenderStep = 0;
|
||||||
static bool autoRenderStep = false;
|
static bool autoRenderStep = false;
|
||||||
public static float graphicalOffset = 0;
|
static float graphicalOffset = 0;
|
||||||
public static float soundOffset = 0;
|
public static float soundOffset = 0;
|
||||||
static float startOffset = 0;
|
static float startOffset = 0;
|
||||||
public static int areaJudgePrecision = 16;
|
public static int areaJudgePrecision = 16;
|
||||||
|
|||||||
Reference in New Issue
Block a user