public MenuViewModel(ViewModelBrowser browser) { Browser = browser; NewSquad = new RelayCommand(CreateNewSquad); Load = new RelayCommand(LoadSquad); }
public Injector(ContainerViewModel container) { _app = new Application(); _browser = new ViewModelBrowser(container); _squadRepository = new SquadRepository(); _collections = new CollectionFactory(_app, _squadRepository); _changeManager = new ChangeManager(); _app.Managers = _squadRepository.GetManagers(); _app.Teams = _squadRepository.GetTeams(); }
public LoadTeamViewModel(Application app, ISquadRepository squadRepository, CollectionFactory collection, ViewModelBrowser browser) { App = app; Browser = browser; SquadRepository = squadRepository; Collections = collection; Teams = collection.TeamViewModels; SelectedTeam = new TeamViewModel(); Load = new RelayCommand(LoadTeam, () => SelectedTeam.Id > 0); Back = new RelayCommand(BackToMenu); }
public ManagerDetailsViewModel(Application app, CollectionFactory collection, ViewModelBrowser browser, ISquadRepository squadRepository) { App = app; Browser = browser; Collections = collection; SquadRepository = squadRepository; SetManager(); ChooseManagerVisibility = Managers.Count > 0; Cancel = new RelayCommand(NavigateToMenu); Save = new RelayCommand(SaveManager, CanSave); }
public TeamDetailsViewModel(Manager manager, Application app, ISquadRepository squadRepository, CollectionFactory collections, ViewModelBrowser browser) { App = app; SquadRepository = squadRepository; Collections = collections; Browser = browser; Managers = Collections.ManagerViewModels; Team = new TeamViewModel() { Manager = Managers.Find(m => m.Id == manager.Id) }; Back = new RelayCommand(BackToManagerDetails); Save = new RelayCommand(SaveTeam, CanSave); }
public SoccerViewModel(Team team, Application app, CollectionFactory collections, ISquadRepository squadRepository, ViewModelBrowser browser, IChangeManager changeManager, Injector injector) { App = app; SquadRepository = squadRepository; Collections = collections; Browser = browser; Source = new SoccerViewModelSource(team, injector, changeManager, Collections, SquadRepository, App); changeManager.Changeables = new List <IChangeable>() { this, Source.SoccerSquadDetails, Source.SoccerNavigationBar, Source.SoccerTeamDetails, Source.SoccerPlayerDetails, Source.SoccerLineupDetails, Source.SoccerFieldDetails, }; }
public ViewModelBrowser GetBrowser(ContainerViewModel container) { return(_browser = new ViewModelBrowser(container)); }