Ejemplo n.º 1
0
        /// <summary>
        ///     Resets the rotations and shows selection.
        /// </summary>
        public void Reset()
        {
            activePanel.Controls.Clear();
            activePanel.Controls.Add(_selectionControl);
            _rotControl = null;

            _localRotIndex = 0;

            UpdateVisualValues(_localRotIndex);

            Size = new Size(_selectionSize);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Handles numeric key presses.
        /// </summary>
        /// <param name="key">1-4</param>
        private void HandleNumberKey(int key)
        {
            if (_rotControl == null)
            {
                activePanel.Controls.Clear();
                Size = new Size(_rotationSize);

                switch (key)
                {
                    case 1:
                        _rotControl = new RotationControl(this, RotationData.Rotation1, _localRotIndex);
                        break;
                    case 2:
                        _rotControl = new RotationControl(this, RotationData.Rotation2, _localRotIndex);
                        break;
                    case 3:
                        _rotControl = new RotationControl(this, RotationData.Rotation3, _localRotIndex);
                        break;
                    case 4:
                        _rotControl = new RotationControl(this, RotationData.Rotation4, _localRotIndex);
                        break;
                    default:
                        MessageBox.Show("Out of range handlenumberkey " + key);
                        throw new ArgumentOutOfRangeException(key.ToString());
                }
                activePanel.Controls.Add(_rotControl);
            }
        }