Exemple #1
0
        public ValidatorBox(ValidatorBoxFlyweight vb, int tabIndex, System.Drawing.Point location)
        {
            _vbf = vb;

            _vbf.TabIndex = tabIndex;
            _vbf.SetLocation(location);
        }
Exemple #2
0
        public static ValidatorBoxFlyweight getValidator(string name)
        {
            ValidatorBoxFlyweight value = null;

            foreach (var v in _validators)
            {
                if (v.GetName() == name)
                {
                    value = v;
                    if (value.IsDisposed)
                    {
                        value = new ValidatorBoxFlyweight(name);
                    }
                    break;
                }
            }

            if (value == null)
            {
                value = new ValidatorBoxFlyweight(name);
                _validators.Add(value);
            }

            return(value);
        }