コード例 #1
0
        public bool ImportWordLists(object ownerViewModel)
        {
            FileDialogResult result = _dialogService.ShowOpenFileDialog(ownerViewModel, "Import Word Lists", WordListsImporters.Keys);

            if (result.IsValid)
            {
                IWordListsImporter importer = WordListsImporters[result.SelectedFileType];
                if (Import(importer, ownerViewModel, result.FileName, (importSettingsViewModel, stream) => importer.Import(importSettingsViewModel, stream, _projectService.Project)))
                {
                    _analysisService.SegmentAll();
                    Messenger.Default.Send(new DomainModelChangedMessage(true));
                    return(true);
                }
            }
            return(false);
        }