Exemplo n.º 1
0
        public override void SetOverridesDirectory(IDeviceContextHolder holder, string directory)
        {
            ClearOverridesDirectory();

            ContentTexturesDirectory = GetContentTexturesDirectory(directory);
            _contentTexturesWatching = DirectoryWatcher.Watch(ContentTexturesDirectory, filename => {
                if (CurrentDirectory != null)
                {
                    UpdateOverrideLater(Path.Combine(CurrentDirectory, "skin.ini"));
                }
            });

            SetOverridesDirectoryInner(holder, directory);
        }
Exemplo n.º 2
0
        protected void SetOverridesDirectoryInner([NotNull] IDeviceContextHolder holder, [NotNull] string directory)
        {
            _holder          = holder;
            CurrentDirectory = directory;
            _watching        = DirectoryWatcher.Watch(directory, filename => {
                if (filename == null)
                {
                    UpdateOverridesLater();
                }
                else
                {
                    UpdateOverrideLater(filename);
                }
            });

            UpdateOverridesAsync().Forget();
        }