private void LoadFiles()
        {
            AvailableResourcePacks.Clear();
            AvailableResourcePacks.Add(string.Empty);

            foreach (var file in Directory.GetFiles(_pathService.ResourcePackDirectory, "*.rpk"))
            {
                AvailableResourcePacks.Add(Path.GetFileNameWithoutExtension(file));
            }
        }
        private void LoadData()
        {
            ModuleData moduleData = _domainService.GetLoadedModuleData();

            ResourcePacks.Clear();

            foreach (var pack in moduleData.ResourcePacks)
            {
                ResourcePacks.Add(pack);
            }

            SelectedAvailableResourcePack = AvailableResourcePacks.First();
        }
        private void FileSystemWatcherOnDeleted(object sender, FileSystemEventArgs e)
        {
            string name = Path.GetFileNameWithoutExtension(e.Name);

            if (Path.GetExtension(e.Name) != ".rpk")
            {
                return;
            }

            Application.Current.Dispatcher.Invoke(() =>
            {
                AvailableResourcePacks.Remove(name);
            });
        }
        private void FileSystemWatcherOnRenamed(object sender, RenamedEventArgs e)
        {
            string oldName = Path.GetFileNameWithoutExtension(e.OldName);
            string newName = Path.GetFileNameWithoutExtension(e.Name);

            Application.Current.Dispatcher.Invoke(() =>
            {
                if (Path.GetExtension(e.OldName) == ".rpk")
                {
                    AvailableResourcePacks.Remove(oldName);
                }
                if (Path.GetExtension(e.Name) == ".rpk")
                {
                    AvailableResourcePacks.Add(newName);
                }
            });
        }