예제 #1
0
 public ModificaDatiViewModel(INavService navService, UserService userService, FotoService fotoService) : base(navService)
 {
     _userService = userService;
     _fotoService = fotoService;
     Immagine     = new Image();
     ListaCitta   = MiscCostants.tutteCitta;
 }
예제 #2
0
 public AnnunciUtenteViewModel(INavService navService, AnnuncioService annuncioService, FotoService fotoService) : base(navService)
 {
     _annuncioService    = annuncioService;
     _fotoService        = fotoService;
     AnnunciPrenotati    = new ObservableCollection <Ad>();
     AnnunciNonPrenotati = new ObservableCollection <Ad>();
 }
예제 #3
0
 public MainViewModel(FotoService service)
 {
     this.service             = service;
     GetAlbenCommand          = new RelayCommand(GetAllAlben);
     GetFotosFromAlbumCommand = new RelayCommand(GetFotosFromAlbum);
     SearchtextChangedCommand = new RelayCommand(FilterAlbum);
 }
예제 #4
0
 public AggiungiAnnuncioViewModel(INavService navService, FotoService fotoService, AnnuncioService annuncioService) : base(navService)
 {
     _fotoService          = fotoService;
     _annuncioService      = annuncioService;
     Immagini              = new ObservableCollection <Image>();
     listaImmaginiInBase64 = new List <string>();
 }
예제 #5
0
 public UtentePageViewModel(INavService navService, AuthenticationService authService, UserService userService, FotoService fotoService, AnnuncioService annuncioService) : base(navService)
 {
     _authService     = authService;
     _userService     = userService;
     _fotoService     = fotoService;
     _annuncioService = annuncioService;
     Immagine         = new Image();
 }
예제 #6
0
        public override void Load()
        {
            // Carico i ViewModels
            Bind <LoginPageViewModel>().ToSelf();
            Bind <SearchPageViewModel>().ToSelf();
            Bind <SubmitPageViewModel>().ToSelf();
            Bind <AnnunciPageViewModel>().ToSelf();
            Bind <UtentePageViewModel>().ToSelf();
            Bind <DettaglioAnnuncioViewModel>().ToSelf();
            Bind <AggiungiAnnuncioViewModel>().ToSelf();
            Bind <ModificaDatiViewModel>().ToSelf();
            Bind <AnnunciUtenteViewModel>().ToSelf();
            Bind <GestioneAnnuncioViewModel>().ToSelf();
            Bind <InfoUtenteViewModel>().ToSelf();
            Bind <AnnunciQueryViewModel>().ToSelf();

            // E' importante fare il binding di tutti i servizi che
            // non servono in quantità molteplice nelle injection

            // Qui crei le istanze
            var requestService = new RequestService();
            var authService    = new AuthenticationService(requestService);
            var userService    = new UserService(requestService);
            var fotoService    = new FotoService(requestService);

            // Qui gli fai il binding come singoletto
            Bind <IRequestService>().
            ToMethod(x => requestService)
            .InSingletonScope();

            // ***
            Bind <IAuthenticationService>()
            .ToMethod(x => authService)
            .InSingletonScope();

            // ***
            Bind <IUserService>()
            .ToMethod(x => userService)
            .InSingletonScope();

            // ***
            Bind <IFotoService>()
            .ToMethod(x => fotoService)
            .InSingletonScope();
        }
예제 #7
0
 public LoginController()
 {
     uS = new UsuarioServiceImp();
     fS = new FotoServiceImp();
 }
예제 #8
0
 public DettaglioAnnuncioViewModel(INavService navService, FotoService fotoService, UserService userService) : base(navService)
 {
     _fotoService = fotoService;
     _userService = userService;
     Immagini     = new List <Image>();
 }
예제 #9
0
 public FotoController()
 {
     fS = new FotoServiceImp();
     uS = new UsuarioServiceImp();
 }
예제 #10
0
 public InfoUtenteViewModel(INavService navService, AnnuncioService annuncioService, FotoService fotoService, UserService utenteService) : base(navService)
 {
     _annuncioService = annuncioService;
     _fotoService     = fotoService;
     _utenteService   = utenteService;
 }
예제 #11
0
 public AnnunciPageViewModel(INavService navService, AnnuncioService annuncioService, FotoService fotoService) : base(navService)
 {
     _annuncioService = annuncioService;
     _fotoService     = fotoService;
     Annunci          = new ObservableCollection <Ad>();
 }
예제 #12
0
 public GestioneAnnuncioViewModel(INavService navService, AnnuncioService annuncioService, FotoService fotoService) : base(navService)
 {
     _annuncioService = annuncioService;
     _fotoService     = fotoService;
     Immagini         = new List <Image>();
 }