private void InitListView() { _directivesViewer = new ATLBListView(CurrentAircraft) { TabIndex = 2, Location = new Point(panel1.Left, panel1.Top), Dock = DockStyle.Fill }; _directivesViewer.SelectedItemsChanged += DirectivesViewerSelectedItemsChanged; Controls.Add(_directivesViewer); panel1.Controls.Add(_directivesViewer); _directivesViewer.AddMenuItems(_toolStripMenuItemTitle, _toolStripSeparator1, _toolStripMenuItemAdd, _toolStripSeparator2, _toolStripMenuItemProperties); _directivesViewer.MenuOpeningAction = () => { if (_directivesViewer.ItemsCount <= 0) { return; } _toolStripMenuItemTitle.Enabled = _directivesViewer.ItemsCount > 0; _toolStripMenuItemProperties.Enabled = _directivesViewer.ItemsCount > 0; }; }
private void InitListView() { _directivesViewer = new ATLBListView(CurrentAircraft, true); _directivesViewer.TabIndex = 2; _directivesViewer.ContextMenuStrip = _contextMenuStrip; _directivesViewer.Location = new Point(panel1.Left, panel1.Top); _directivesViewer.Dock = DockStyle.Fill; _directivesViewer.SelectedItemsChanged += DirectivesViewerSelectedItemsChanged; Controls.Add(_directivesViewer); panel1.Controls.Add(_directivesViewer); }