Пример #1
0
        private void moveScreenFoward_Click(object sender, EventArgs e)
        {
            if (screenIndex >= L1Indexes.Count - 1)
            {
                return;
            }
            L1Indexes.Reverse(screenIndex, 2);
            if (Index == 2)
            {
                L2Indexes.Reverse(screenIndex, 2);
            }
            screenImages.Reverse(screenIndex, 2);
            screenIndex++;
            //
            int autoScrollPosX = Math.Abs(screensPanel.AutoScrollPosition.X);
            int autoScrollPosY = Math.Abs(screensPanel.AutoScrollPosition.Y);

            screensPanel.AutoScrollPosition = new Point(autoScrollPosX + 256, autoScrollPosY);
            //
            picture.Invalidate();
        }
Пример #2
0
        private void moveScreenBack_Click(object sender, EventArgs e)
        {
            if (screenIndex <= 0)
            {
                return;
            }
            L1Indexes.Reverse(screenIndex - 1, 2);
            if (Index == 2)
            {
                L2Indexes.Reverse(screenIndex - 1, 2);
            }
            screenImages.Reverse(screenIndex - 1, 2);
            screenIndex--;
            //
            int autoScrollPosX = Math.Abs(screensPanel.AutoScrollPosition.X);
            int autoScrollPosY = Math.Abs(screensPanel.AutoScrollPosition.Y);

            screensPanel.AutoScrollPosition = new Point(autoScrollPosX - 256, autoScrollPosY);
            //
            picture.Invalidate();
        }