Exemplo n.º 1
0
        private void removeSelectedMemberButton_Click(object sender, RoutedEventArgs e)
        {
            PersonModel p = (PersonModel)teamMembersListBox.SelectedItem;

            if (p != null)
            {
                SelectedTeamMembers.Remove(p);
                AvailableTeamMembers.Add(p);

                if (_availableTeamMembers.Count > 0)
                {
                    selectTeamMemberDropDown.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 2
0
        private void CreateSampleData()
        {
            AvailableTeamMembers.Add(new PersonModel {
                FirstName = "Tim", LastName = "Corey"
            });
            AvailableTeamMembers.Add(new PersonModel {
                FirstName = "Sue", LastName = "Storm"
            });

            SelectedTeamMembers.Add(new PersonModel {
                FirstName = "Bill", LastName = "Jones"
            });
            SelectedTeamMembers.Add(new PersonModel {
                FirstName = "Jane", LastName = "Smith"
            });
        }