示例#1
0
        private bool ArchiveModOptionExists(string filePath)
        {
            ModOption existingArchiveOption = ArchiveModOptions.Where(
                x => x.SourceFilePath == filePath
                ).FirstOrDefault();

            return(existingArchiveOption != null);
        }
示例#2
0
        private void OnFilesSelected(FilesSelectedMessage message)
        {
            UpdateGameComboBox();
            if (message.ReplaceSelection)
            {
                ArchiveModOptions.Clear();
            }
            bool oneFilePath = message.FilePaths.Count == 1;

            foreach (string filePath in message.FilePaths)
            {
                string fileName = Path.GetFileName(filePath);
                if (ArchiveModOptionExists(filePath))
                {
                    continue;
                }
                LogService.GroupMessage("analysis", "Selected file " + filePath);
                try {
                    ArchiveModOptions.Add(new ModOption(fileName, filePath, oneFilePath));
                } catch (Exception x) {
                    LogService.GroupMessage("analysis", "Exception creating mod option, " + x.Message);
                }
            }
        }
示例#3
0
 private void AnalyzeMod()
 {
     MessengerInstance.Send(new NavigationMessage("ExtractArchives"));
     ViewModelLocator.Instance().ExtractArchivesViewModel.OnArchivesClassified(ArchiveModOptions.ToList());
 }