private void deleteScreen_Click(object sender, EventArgs e) { if (L1Indexes.Count == 0) { return; } int index = screenIndex; L1Indexes.RemoveAt(screenIndex); if (Index == 2) { L2Indexes.RemoveAt(screenIndex); } screenImages.RemoveAt(screenIndex); if (index >= L1Indexes.Count) { screenIndex--; } // picture.Width = L1Indexes.Count * 256; int autoScrollPosX = Math.Abs(screensPanel.AutoScrollPosition.X); int autoScrollPosY = Math.Abs(screensPanel.AutoScrollPosition.Y); screensPanel.AutoScrollPosition = new Point(autoScrollPosX - 256, autoScrollPosY); }
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(); }
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(); }
private void duplicateScreen_Click(object sender, EventArgs e) { if (L1Indexes.Count >= 255) { MessageBox.Show("Cannot have more than 255 screens."); return; } L1Indexes.Insert(screenIndex, L1Indexes[screenIndex]); if (Index == 2) { L2Indexes.Insert(screenIndex, L2Indexes[screenIndex]); } screenImages.Insert(screenIndex, screenImages[screenIndex]); screenIndex++; // picture.Width = L1Indexes.Count * 256; int autoScrollPosX = Math.Abs(screensPanel.AutoScrollPosition.X); int autoScrollPosY = Math.Abs(screensPanel.AutoScrollPosition.Y); screensPanel.AutoScrollPosition = new Point(autoScrollPosX + 256, autoScrollPosY); // SetScreenImage(); }