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 }); } }
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(); }