Пример #1
0
        static public Event Create(iCalendar iCal)
        {
            Event evt = (Event)iCal.Create(iCal, "VEVENT");

            evt.UID = UniqueComponent.NewUID();

            return(evt);
        }
Пример #2
0
        static public Journal Create(iCalendar iCal)
        {
            Journal j = (Journal)iCal.Create(iCal, "VJOURNAL");

            j.UID = UniqueComponent.NewUID();

            return(j);
        }
Пример #3
0
        static public Todo Create(iCalendar iCal)
        {
            Todo t = (Todo)iCal.Create(iCal, "VTODO");

            t.UID = UniqueComponent.NewUID();

            return(t);
        }
Пример #4
0
        static public Event Create(iCalendar iCal)
        {
            Event evt = new Event(iCal);

            evt.UID = UniqueComponent.NewUID();

            return(evt);
        }
Пример #5
0
        static public Todo Create(iCalendar iCal)
        {
            Todo t = new Todo(iCal);

            t.UID = UniqueComponent.NewUID();

            return(t);
        }
Пример #6
0
        static public Journal Create(iCalendar iCal)
        {
            Journal j = new Journal(iCal);

            j.UID = UniqueComponent.NewUID();

            return(j);
        }
Пример #7
0
        static public Event Create(iCalendar iCal)
        {
            Event evt = (Event)iCal.Create(iCal, "VEVENT");

            evt.UID     = UniqueComponent.NewUID();
            evt.Created = DateTime.Now;
            evt.DTStamp = DateTime.Now;

            return(evt);
        }
Пример #8
0
        static public Journal Create(iCalendar iCal)
        {
            Journal j = (Journal)iCal.Create(iCal, "VJOURNAL");

            j.UID     = UniqueComponent.NewUID();
            j.Created = DateTime.Now;
            j.DTStamp = DateTime.Now;

            return(j);
        }
Пример #9
0
        static public Todo Create(iCalendar iCal)
        {
            Todo t = iCal.Create <Todo>();

            t.UID     = UniqueComponent.NewUID();
            t.Created = DateTime.Now;
            t.DTStamp = DateTime.Now;

            return(t);
        }
Пример #10
0
 /// <summary>
 /// Re-links the UID dictionary to the actual components in our list.
 /// Also, if any items do not have a UID assigned to them, they will
 /// automatically have a UID assigned.
 /// </summary>
 public void ResolveUIDs()
 {
     m_Dictionary.Clear();
     foreach (T item in m_Components)
     {
         if ((item as UniqueComponent).UID == null)
         {
             (item as UniqueComponent).UID = UniqueComponent.NewUID();
         }
         m_Dictionary[(item as UniqueComponent).UID] = item;
     }
 }
Пример #11
0
        public override void CreateInitialize()
        {
            base.CreateInitialize();

            // Create a new UID for the component
            UID = UniqueComponent.NewUID();

            // Here, we don't simply set to DateTime.Now because DateTime.Now contains milliseconds, and
            // the iCalendar standard doesn't care at all about milliseconds.  Therefore, when comparing
            // two calendars, one generated, and one loaded from file, they may be functionally identical,
            // but be determined to be different due to millisecond differences.
            Created = new Date_Time(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
            DTStamp = Created.Copy();
        }