public WrappedVsqBPPair(VsqBPPair body, int clock)
 {
     this.body  = body;
     this.clock = clock;
 }
        public void commonButton_Click(Object sender, EventArgs e)
        {
            VsqBPList list = AppManager.getVsqFile().Track[AppManager.getSelected()].getCurve(m_curve.getName());
            VsqBPPairSearchContext search = list.findElement(m_editing_id);
            int index = search.index;

            if (sender == btnForward)
            {
                index++;
            }
            else if (sender == btnBackward)
            {
                index--;
            }
            else if (sender == btnBackward2)
            {
                index -= 5;
            }
            else if (sender == btnForward2)
            {
                index += 5;
            }
            else if (sender == btnForward3)
            {
                index += 10;
            }
            else if (sender == btnBackward3)
            {
                index -= 10;
            }

            if (index < 0)
            {
                index = 0;
            }

            if (list.size() <= index)
            {
                index = list.size() - 1;
            }

            VsqBPPair bp = list.getElementB(index);

            m_editing_id = bp.id;
            int clock = list.getKeyClock(index);

            txtDataPointClock.TextChanged -= commonTextBox_TextChanged;
            txtDataPointValue.TextChanged -= commonTextBox_TextChanged;
            txtDataPointClock.Text         = clock + "";
            txtDataPointValue.Text         = bp.value + "";
            txtDataPointClock.TextChanged += commonTextBox_TextChanged;
            txtDataPointValue.TextChanged += commonTextBox_TextChanged;

            txtDataPointValue.Focus();
            txtDataPointValue.SelectAll();

            AppManager.itemSelection.clearPoint();
            AppManager.itemSelection.addPoint(m_curve, bp.id);
            if (mMainWindow != null)
            {
                mMainWindow.ensureVisible(clock);
                mMainWindow.refreshScreen();
            }
        }