Source/Editors/VisualInputGroup.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;

namespace DevComponents.Editors
{
    /// <summary>
    /// Represents the group of the input items with automatic and manual item focus change.
    /// </summary>
    public class VisualInputGroup : VisualGroup
    {
        #region Private Variables
        #endregion

        #region Events
        #endregion

        #region Constructor
        #endregion

        #region Internal Implementation
        protected override bool OnCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
        {
            if (keyData == Keys.Tab && (Control.ModifierKeys & Keys.Shift) != Keys.Shift && this.TabNavigationEnabled ||
                keyData == Keys.Enter && this.EnterNavigationEnabled ||
                keyData == Keys.Right && this.ArrowNavigationEnabled)
            {
                ValidateInput(this.FocusedItem);
                if (SelectNextInput())
                    return true;
            }
            else if (keyData == Keys.Left && this.ArrowNavigationEnabled ||
                (keyData & Keys.Tab) == Keys.Tab && (keyData & Keys.Shift) == Keys.Shift && this.TabNavigationEnabled)
            {
                ValidateInput(this.FocusedItem);
                if (SelectPreviousInput())
                    return true;
            }

            return base.OnCmdKey(ref msg, keyData);
        }

        private bool _TabNavigationEnabled = true;
        /// <summary>
        /// Gets or sets whether Tab key is used to navigate between the fields. Default value is true.
        /// </summary>
        [DefaultValue(true)]
        public bool TabNavigationEnabled
        {
            get
            {
                return _TabNavigationEnabled;
            }
            set
            {
                _TabNavigationEnabled = value;
            }
后面还有 347 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。