Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            Database db         = new Database();
            MasterVm mvm        = new MasterVm(db);

            Jobs.DataContext    = mvm;
            Filtres.DataContext = mvm;
            Status.DataContext  = mvm;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public LocalSave(Database db)
 {
     _db   = db;
     _path = "save.json";
 }