예제 #1
0
 public ContactListViewModel(IAlertServices alertService, INavigationServices navigationServices) : base(alertService, navigationServices)
 {
     Contacts = new ObservableCollection <Contact>();
     SelectedContactCommand = new Command <Contact>(OnSelectedContact);
     MoreCommand            = new Command <Contact>(OnMore);
     AddContactCommand      = new Command(OnAddContact);
     DeleteContactCommand   = new Command <Contact>(OnDeleteContact);
 }
예제 #2
0
        public MainViewModel(INavigationServices navigationServices)
        {
            this.navigationServices = navigationServices;

            this.NavigateCommand = new RelayCommand(() =>
            {
                this.navigationServices.Navigate(Views.Categories);
            });
        }
예제 #3
0
        public PlayersViewModel(IAlertServices alertServices, INavigationServices navigationServices, INbaApiService nbaApiServices) : base(alertServices, navigationServices, nbaApiServices)
        {
            GetActivePlayers();
            GetActiveTeams();

            SelectedPlayerCommand = new Command <Player>(OnSelectecPlayer);
            SearcherCommand       = new Command(OnSearcher);
            ClearCommand          = new Command(OnClear);
        }
예제 #4
0
        public NavigateViewModel(INavigationServices navigationServices)
        {
            this.navigationServices = navigationServices;

            this.NavigateCommand = new RelayCommand <string>((s) =>
            {
                var view = (Views)Enum.Parse(typeof(Views), s);

                this.navigationServices.Navigate(view);
            });
        }
        public PlayerInfoDetailViewModel(Player player, Team team, IAlertServices alertServices, INavigationServices navigationServices, INbaApiService nbaApiService) : base(alertServices, navigationServices, nbaApiService)
        {
            Player = player;
            Team   = team;

            PlayerFullName = player.FirstName + " " + player.LastName;
            PlayerHeight   = $"{player.HeightFeet}.{player.HeightInches}";

            ActualTeamInfo      = $"In {team.Tricode} since: ";
            YearDebutActualTeam = player.Teams[player.Teams.Count - 1].SeasonStart;
        }
예제 #6
0
 public LoginViewModel(INavigationServices navigationService)
 {
     _navService = navigationService;
 }
예제 #7
0
 protected BaseViewModel(IAlertServices alertServices, INavigationServices navigationServices, INbaApiService nbaApiService)
 {
     AlertServices      = alertServices;
     NavigationServices = navigationServices;
     NbaApiServices     = nbaApiService;
 }
예제 #8
0
 public AddContactViewModel(ref ObservableCollection <Contact> contacts, IAlertServices alertService, INavigationServices navigationServices) : base(alertService, navigationServices)
 {
     Contacts          = contacts;
     AddContactCommand = new Command(OnAddContact);
     PickPhotoCommand  = new Command(OnPickPhoto);
 }
예제 #9
0
        public EditContactViewModel(ref ObservableCollection <Contact> contacts, Contact contact, IAlertServices alertService, INavigationServices navigationServices) : base(alertService, navigationServices)
        {
            Contacts      = contacts;
            OldContact    = contact;
            ContactToEdit = contact;


            OldName            = contact.Name;
            OldPhoneNumber     = contact.PhoneNumber;
            FirstLetterOldName = contact.FirstLetterName.Substring(0, 1).ToUpper();

            EditContactCommand = new Command(OnEditContact);
            BackCommand        = new Command(OnBackCommand);
        }
예제 #10
0
 protected BaseViewModel(IAlertServices alertServices, INavigationServices navigationServices)
 {
     AlertServices      = alertServices;
     NavigationServices = navigationServices;
 }