Ejemplo n.º 1
0
        protected override void OnSelectedItemsChanged(IEnumerable <Server> newValue)
        {
            base.OnSelectedItemsChanged(newValue);

            interfaceFilterPredicate   = (intf) => newValue.Select(item => RelatedInterfacePredicate(item)).Any(pred => pred(intf));
            typeLibraryFilterPredicate = (typeLibrary) => newValue.Select(item => RelatedTypeLibraryPredicate(item)).Any(pred => pred(typeLibrary));

            InterfaceCollection.Refresh();
            TypeLibraryCollection.Refresh();
        }
Ejemplo n.º 2
0
        public MasterServerCollection(Browser browser)
            : base(browser)
        {
            InterfaceCollection   = new InterfaceCollection(browser, InterfaceFilter);
            TypeLibraryCollection = new TypeLibraryCollection(browser, TypeLibraryFilter);

            BindingOperations.SetBinding(InterfaceCollection, InterfaceCollection.ItemsProperty, new Binding("InterfaceCollection.Items")
            {
                Source = browser, Mode = BindingMode.OneWay
            });
            BindingOperations.SetBinding(TypeLibraryCollection, TypeLibraryCollection.ItemsProperty, new Binding("TypeLibraryCollection.Items")
            {
                Source = browser, Mode = BindingMode.OneWay
            });
        }