コード例 #1
0
ファイル: MemberListViewMenu.cs プロジェクト: markusl/jro
        /// <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(); };
        }
コード例 #2
0
 public DefaultMemberListStatus(IMemberListView memberList)
 {
     _memberList = memberList;
 }