public MainWindow() { InitializeComponent(); Database db = new Database(); MasterVm mvm = new MasterVm(db); Jobs.DataContext = mvm; Filtres.DataContext = mvm; Status.DataContext = mvm; }
public MasterVm(Database db) { _db = db; _jobs = new ObservableCollection<AnnonceVm>(); _tags = new ObservableCollection<TagVm>(); foreach (var annonce in _db.Annonces) { Jobs.Add(new AnnonceVm(annonce, this)); } _collectionView = CollectionViewSource.GetDefaultView(Jobs); _city = ""; _contract = ""; _currentTag = ""; _stared = false; Status = String.Format("{0} annonce(s)",_db.Annonces.Count); }
public LocalSave(Database db) { _db = db; _path = "save.json"; }