/// <summary> /// Construct new menu builder with the view and member container. /// </summary> public MemberListViewMenu(IMemberListView view, MembersContainer container) { _container = container; _view = view; _dispatcher = Dispatcher.CurrentDispatcher; // menu needs to be rebuilt when selected items or the members in the container are changed _delayMenuRebuild = new EventDelayer<bool>(delegate { RebuildMenu(); return true; }, _dispatcher); _container.SavingChanges += delegate { _delayMenuRebuild.DelayEvent(); }; _view.SelectedItems.CollectionChanged += delegate { _delayMenuRebuild.DelayEvent(); }; }
public DefaultMemberListStatus(IMemberListView memberList) { _memberList = memberList; }