private void RefreshDetalje(SharedModels.Users rezultat) { var mainStranica = Navigation.NavigationStack[0]; Navigation.InsertPageBefore(new UsersMain(rezultat), mainStranica); bool brisi = false; List <Page> listaBrisanja = new List <Page>(); foreach (var i in Navigation.NavigationStack) { if (brisi) { listaBrisanja.Add(i); } if (i is UsersMain && !brisi) { brisi = true; } } //kad naleti na prvu main stavlja na true i sve ostale stranice brise poslije var a = Navigation.NavigationStack[0].BindingContext as UsersListaViewModel; if (a != null && a.DobaviUsere.CanExecute(null)) { a.DobaviUsere.Execute(null); } foreach (var i in listaBrisanja) { Navigation.RemovePage(i); } }
public UsersStatistikeViewModel(SharedModels.Users _user) { ListaStatistika = new ObservableCollection <SharedModels.Statistike>(); foreach (var i in _user.statistike) { ListaStatistika.Add(i); } }
public UsersDetaljiViewModel(SharedModels.Users _user = null) { _UsersAPIService = new UsersAPIService(); ListaPreporucenihKorisnika = new ObservableCollection <SharedModels.Users>(); Title = _user?.PrikaznoIme; User = _user; BrojPobjeda = GetBrojPobjeda(); BrojPoraza = GetBrojPoraza(); GetPreporuceneCommand = new Command(async() => await UnesiPreporucene()); isEditVisible = _user.ID == BaseAPIService.ID; }
public UsersEditViewModel(SharedModels.Users user) { NapuniComboListe(); this.User = user; PrikaznoIme = user.PrikaznoIme; Visina = user.Visina; JacaRuka = user.JacaRuka; //GradId = Gradovi.Where(d => d.Naziv == user.Grad).Select(d => d.ID).SingleOrDefault(); //SelectedGrad = Gradovi.Where(d => d.ID == GradId).SingleOrDefault(); SlikaProfila = user.ProfileImage; }
public UsersMain(SharedModels.Users _user) { InitializeComponent(); Title = _user.PrikaznoIme; var detaljiStranica = new UsersDetalji(new UsersDetaljiViewModel(_user)); detaljiStranica.Title = "Detalji"; Children.Add(detaljiStranica); var statistikeStranica = new UsersStatistike(_user); statistikeStranica.Title = "Statistike"; Children.Add(statistikeStranica); var prijaveStranica = new UsersPrijave(_user); prijaveStranica.Title = "Prijave"; Children.Add(prijaveStranica); }
public UsersStatistike(SharedModels.Users _user) { InitializeComponent(); BindingContext = viewModel = new UsersStatistikeViewModel(_user); }
public UsersPrijaveViewModel(SharedModels.Users user) { DodajPrijave(user.listaPrijava); IsVlasnik = user.ID == BaseAPIService.ID; }
public UsersEdit(SharedModels.Users user) { BindingContext = viewModel = new UsersEditViewModel(user); InitializeComponent(); jacarukaPicker.SelectedItem = user.JacaRuka; }
public UsersPrijave(SharedModels.Users user) { BindingContext = viewModel = new UsersPrijaveViewModel(user); InitializeComponent(); lblEmpty.IsVisible = viewModel.listaPrijava.Count == 0; }