public VideoThumbControl(Bitmap bitmap, int width, int height, HeaderTree headerTree, IDataPacket sourceResultNode)
        {
            _bitmap           = ResizeBitmap(bitmap, width, height);
            _headerTree       = headerTree;
            _sourceResultNode = sourceResultNode;
            InitializeComponent();

            Width  = width;
            Height = height;

            if (_headerTree != null)
            {
                _headerTree.SelectionChanged += new EventHandler(headerTree_SelectionChanged);
                UpdateSelectedState();
            }
        }
        public void AddThumb(Bitmap bitmap, HeaderTree headerTree, IDataPacket sourceNode)
        {
            // TODO: why is this property not true when the is disposed?
            if (this.IsDisposed || thumbsContainer.IsDisposed)
            {
                return;
            }

            // Execute Add method in Thread context of the Form.
            this.Invoke((MethodInvoker) delegate
            {
                VideoThumbControl thumbControl = new VideoThumbControl(bitmap, headerTree, sourceNode);
                thumbControl.Selected         += new VideoThumbControl.SelectEventHandler(thumbControl_Selected);
                thumbsContainer.Controls.Add(thumbControl);
                UpdateProgress();
            });
        }
Ejemplo n.º 3
0
        public HeaderPanel(FramePreviewManager framePreviewManager, VideoKeyframesManager videoKeyframesManager,
                           HeaderTree headerTree, HeaderDetailTree headerDetailTree, ColumnChooser columnChooser)
        {
            _framePreviewManager   = framePreviewManager;
            _videoKeyframesManager = videoKeyframesManager;
            this.headerTree        = headerTree;
            this.headerDetailTree  = headerDetailTree;
            this.columnChooser     = columnChooser;

            columnChooser.HeaderPanel = this;

            InitializeComponent();

            // Add/replace custom menu items in original header context menu
            headerTree.HeaderContextMenu.Items.RemoveAt(headerTree.HeaderContextMenu.Items.Count - 1);
            headerTree.HeaderContextMenu.Items.Add(toolStripMenuItemColumnChooser);
            headerTree.HeaderContextMenu.Items.Add(toolStripMenuItemRemoveColumn);
            headerTree.HeaderContextMenu.Opening += new CancelEventHandler(headerTree_HeaderContextMenu_Opening);

            headerTree_SelectionChanged(this, EventArgs.Empty);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new header selection.
 /// </summary>
 /// <param name="headerTree">the tree for the selection</param>
 /// <param name="selectionType">the type of headers to select</param>
 public Selection(HeaderTree headerTree, HeaderSelectionType selectionType)
 {
     _headerTree    = headerTree;
     _selectionType = selectionType;
 }
 public VideoThumbControl(Bitmap bitmap, HeaderTree headerTree, IDataPacket sourceResultNode) :
     this(bitmap, 100, 75, headerTree, sourceResultNode)
 {
 }