Source/Design/TextBoxDropDownDesigner.cs

(开头部分) 6KB

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

#if FRAMEWORK20
using System;
using System.Text;
using DevComponents.DotNetBar.Controls;
using System.Windows.Forms.Design;
using System.Collections;
using DevComponents.DotNetBar.Rendering;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace DevComponents.DotNetBar.Design
{
    public class TextBoxDropDownDesigner : ControlDesigner
    {
        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            TextBoxDropDown control = this.Control as TextBoxDropDown;
            control.BackgroundStyle.Class = ElementStyleClassKeys.TextBoxBorderKey;
            control.ButtonDropDown.Visible = true;
            control.Height = control.PreferredHeight;
            control.Text = "";
        }

        public override SelectionRules SelectionRules
        {
            get
            {
                return (base.SelectionRules & ~(SelectionRules.BottomSizeable | SelectionRules.TopSizeable));
            }
        }

        protected override void PreFilterProperties(IDictionary properties)
        {
            base.PreFilterProperties(properties);
            string[] ta = new string[] { "PasswordChar" };
            Attribute[] aa = new Attribute[0];
            for (int num1 = 0; num1 < ta.Length; num1++)
            {
                PropertyDescriptor desc = (PropertyDescriptor)properties[ta[num1]];
                if (desc != null)
                {
                    properties[ta[num1]] = TypeDescriptor.CreateProperty(typeof(TextBoxDropDownDesigner), desc, aa);
                }
            }

            ta = new string[] { "Text" };
            aa = new Attribute[0];
            for (int num1 = 0; num1 < ta.Length; num1++)
            {
                PropertyDescriptor desc = (PropertyDescriptor)properties[ta[num1]];
                if (desc != null)
                {
                    properties[ta[num1]] = TypeDescriptor.CreateProperty(typeof(TextBoxDropDownDesigner), desc, aa);
                }
            }

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

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

AI 解读 AI

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

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