示例#1
0
        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);
        }
示例#2
0
        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();
        }