Esempio n. 1
0
 public MonthText[] ToMonthTextArray()
 {
     MonthText[] ms = new MonthText[this.Count];
     for (int i = 0; i < this.Count; ++i)
     {
         ms[i] = this[i];
     }
     return(ms);
 }
Esempio n. 2
0
 public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(InstanceDescriptor))
     {
         MonthText       m     = (MonthText)value;
         ConstructorInfo cInfo = typeof(MonthText).GetConstructor(new Type[] { typeof(MonthOfYear), typeof(string) });
         return(new InstanceDescriptor(cInfo, new object[] { m.Month, m.Text }, true));
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
Esempio n. 3
0
        public bool Contains(MonthOfYear month)
        {
            MonthText m = new MonthText(month, string.Empty);

            return(List.Contains(m));
        }
Esempio n. 4
0
 public bool Contains(MonthText value)
 {
     // If value is not of type Int16, this will return false.
     return(List.Contains(value));
 }
Esempio n. 5
0
 public void Remove(MonthText value)
 {
     List.Remove(value);
 }
Esempio n. 6
0
 public void Insert(int index, MonthText value)
 {
     List.Insert(index, value);
 }
Esempio n. 7
0
        public int IndexOf(MonthOfYear month)
        {
            MonthText m = new MonthText(month, string.Empty);

            return(this.IndexOf(m));
        }
Esempio n. 8
0
 public int IndexOf(MonthText value)
 {
     return(List.IndexOf(value));
 }
Esempio n. 9
0
 public int Add(MonthText value)
 {
     return(List.Add(value));
 }