Source/Editors/VisualStringListInput.cs

(开头部分) 6KB

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

#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
using DevComponents.Editors.Primitives;
using System.ComponentModel;

namespace DevComponents.Editors
{
    public class VisualStringListInput : VisualListInput
    {
        #region Private Variables
        private List<string> _Items = new List<string>();
        private string _Text = "";
        private string _LastValidatedInputStack = "", _LastMatch = "";
        private bool _LastMatchComplete = false;
        #endregion

        #region Events
        /// <summary>
        /// Occurs when SelectedIndex property has changed.
        /// </summary>
        public event EventHandler SelectedIndexChanged;
        #endregion

        #region Constructor
        public VisualStringListInput()
        {

        }
        #endregion

        #region Internal Implementation
        public List<String> Items
        {
            get
            {
                return _Items;
            }
        }

        protected virtual List<String> GetItems()
        {
            return _Items;
        }

        protected override bool ValidateNewInputStack(string s)
        {
            _LastValidatedInputStack = "";
            _LastMatch = "";
            _LastMatchComplete = false;

            if (s.Length > 0)
            {
                List<String> items = GetItems();
                StartsWithPredicate p = new StartsWithPredicate(s.ToLower(), 2);
                List<string> match = items.FindAll(p.MatchTop);
                if (match == null || match.Count == 0)
                    return false;

后面还有 182 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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