Пример #1
0
        private void SessionTreeViewInstanceChanged(SessionTreeView treeViewInstance)
        {
            if (_treeViewInstance == treeViewInstance)
            {
                return;
            }

            Attach(treeViewInstance);
        }
Пример #2
0
 /// <summary>
 /// отвязывание SessionTreeView от SessionDetails
 /// </summary>
 private void Detach()
 {
     if (_treeViewInstance != null)
     {
         _treeViewInstance.FormClosed       -= SessionTreeView_FormClosed;
         _treeViewInstance.SelectionChanged -= SelectedSessionChanged;
         _treeViewInstance = null;
     }
     SelectedSessionChanged(null);
 }
Пример #3
0
 /// <summary>
 /// подключение SessionTreeView к SessionDetails
 /// </summary>
 /// <param name="sessionTreeView"></param>
 private void Attach(SessionTreeView sessionTreeView)
 {
     Detach();
     _treeViewInstance = sessionTreeView;
     if (sessionTreeView != null)
     {
         _treeViewInstance.FormClosed     += SessionTreeView_FormClosed;
         sessionTreeView.SelectionChanged += SelectedSessionChanged;
         SelectedSessionChanged(sessionTreeView.SelectedSession);
     }
 }
Пример #4
0
 public SessionDetail()
 {
     InitializeComponent();
     _treeViewInstance = null;
     sessionDetailPropertyGrid.PropertySort = PropertySort.NoSort;
 }