示例#1
0
 public WeekText[] ToMonthTextArray()
 {
     WeekText[] ms = new WeekText[this.Count];
     for (int i = 0; i < this.Count; ++i)
     {
         ms[i] = this[i];
     }
     return(ms);
 }
示例#2
0
 public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(InstanceDescriptor))
     {
         WeekText        w     = (WeekText)value;
         ConstructorInfo cInfo = typeof(WeekText).GetConstructor(new Type[] { typeof(DayOfWeek), typeof(string), typeof(Color) });
         return(new InstanceDescriptor(cInfo, new object[] { w.Day, w.Text, w.BackColor }, true));
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
示例#3
0
        public bool Contains(DayOfWeek day)
        {
            WeekText w = new WeekText(day, string.Empty, Color.Empty);

            return(this.Contains(w));
        }
示例#4
0
 public bool Contains(WeekText value)
 {
     // If value is not of type Int16, this will return false.
     return(List.Contains(value));
 }
示例#5
0
 public void Remove(WeekText value)
 {
     List.Remove(value);
 }
示例#6
0
 public void Insert(int index, WeekText value)
 {
     List.Insert(index, value);
 }
示例#7
0
        public int IndexOf(DayOfWeek day)
        {
            WeekText w = new WeekText(day, string.Empty, Color.Empty);

            return(this.IndexOf(w));
        }
示例#8
0
 public int IndexOf(WeekText value)
 {
     return(List.IndexOf(value));
 }
示例#9
0
 public int Add(WeekText value)
 {
     return(List.Add(value));
 }