AGS.Editor.RoomSettingsEditor.ProcessZoomAndPanKeyPresses C# (CSharp) Метод

ProcessZoomAndPanKeyPresses() приватный Метод

private ProcessZoomAndPanKeyPresses ( Keys keyData ) : bool
keyData Keys
Результат bool
        private bool ProcessZoomAndPanKeyPresses(Keys keyData)
        {
            if (keyData == Keys.Down)
            {
                bufferedPanel1.AutoScrollPosition = new Point(Math.Abs(bufferedPanel1.AutoScrollPosition.X), Math.Abs(bufferedPanel1.AutoScrollPosition.Y) + 50);
            }
            else if (keyData == Keys.Up)
            {
                bufferedPanel1.AutoScrollPosition = new Point(Math.Abs(bufferedPanel1.AutoScrollPosition.X), Math.Abs(bufferedPanel1.AutoScrollPosition.Y) - 50);
            }
            else if (keyData == Keys.Right)
            {
                bufferedPanel1.AutoScrollPosition = new Point(Math.Abs(bufferedPanel1.AutoScrollPosition.X) + 50, Math.Abs(bufferedPanel1.AutoScrollPosition.Y));
            }
            else if (keyData == Keys.Left)
            {
                bufferedPanel1.AutoScrollPosition = new Point(Math.Abs(bufferedPanel1.AutoScrollPosition.X) - 50, Math.Abs(bufferedPanel1.AutoScrollPosition.Y));
            }
            else if (keyData == Keys.Space)
            {
                if (sldZoomLevel.Value < sldZoomLevel.Maximum)
                {
                    sldZoomLevel.Value++;
                }
                else
                {
                    sldZoomLevel.Value = sldZoomLevel.Minimum;
                }
                sldZoomLevel_Scroll(null, null);
            }
            else
            {
                return false;
            }

            return true;
        }