Exemplo n.º 1
0
        protected override void Dispose(bool disposing)
        {
            Row.RowToggled                -= RowToggledHandler;
            Row.RowHeightChanged          -= RowHeightChangedHandler;
            Row.RowHeightResized          -= RowHeightResizedHandler;
            Row.RowLabelContextMenuSelect -= RowLabelContextMenuHandler;
            Vixen.Utility.cEventHelper.RemoveAllEventHandlers(this);
            Vixen.Utility.cEventHelper.RemoveAllEventHandlers(TimeInfo);
            TimeInfo = null;

            if (grid != null)
            {
                grid.Scroll -= GridScrolledHandler;
                grid.VerticalOffsetChanged -= GridScrollVerticalHandler;
                grid.Dispose();
                Vixen.Utility.cEventHelper.RemoveAllEventHandlers(grid);
                grid = null;
            }

            if (timelineRowList != null)
            {
                timelineRowList.Dispose();
                timelineRowList = null;
            }
            waveform?.Dispose();
            waveform = null;

            MarksBar?.Dispose();
            MarksBar = null;

            ruler?.Dispose();
            ruler = null;

            base.Dispose(disposing);
        }
Exemplo n.º 2
0
        // Panel 2 - the right side of the splitContainer
        private void InitializePanel2()
        {
            // Add all timeline-like controls to panel2
            splitContainer.Panel2.SuspendLayout();

            // Grid
            grid = new Grid(TimeInfo)
            {
                Dock = DockStyle.Fill,
            };
            splitContainer.Panel2.Controls.Add(grid);             // gets added first - to fill the remains
            grid.Scroll += GridScrolledHandler;
            grid.VerticalOffsetChanged += GridScrollVerticalHandler;


            //Marks
            MarksBar = new MarksBar(TimeInfo)
            {
                Dock   = DockStyle.Top,
                Height = 50
            };

            splitContainer.Panel2.Controls.Add(MarksBar);

            // Ruler
            ruler = new Ruler(TimeInfo)
            {
                Dock   = DockStyle.Top,
                Height = 50,
            };
            splitContainer.Panel2.Controls.Add(ruler);

            //WaveForm
            //TODO deal with positioning, can we dock two controls to the top
            //Looks like the last one wins.
            waveform = new Waveform(TimeInfo)
            {
                Dock   = DockStyle.Top,
                Height = 50
            };

            splitContainer.Panel2.Controls.Add(waveform);

            splitContainer.Panel2.ResumeLayout(false);
            splitContainer.Panel2.PerformLayout();
        }