Exemplo n.º 1
0
 public ConnectionContextMenu(ConnectionTree connectionTree)
 {
     _connectionTree      = connectionTree;
     _connectionInitiator = new ConnectionInitiator();
     InitializeComponent();
     ApplyLanguage();
     EnableShortcutKeys();
     Opening += (sender, args) =>
     {
         AddExternalApps();
         ShowHideMenuItems();
     };
     Closing += (sender, args) => EnableMenuItemsRecursive(Items);
 }
Exemplo n.º 2
0
 public ConnectionContextMenu(ConnectionTree connectionTree)
 {
     _connectionTree      = connectionTree;
     _connectionInitiator = new ConnectionInitiator();
     InitializeComponent();
     ApplyLanguage();
     EnableShortcutKeys();
     Opening += (sender, args) =>
     {
         AddExternalApps();
         if (_connectionTree.SelectedNode == null)
         {
             args.Cancel = true;
             return;
         }
         ShowHideMenuItems();
     };
 }