Code cleanup.

This commit is contained in:
2023-11-29 22:25:21 +08:00
parent d74db533dc
commit de1e9f9019
3 changed files with 6 additions and 4 deletions

View File

@@ -20,7 +20,8 @@ namespace Cryville.Crtr.Browsing {
DirectoryInfo[] _filteredItems = new DirectoryInfo[0];
string _filter = string.Empty;
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; } }
static bool _init;
@@ -34,6 +35,7 @@ namespace Cryville.Crtr.Browsing {
_init = true;
ExtensionManager.Init(rootPath);
}
m_dirParts = _dirParts.AsReadOnly();
_watcher.Changed += OnFileChanged;
_watcher.Created += OnFileChanged;
_watcher.Deleted += OnFileChanged;