private async void FindRun(Object obj) { TimerForWPF.Stop(); TimerForWPF.Start(); Model.RootFileOrFolder = new FileOrFolder { Name = RootFolder, IsFile = false, Path = RootFolder, ChldFileOrFolders = new System.Collections.ObjectModel.ObservableCollection <FileOrFolder>() }; Model.FilterForSearch = new FilterForSearch { Name = TemplateNameFile ?? "*.*", Content = ContentFile ?? "" }; FileOrFolder.Clear(); if (await Model.SearchRun()) { TimerForWPF.Pause(); if (Model.RootFileOrFolder != null) { FileOrFolder.Add(Model.RootFileOrFolder); } OnPropertyChanged("FileOrFolder"); } }
private void StopRun(Object obj) { if (Model.SearchStatus == SearchStatus.NotRun) { return; } Model.Stop(); TimerForWPF.Stop(); }