示例#1
0
 /// <summary>
 /// Deserialization constructor
 /// </summary>
 internal RecurringScheduleEntry(SerializableRecurringScheduleEntry serial)
 {
     m_startDate          = serial.StartDate;
     m_endDate            = serial.EndDate;
     m_title              = serial.Title;
     m_options            = serial.Options;
     m_dayOfMonth         = serial.DayOfMonth;
     m_dayOfWeek          = serial.DayOfWeek;
     m_startSecond        = serial.StartTimeInSeconds;
     m_endSecond          = serial.EndTimeInSeconds;
     m_frequency          = serial.Frequency;
     m_weeksPeriod        = serial.WeeksPeriod;
     m_overflowResolution = serial.OverflowResolution;
 }
示例#2
0
 /// <summary>
 /// Deserialization constructor
 /// </summary>
 internal RecurringScheduleEntry(SerializableRecurringScheduleEntry serial)
 {
     StartDate          = serial.StartDate;
     EndDate            = serial.EndDate;
     Title              = serial.Title.Substring(0, TitleMaxLength);
     Options            = serial.Options;
     DayOfMonth         = serial.DayOfMonth;
     DayOfWeek          = serial.DayOfWeek;
     StartTimeInSeconds = serial.StartTimeInSeconds;
     EndTimeInSeconds   = serial.EndTimeInSeconds;
     Frequency          = serial.Frequency;
     WeeksPeriod        = serial.WeeksPeriod;
     OverflowResolution = serial.OverflowResolution;
 }
示例#3
0
        /// <summary>
        /// Exports the data to a serialization object.
        /// </summary>
        /// <returns></returns>
        internal override SerializableScheduleEntry Export()
        {
            SerializableRecurringScheduleEntry serial = new SerializableRecurringScheduleEntry();

            serial.StartDate          = m_startDate;
            serial.EndDate            = m_endDate;
            serial.Title              = m_title;
            serial.Options            = m_options;
            serial.DayOfMonth         = m_dayOfMonth;
            serial.DayOfWeek          = m_dayOfWeek;
            serial.StartTimeInSeconds = m_startSecond;
            serial.EndTimeInSeconds   = m_endSecond;
            serial.Frequency          = m_frequency;
            serial.WeeksPeriod        = m_weeksPeriod;
            serial.OverflowResolution = m_overflowResolution;
            return(serial);
        }
示例#4
0
        /// <summary>
        /// Imports data from the given serialization object.
        /// </summary>
        /// <param name="serial"></param>
        internal static void Import(SchedulerSettings serial)
        {
            s_schedule.Clear();
            foreach (SerializableScheduleEntry serialEntry in serial.Entries)
            {
                SerializableRecurringScheduleEntry serialReccuringEntry = serialEntry as SerializableRecurringScheduleEntry;
                if (serialReccuringEntry != null)
                {
                    s_schedule.Add(new RecurringScheduleEntry(serialReccuringEntry));
                }
                else
                {
                    s_schedule.Add(new SimpleScheduleEntry(serialEntry));
                }
            }

            // Notify to subscribers
            EveMonClient.OnSchedulerChanged();
        }