예제 #1
0
 protected override void OnAttachPresenter(BolapanControl.ItemsFilter.FilterPresenter presenter)
 {
     base.OnAttachPresenter(presenter);
     foreach (CityCustomersTreeItem item in presenter.CollectionView.SourceCollection)
     {
         BolapanControl.ItemsFilter.FilterPresenter customersPresenter = BolapanControl.ItemsFilter.FilterPresenter.TryGet(item.Customers);
         CustomersTreeFilter customerFilter = customersPresenter.TryGetFilter(Key, customerFilterInitializer) as CustomersTreeFilter;
         if (customerFilter != null)
         {
             customerFilter.NameCompareTo    = NameCompareTo;
             customerFilter.ContactCompareTo = ContactCompareTo;
             customerFilters[item]           = customerFilter;
         }
     }
 }
예제 #2
0
 protected override void OnAttachPresenter(BolapanControl.ItemsFilter.FilterPresenter presenter)
 {
     foreach (CountryCustomersTreeItem country in ((CustomersTreeVm)(presenter.CollectionView.SourceCollection)))
     {
         BolapanControl.ItemsFilter.FilterPresenter citiesPresenter = BolapanControl.ItemsFilter.FilterPresenter.TryGet(country.Cities);
         CitiesTreeFilter cityFilter = citiesPresenter.TryGetFilter(Key, citiItemFilterInitializer) as CitiesTreeFilter;
         if (cityFilter != null)
         {
             cityFilter.CityCompareTo    = CityCompareTo;
             cityFilter.NameCompareTo    = NameCompareTo;
             cityFilter.ContactCompareTo = ContactCompareTo;
             cityFilters[country]        = cityFilter;
         }
     }
 }