예제 #1
0
        void TreeView1OnAfterSelect(object sender, TreeViewEventArgs treeViewEventArgs)
        {
            ITreeViewItem item = (ITreeViewItem)treeViewEventArgs.Node.Tag;

            if (_aggregator.IsNotNullObj())
            {
                _aggregator.PublishEvent(new TreeViewModelEvent()
                {
                    Item         = item,
                    TypeOfAction = TreeViewModelEvent.ActionType.Selected
                });
            }
        }
예제 #2
0
        public void AttachCategories(IFileRepository <CategoryCollection> collection, IEventAggregator aggregator)
        {
            _collection = collection;
            if (aggregator.IsNotNullObj())
            {
                _aggregator = aggregator;
                _aggregator.SubsribeEvent(this);
                rulesGridControl1.AttachEventAggregator(_aggregator);
            }

            _treeViewModel.CreateTree(treeView1, collection.Item, _aggregator);
            UpdateColors();
        }