//Constructor public ViewModelViewEditWedstrijdSchema() { this.WedstrijdSecretariaat = new WedstrijdSecretariaat(DataBaseRepository); this.TeamListCombobox = new CommuncatingCombobox <VoetbalTeam>(FilteredTeamList.ToList()); this.ResetUI(); this.SaveNieuweWedstrijd = new Command(this.SaveNieuweWedstrijdExecute, () => !InEditingMode); this.PasWedstrijdAan = new Command(this.PasWedstrijdAanExecute, () => InEditingMode); this.Delete = new Command(this.DeleteWedstrijdExecute, () => InEditingMode); this.Cancel = new Command(this.CancelExecute, () => true); this.SpeelWedstrijden = new Command(this.SpeelWedstrijdenExecute, () => true); //TeamListCombobox laat de teams in de dropdown zien na keuze van een team voor bijv //ThuisTeam is dit Team niet meer beschikbaar in de lijst van UitTeam this.TeamListCombobox.InputLeftChanged += () => TeamListCombobox.UpdateListRight(TeamListCombobox.InputLeft); this.TeamListCombobox.InputLeftChanged += UpdateComboBox; this.TeamListCombobox.InputRightChanged += () => TeamListCombobox.UpdateListLeft(TeamListCombobox.InputRight); this.TeamListCombobox.InputRightChanged += UpdateComboBox; this.TeamListCombobox.SourceListChanged += () => TeamListCombobox.UpdateListLeft(TeamListCombobox.InputRight); this.TeamListCombobox.SourceListChanged += () => TeamListCombobox.UpdateListRight(TeamListCombobox.InputLeft); this.TeamListCombobox.SourceListChanged += UpdateComboBox; }