Пример #1
0
        private void UpdateRlFolders(string systemName, string romname, string mediatype)
        {
            SelectedFolder = RlStaticMethods.GetSelectedPath(_settings.HypermintSettings.RlMediaPath, mediatype, systemName, romname);

            if (!Directory.Exists(SelectedFolder))
            {
                return;
            }

            var rlRootFolderItem = new RlFileItemViewModel(SelectedFolder, true);

            var dirs = Directory.EnumerateDirectories(SelectedFolder, "*", SearchOption.AllDirectories);

            foreach (var dir in dirs)
            {
                var rlFolderItem = new RlFileItemViewModel(dir, true);

                var files = Directory.EnumerateFiles(dir);
                foreach (var file in files)
                {
                    rlFolderItem.Children.Add(new RlFileItemViewModel(file));
                }

                rlRootFolderItem.Children.Add(rlFolderItem);
            }

            var rootFiles = Directory.EnumerateFiles(SelectedFolder);

            foreach (var file in rootFiles)
            {
                rlRootFolderItem.Children.Add(new RlFileItemViewModel(file));
            }

            RlFiles.Add(rlRootFolderItem);
        }
Пример #2
0
        private async Task ShowFilesDialogsAsync(IEnumerable <string> dragFileList)
        {
            var _currentPath = RlStaticMethods.GetSelectedPath(_settings.HypermintSettings.RlMediaPath, MediaType, _selectedService.CurrentSystem, _selectedService.CurrentRomname);

            foreach (var file in dragFileList)
            {
                _droppedFilesViewModel = new DroppedFilesViewModel(MediaType, file, _dialogService, customDialog);

                await DroppedFileCustomDialogAsync(file);

                await customDialog.WaitUntilUnloadedAsync();

                if (cancelPending)
                {
                    break;
                }
            }
        }