Example #1
0
        public MainViewModel(ConfigValues configValues, WorkspaceDirectoryModel workspaceDirectoryModel,
                             TreeViewModel treeViewModel, FilesPatternProvider filesPatternProvider, CommandExecutor commandExecutor, PowershellTreeRestructurer powershellTreeRestructurer)
        {
            this.configValues                   = configValues;
            this.WorkspaceDirectoryModel        = workspaceDirectoryModel;
            this.TreeViewModel                  = treeViewModel;
            this.filesPatternProvider           = filesPatternProvider;
            this.commandExecutor                = commandExecutor;
            this.powershellTreeRestructurer     = powershellTreeRestructurer;
            this.TreeViewModel.PropertyChanged += (s, e) => { if (e.PropertyName == "NumberOfFiles")
                                                              {
                                                                  this.OnPropertyChanged("TreeItemsResultString");
                                                              }
            };

            this.searchRegex    = configValues.SearchRegex;
            this.indexFilesMode = configValues.IndexFilesMode;
            this.showAllFiles   = configValues.ShowAllFiles;
            this.filesPatternProvider.IncludeAllFiles   = this.showAllFiles;
            this.filesPatternProvider.ExcludePaths      = configValues.ExcludePaths;
            this.filesPatternProvider.IndexFilesMode    = configValues.IndexFilesMode;
            this.powershellTreeRestructurer.ShowRegions = !configValues.SortFunctions;
            NodeComparerProvider.SortFunctions          = configValues.SortFunctions;

            this.syncWithActiveDocument = configValues.SyncWithActiveDocument;
            var searchField = (indexFilesMode != IndexingMode.NO_FILES ? FullTextFieldType.CatchAll : FullTextFieldType.Name);

            this.SearchOptions = new SearchOptions(searchField, string.Empty, this.searchRegex);
        }
        public MainViewModel(ConfigValues configValues, WorkspaceDirectoryModel workspaceDirectoryModel,
                             TreeViewModel treeViewModel, FilesPatternProvider filesPatternProvider, CommandExecutor commandExecutor)
        {
            this.configValues                   = configValues;
            this.WorkspaceDirectoryModel        = workspaceDirectoryModel;
            this.TreeViewModel                  = treeViewModel;
            this.filesPatternProvider           = filesPatternProvider;
            this.commandExecutor                = commandExecutor;
            this.TreeViewModel.PropertyChanged += (s, e) => { if (e.PropertyName == "NumberOfFiles")
                                                              {
                                                                  this.OnPropertyChanged("TreeItemsResultString");
                                                              }
            };

            this.searchRegex   = configValues.SearchRegex;
            this.searchInFiles = configValues.SearchInFiles;
            this.showAllFiles  = configValues.ShowAllFiles;
            this.filesPatternProvider.IncludeAllFiles = this.showAllFiles;
            this.filesPatternProvider.ExcludePaths    = configValues.ExcludePaths;

            this.syncWithActiveDocument = configValues.SyncWithActiveDocument;
            var searchField = (this.searchInFiles ? FullTextFieldType.CatchAll : FullTextFieldType.Name);

            this.SearchOptions = new SearchOptions(searchField, string.Empty, this.searchRegex);
        }
 public Bootstrap(IseIntegrator iseIntegrator, IseFileReloader iseFileReloader, CommandExecutor commandExecutor,
     WorkspaceDirectoryModel workspaceDirectoryModel, DocumentHierarchyFactory documentHierarchyFactory, FileSystemChangeWatcher fileSystemChangeWatcher)
 {
     this.iseIntegrator = iseIntegrator;
     this.iseFileReloader = iseFileReloader;
     this.commandExecutor = commandExecutor;
     this.workspaceDirectoryModel = workspaceDirectoryModel;
     this.documentHierarchyFactory = documentHierarchyFactory;
     this.fileSystemChangeWatcher = fileSystemChangeWatcher;
 }
 public ChangeWorkspaceCommand(WorkspaceDirectoryModel workspaceDirectoryModel, MessageBoxHelper messageBoxHelper)
 {
     this.workspaceDirectoryModel = workspaceDirectoryModel;
     this.messageBoxHelper = messageBoxHelper;
 }
 public OpenExplorerContextMenuCommand(TreeViewModel treeViewModel, WorkspaceDirectoryModel workspaceDirectoryModel)
 {
     this.treeViewModel = treeViewModel;
     this.workspaceDirectoryModel = workspaceDirectoryModel;
 }