コード例 #1
0
 public SearchFilesViewModel(PluginsStudioViewModel mainViewModel)
 {
     // Inicializa las propiedades
     MainViewModel        = mainViewModel;
     FoldersViewModel     = new ControlListViewModel();
     TreeResultsViewModel = new TreeSearchFilesResultViewModel(this);
     // Inicializa los comandos
     SearchCommand = new BaseCommand(async _ => await SearchFilesAsync(), _ => CanSearchFiles())
                     .AddListener(this, nameof(TextSearch));
 }
コード例 #2
0
 public TreeResultNodeViewModel(TreeSearchFilesResultViewModel trvTree, IHierarchicalViewModel parent,
                                string text, string fileName, int line, string textFound, bool isBold, MvvmColor foreground)
     : base(parent, text, null, false, isBold, foreground)
 {
     TreeViewModel = trvTree;
     if (!string.IsNullOrWhiteSpace(fileName) && line < 1)
     {
         Text = System.IO.Path.GetFileName(fileName);
     }
     FileName  = fileName;
     Line      = line;
     TextFound = textFound;
 }