Source/Design/MaskedTextBoxAdvDesigner.cs

(开头部分) 9KB

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

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

namespace DevComponents.DotNetBar.Design
{
    public class MaskedTextBoxAdvDesigner : ControlDesigner
    {
        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            MaskedTextBoxAdv control = this.Control as MaskedTextBoxAdv;
            control.BackgroundStyle.Class = ElementStyleClassKeys.TextBoxBorderKey;
            control.ButtonClear.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[] strArray = new string[] { "Text", "PasswordChar" };
            Attribute[] attributes = new Attribute[0];
            for (int i = 0; i < strArray.Length; i++)
            {
                PropertyDescriptor oldPropertyDescriptor = (PropertyDescriptor)properties[strArray[i]];
                if (oldPropertyDescriptor != null)
                {
                    properties[strArray[i]] = TypeDescriptor.CreateProperty(typeof(MaskedTextBoxAdvDesigner), oldPropertyDescriptor, attributes);
                }
            }
        }

        public char PasswordChar
        {
            get
            {
                MaskedTextBoxAdv control = this.Control as MaskedTextBoxAdv;
                if (control.UseSystemPasswordChar)
                {
                    control.UseSystemPasswordChar = false;
                    char passwordChar = control.PasswordChar;
后面还有 190 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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