public void AddPath(string path) { Location sp = new Location(path); //_searchPathList.Add(sp); SearchPathViewModel spvm = new SearchPathViewModel(sp); spvm.PropertyChanged += OnSearchPathPropertyChanged; SearchLocations.Add(spvm); }
/*public LocationsModel() * { * _searchPathList = new List<SearchPath>(); * _locationsObservable = new ObservableCollection<SearchPathViewModel>(); * }*/ public LocationsModel(CoreLib core, List <Location> list) { _core = core; _searchLocationsObservable = new ObservableCollection <SearchPathViewModel>(); foreach (var path in list) { SearchPathViewModel spvm = new SearchPathViewModel(path); _searchLocationsObservable.Add(spvm); } }