示例#1
0
        private void IncludeButton_Click(object sender, RoutedEventArgs e)
        {
            string addedBrewery = ListBoxAllBreweries.SelectedItem.ToString();

            CheckedBreweries.Add(addedBrewery);
            AllBreweries.Remove(addedBrewery);
        }
示例#2
0
 private void AddBreweriesToViewList()
 {
     _distributorForEdit.Breweries.ToList().ForEach(b => CheckedBreweries.Add(b.Name));
     AllBreweries = BeerService.GetAllBreweriesNames();
     foreach (var i in CheckedBreweries)
     {
         AllBreweries.Remove(i);
     }
     CheckedBreweries.OrderBy(b => b);
     AllBreweries.OrderBy(b => b);
     this.ListBoxAllBreweries.ItemsSource         = AllBreweries;
     this.ListBoxDistributorBreweries.ItemsSource = CheckedBreweries;
 }