private void SessionTreeviewInstanceChanged(SessionTreeview treeViewInstance) { if (TreeViewInstance == treeViewInstance) { return; } Attach(treeViewInstance); }
private void Detach() { if (TreeViewInstance != null) { TreeViewInstance.FormClosed -= SessionTreeView_FormClosed; TreeViewInstance.SelectionChanged -= SelectedSessionChanged; } TreeViewInstance = null; SelectedSessionChanged(null); }
private void Attach(SessionTreeview sessionTreeView) { Detach(); TreeViewInstance = sessionTreeView; if (sessionTreeView != null) { TreeViewInstance.FormClosed += SessionTreeView_FormClosed; sessionTreeView.SelectionChanged += SelectedSessionChanged; SelectedSessionChanged(sessionTreeView.SelectedSession); } }
private SessionDetail() { InitializeComponent(); TreeViewInstance = null; sessionDetailPropertyGrid.PropertySort = PropertySort.NoSort; }