コード例 #1
0
 public AddPageViewModel(Page page, INavigation navigation, UserModel user)
 {
     Title                  = "Add Annonce";
     this.OnAdd             = new Command(async() => await OnAddRequest());
     this._annoncesServices = new AnnoncesServices();
     this._annonceModel     = new AnnoncePostModel();
     this.navigation        = navigation;
     this._page             = page;
     this._user             = user;
 }
コード例 #2
0
 public ListPageViewModel(INavigation navigation, UserModel user)
 {
     Title             = "Annonces";
     this._navigation  = navigation;
     this.ListAnnonces = new ObservableCollection <AnnonceModel>();
     this._webServices = new AnnoncesServices();
     this.AddAnnonce   = new Command(async() => await GoToAddPage());
     this._user        = user;
     this.getall();
     MessagingCenter.Subscribe <AddPageViewModel>(this, "PopPage", (sender) => {
         this.ListAnnonces.Clear();
         this.getall();
     });
 }