Пример #1
0
 public void Add(MaskDescriptorTemplate mdt)
 {
     if (mdt.Mask != null)
     {
         this.dx.Add(mdt);
     }
 }
Пример #2
0
 /// <summary>
 /// Adds the specified MaskDescriptorTemplate object provided it is a valid one.
 /// </summary>
 public void Add(MaskDescriptorTemplate maskDescriptorTemplate)
 {
     if (maskDescriptorTemplate.Mask != null)
     {
         List.Add(maskDescriptorTemplate);
     }
 }
Пример #3
0
        private void AddDefaultMaskDescriptors(CultureInfo culture)
        {
            this.customMaskDescriptor = new MaskDescriptorTemplate(null, System.Design.SR.GetString("MaskDesignerDialogCustomEntry"), null, null, null, true);
            List <MaskDescriptor> localizedMaskDescriptors = MaskDescriptorTemplate.GetLocalizedMaskDescriptors(culture);

            this.InsertMaskDescriptor(0, this.customMaskDescriptor, false);
            foreach (MaskDescriptor descriptor in localizedMaskDescriptors)
            {
                this.InsertMaskDescriptor(0, descriptor);
            }
        }
Пример #4
0
        /// <summary>
        /// Adds the default mask descriptors to the mask description list.
        /// We need to add the default descriptors explicitly because the DiscoverMaskDescriptors method only adds
        /// public descriptors and these are internal.
        /// </summary>
        private void AddDefaultMaskDescriptors(CultureInfo culture)
        {
            _customMaskDescriptor = new MaskDescriptorTemplate(null, SR.MaskDesignerDialogCustomEntry, null, null, null, true);

            List <MaskDescriptor> maskDescriptors = MaskDescriptorTemplate.GetLocalizedMaskDescriptors(culture);

            // Need to pass false for validateDescriptor param since the custom mask will fail validation
            // because the mask is empty.
            InsertMaskDescriptor(0, _customMaskDescriptor, /*validate*/ false);

            foreach (MaskDescriptor maskDescriptor in maskDescriptors)
            {
                InsertMaskDescriptor(0, maskDescriptor);
            }
        }
 public void Add(MaskDescriptorTemplate mdt)
 {
     if (mdt.Mask != null)
     {
         this.dx.Add(mdt);
     }
 }