public override void SetOverridesDirectory(IDeviceContextHolder holder, string directory) { ClearOverridesDirectory(); ContentTexturesDirectory = GetContentTexturesDirectory(directory); _contentTexturesWatching = DirectoryWatcher.WatchDirectory(ContentTexturesDirectory, filename => { if (CurrentDirectory != null) { UpdateOverrideLater(Path.Combine(CurrentDirectory, "skin.ini")); } }); SetOverridesDirectoryInner(holder, directory); }
protected void SetOverridesDirectoryInner([NotNull] IDeviceContextHolder holder, [NotNull] string directory) { _holder = holder; CurrentDirectory = directory; _watching = DirectoryWatcher.WatchDirectory(directory, filename => { if (filename == null) { UpdateOverridesLater(); } else { UpdateOverrideLater(filename); } }); UpdateOverridesAsync().Forget(); }