Ejemplo n.º 1
0
        public virtual DateTimeCollection Clone()
        {
            DateTimeCollection dateTimeCollection = new DateTimeCollection(this.calendar);

            for (int index = 0; index < this.Dates.Count; ++index)
            {
                dateTimeCollection.Dates.Add(this.Dates[index]);
            }
            return(dateTimeCollection);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new DateTimeCollection object that is a copy of the current instance.
        /// </summary>
        /// <returns>A new DateTimeCollection object that is a copy of this instance.</returns>
        public virtual DateTimeCollection Clone()
        {
            DateTimeCollection clonedCollection = new DateTimeCollection(this.calendar);

            for (int i = 0; i < this.Dates.Count; i++)
            {
                clonedCollection.Dates.Add(this.Dates[i]);
            }

            return(clonedCollection);
        }
Ejemplo n.º 3
0
 protected virtual string GetDateRangeString(DateTimeCollection dateRange)
 {
     DateTime[] array = dateRange.ToArray();
     Array.Sort <DateTime>(array);
     if (array.Length == 1)
     {
         return("From " + array[0].ToString("d", (IFormatProvider)CultureInfo.InvariantCulture));
     }
     if (array.Length <= 1)
     {
         return("From " + Environment.NewLine + "to ");
     }
     return("From " + array[0].ToString("d", (IFormatProvider)CultureInfo.InvariantCulture) + Environment.NewLine + "to " + array[array.Length - 1].ToString("d", (IFormatProvider)CultureInfo.InvariantCulture));
 }
Ejemplo n.º 4
0
 // Constructors
 public SelectionEventArgs(DateTimeCollection dates)
 {
     this.dates = dates;
 }
Ejemplo n.º 5
0
 public SelectionEventArgs(DateTimeCollection dates, List <DateTime> newDates)
     : this(dates)
 {
     this.newDates = newDates;
 }