// TODO: ctor that accepts IXxxServiceAgent public ScheduleViewModel(IScheduleServiceAgent serviceAgent) { _serviceAgent = serviceAgent; Teams = new ObservableCollection <CoreTeams>(CurrentSession.GetTeams()); TeamNames = new ObservableCollection <CoreTeams>(CurrentSession.GetTeams()); TeamNames.RemoveAt(0); Schedules = _serviceAgent.SetSchedule(); WeekNumber = "14"; }
/// <summary> /// It creates all the necessary object for the model to be loaded /// </summary> private void PrepareForTheShow() { TheConfig = new Config(Settings.Default.ServerIp, Settings.Default.ServerPort, Settings.Default.ScenePath, Settings.Default.FeedbackPort); iPad = new iPad(Settings.Default.iPadIP, Settings.Default.iPadPort); VizPgm = new VizEngine(TheConfig.EngineIp, TheConfig.EnginePort); CurrentSession.Config = TheConfig; CurrentSession.VizEngine = VizPgm; CurrentSession.IPad = iPad; CurrentSession.Teams = CurrentSession.GetTeams(); _feedback = new FeedbackCoordinator(TheConfig); mainWindow = new MainWindow(); mainWindow.Show(); }
// TODO: ctor that accepts IXxxServiceAgent public InjuryViewModel(IInjuryServiceAgent serviceAgent) { _serviceAgent = serviceAgent; Teams = new ObservableCollection <CoreTeams>(CurrentSession.GetTeams()); InjuredPlayers = new ObservableCollection <Injuries>(); for (int i = 0; i < 7; i++) { InjuredPlayers.Add(new Injuries()); } LoadFromXML(); }
// TODO: ctor that accepts IXxxServiceAgent public NfcDivisionViewModel(IPlayoffDivisionServiceAgent serviceAgent) { _serviceAgent = serviceAgent; Teams = new ObservableCollection <CoreTeams>(CurrentSession.GetTeams()); PlayoffTeams = new ObservableCollection <PlayoffTeam>(); Tags = new ObservableCollection <string> { "", "X", "Y", "Z" }; for (int i = 0; i < 14; i++) { PlayoffTeams.Add(new PlayoffTeam()); } LoadFromXML(); }