Ejemplo n.º 1
0
        public TeamsViewModel(IApplicationService applicationService)
        {
            Teams = new ReactiveList <TeamShortModel>();

            GoToTeamCommand = ReactiveCommand.Create();
            GoToTeamCommand.OfType <TeamShortModel>().Subscribe(x =>
            {
                var vm = CreateViewModel <TeamMembersViewModel>();
                vm.Id  = x.Id;
                ShowViewModel(vm);
            });

            LoadCommand = ReactiveCommand.CreateAsyncTask(x =>
                                                          Teams.SimpleCollectionLoad(applicationService.Client.Organizations[OrganizationName].GetTeams(), x as bool?));
        }
Ejemplo n.º 2
0
        public TeamsViewModel(IApplicationService applicationService)
        {
            Teams = _teams.CreateDerivedCollection(x => x,
                                                   x => x.Name.ContainsKeyword(SearchKeyword),
                                                   signalReset: this.WhenAnyValue(x => x.SearchKeyword));

            GoToTeamCommand = ReactiveCommand.Create();
            GoToTeamCommand.OfType <TeamShortModel>().Subscribe(x =>
            {
                var vm = CreateViewModel <TeamMembersViewModel>();
                vm.Id  = x.Id;
                ShowViewModel(vm);
            });

            LoadCommand = ReactiveCommand.CreateAsyncTask(x =>
                                                          _teams.SimpleCollectionLoad(applicationService.Client.Organizations[OrganizationName].GetTeams(), x as bool?));
        }