public DB_CalendarEventFly(string EventIDData, string Name, DateTimeOffset StartData, DateTimeOffset EndData, int PriorityData, Repetition RepetitionData, Location_Elements LocationData, TimeSpan TImePerSplitData, DateTimeOffset OriginalStartData, TimeSpan EventPrepTimeData, TimeSpan Event_PreDeadlineData, bool EventRigidFlagData, int SplitData, EventDisplay UiData, MiscData NoteData, bool CompletionFlagData, long RepeatIndexData, Procrastination ProcrastinationData, NowProfile NowProfileData, int CompleteCountData, int DeletionCountData, List <string> AllUserIDs) { EventName = Name; StartDateTime = StartData; EndDateTime = EndData; EventRepetition = RepetitionData; LocationInfo = LocationData; TimePerSplit = TImePerSplitData; OriginalStart = OriginalStartData; PrepTime = EventPrepTimeData; EventPreDeadline = Event_PreDeadlineData; ProfileOfNow = NowProfileData; RigidSchedule = EventRigidFlagData; Complete = CompletionFlagData; CompletedCount = CompleteCountData; DeletedCount = DeletionCountData; ProfileOfProcrastination = ProcrastinationData; SubEvents = new Dictionary <EventID, SubCalendarEvent>(); Priority = PriorityData; isRestricted = false; RepetitionSequence = 0; Splits = SplitData; UniqueID = new EventID(EventIDData); UserIDs = AllUserIDs; if (EventRepetition.Enable) { EventRepetition.PopulateRepetitionParameters(this); } else { DateTimeOffset SubEventEndData = EndData; DateTimeOffset SubEventStartData = SubEventEndData - TimePerSplit; int i = 0; int SubEventCount = Splits - (CompletedCount + DeletedCount); for (int j = 0; j < SubEventCount; i++, j++) { EventID SubEventID = EventID.GenerateSubCalendarEvent(UniqueID.ToString(), i + 1); SubCalendarEvent newSubCalEvent = new DB_SubCalendarEventFly(SubEventID, Name, SubEventStartData, SubEventEndData, PriorityData, LocationInfo.CreateCopy(), OriginalStart, EventPrepTimeData, Event_PreDeadlineData, EventRigidFlagData, UiData.createCopy(), NoteData.createCopy(), Complete, ProcrastinationData, NowProfileData, this.RangeTimeLine, EventRepetition.Enable, false, true, AllUserIDs.ToList(), i); SubEvents.Add(newSubCalEvent.SubEvent_ID, newSubCalEvent); } /* * for (int j = 0; j < CompletedCount; i++, j++) * { * EventID SubEventID = EventID.GenerateSubCalendarEvent(UniqueID.ToString(), i + 1); * SubCalendarEvent newSubCalEvent = new DB_SubCalendarEventFly(SubEventID, Name, SubEventStartData, SubEventEndData, PriorityData, LocationInfo.CreateCopy(), OriginalStart, EventPrepTimeData, Event_PreDeadlineData, EventRigidFlagData, UiData.createCopy(), NoteData.createCopy(), Complete, ProcrastinationData, NowProfileData, this.RangeTimeLine, EventRepetition.Enable, true, true, AllUserIDs.ToList(), 0); * SubEvents.Add(newSubCalEvent.SubEvent_ID, newSubCalEvent); * } * * for (int j = 0; j < DeletedCount; i++, j++) * { * EventID SubEventID = EventID.GenerateSubCalendarEvent(UniqueID.ToString(), i + 1); * SubCalendarEvent newSubCalEvent = new DB_SubCalendarEventFly(SubEventID, Name, SubEventStartData, SubEventEndData, PriorityData, LocationInfo.CreateCopy(), OriginalStart, EventPrepTimeData, Event_PreDeadlineData, EventRigidFlagData, UiData.createCopy(), NoteData.createCopy(), Complete, ProcrastinationData, NowProfileData, this.RangeTimeLine, EventRepetition.Enable, true, false, AllUserIDs.ToList(), 0); * SubEvents.Add(newSubCalEvent.SubEvent_ID, newSubCalEvent); * } */ } UpdateLocationMatrix(myLocation); }
public DB_CalendarEvent(CalendarEvent CalendarEventData, Procrastination procrastinationData, NowProfile NowProfileData) { this._EventDuration = CalendarEventData.getActiveDuration; this._Name = CalendarEventData.getName; this.updateStartTime(CalendarEventData.Start); this.updateEndTime(CalendarEventData.End); this._EventPreDeadline = CalendarEventData.getPreDeadline; this._PrepTime = CalendarEventData.getPreparation; this._Priority = CalendarEventData.getEventPriority; //this.RepetitionFlag = CalendarEventData.RepetitionStatus; this._EventRepetition = (CalendarEventData).Repeat; // EventRepetition != CalendarEventData.null ? EventRepetition.CreateCopy() : EventRepetition; this._Complete = CalendarEventData.getIsComplete; this._RigidSchedule = CalendarEventData.isRigid; //hack this._Splits = CalendarEventData.NumberOfSplit; this._AverageTimePerSplit = CalendarEventData.AverageTimeSpanPerSubEvent; this.UniqueID = CalendarEventData.Calendar_EventID;//hack //this.EventSequence = CalendarEventData.EventSequence; this._SubEvents = new SubEventDictionary <string, SubCalendarEvent>(); this._UiParams = CalendarEventData.getUIParam; this._DataBlob = CalendarEventData.Notes; this._Enabled = CalendarEventData.isEnabled; this._isEventRestricted = CalendarEventData.getIsEventRestricted; this._LocationInfo = CalendarEventData.Location;//hack you might need to make copy this._AutoDeleted = CalendarEventData.getIsUserDeleted; this._CompletedCount = CalendarEventData.CompletionCount; this._DeletedCount = CalendarEventData.DeletionCount; this._ProfileOfProcrastination = procrastinationData; this._ProfileOfNow = NowProfileData; //this.SubEvents = ((DB_CalendarEventRestricted)CalendarEventData).getSubEvents(); if (this._EventRepetition != null && !this._EventRepetition.EnableRepeat) { foreach (SubCalendarEvent eachSubCalendarEvent in CalendarEventData.AllSubEvents) { this._SubEvents.Add(eachSubCalendarEvent.Id, eachSubCalendarEvent); } } else if (this._EventRepetition == null) { isRepeatLoaded_DB = false; } //this.SubEvents = CalendarEventData.SubEvents; this._otherPartyID = CalendarEventData.ThirdPartyID; // == CalendarEventData.null ? null : otherPartyID.ToString(); this._Users = CalendarEventData.getAllUsers(); //.ToList(); this._Creator = CalendarEventData.getCreator; this._TimeZone = CalendarEventData.getTimeZone; }
public DB_CalendarEventExtra(CalendarEvent CalendarEventData, Procrastination procrastinationData, NowProfile NowProfileData) { this.EventDuration = CalendarEventData.Duration; this.EventName = CalendarEventData.Name; this.StartDateTime = CalendarEventData.Start; this.EndDateTime = CalendarEventData.End; this.EventPreDeadline = CalendarEventData.PreDeadline; this.PrepTime = CalendarEventData.Preparation; this.Priority = CalendarEventData.EventPriority; //this.RepetitionFlag = CalendarEventData.RepetitionStatus; this.EventRepetition = (CalendarEventData).Repeat; // EventRepetition != CalendarEventData.null ? EventRepetition.CreateCopy() : EventRepetition; this.Complete = CalendarEventData.isComplete; this.RigidSchedule = CalendarEventData.Rigid; //hack this.Splits = CalendarEventData.NumberOfSplit; this.TimePerSplit = CalendarEventData.EachSplitTimeSpan; this.UniqueID = CalendarEventData.Calendar_EventID;//hack //this.EventSequence = CalendarEventData.EventSequence; this.SubEvents = new Dictionary <EventID, SubCalendarEvent>(); this.UiParams = CalendarEventData.UIParam; this.DataBlob = CalendarEventData.Notes; this.Enabled = CalendarEventData.isEnabled; this.isRestricted = CalendarEventData.isEventRestricted; this.LocationInfo = CalendarEventData.myLocation;//hack you might need to make copy this.ProfileOfProcrastination = CalendarEventData.ProcrastinationInfo; this.DeadlineElapsed = CalendarEventData.isDeadlineElapsed; this.UserDeleted = CalendarEventData.isUserDeleted; this.CompletedCount = CalendarEventData.CompletionCount; this.DeletedCount = CalendarEventData.DeletionCount; this.ProfileOfProcrastination = procrastinationData; this.ProfileOfNow = NowProfileData; this.OriginalStart = CalendarEventData.OrginalStartInfo; //this.SubEvents = ((DB_CalendarEventRestricted)CalendarEventData).getSubEvents(); if (!this.EventRepetition.Enable) { foreach (SubCalendarEvent eachSubCalendarEvent in CalendarEventData.AllSubEvents) { this.SubEvents.Add(eachSubCalendarEvent.SubEvent_ID, eachSubCalendarEvent); } } //this.SubEvents = CalendarEventData.SubEvents; this.otherPartyID = CalendarEventData.ThirdPartyID; // == CalendarEventData.null ? null : otherPartyID.ToString(); this.UserIDs = CalendarEventData.getAllUserIDs(); //.ToList(); //return MyCalendarEventCopy; }
public DB_SubCalendarEvent(SubCalendarEvent mySubCalEvent, NowProfile NowProfileData, Procrastination ProcrastinationData, CalendarEvent calendarEvent) { this.BusyFrame = mySubCalEvent.ActiveSlot; this._CalendarEventRange = mySubCalEvent.getCalendarEventRange; this._Name = mySubCalEvent.getName; this._EventDuration = mySubCalEvent.getActiveDuration; this._Complete = mySubCalEvent.getIsComplete; this._ConflictingEvents = mySubCalEvent.Conflicts; this._DataBlob = mySubCalEvent.Notes; this._Enabled = mySubCalEvent.isEnabled; updateEndTime(mySubCalEvent.End); this._EventPreDeadline = mySubCalEvent.getPreDeadline; this._EventScore = mySubCalEvent.Score; this._isEventRestricted = mySubCalEvent.getIsEventRestricted; this._LocationInfo = mySubCalEvent.LocationObj; this.OldPreferredIndex = mySubCalEvent.OldUniversalIndex; this._otherPartyID = mySubCalEvent.ThirdPartyID; this.preferredDayIndex = mySubCalEvent.UniversalDayIndex; this._PrepTime = mySubCalEvent.getPreparation; this._Priority = mySubCalEvent.getEventPriority; this._ProfileOfNow = NowProfileData; this._ProfileOfProcrastination = ProcrastinationData; this._RigidSchedule = mySubCalEvent.isRigid; updateStartTime(mySubCalEvent.Start); this._UiParams = mySubCalEvent.getUIParam; this.UniqueID = mySubCalEvent.SubEvent_ID; this._AutoDeleted = mySubCalEvent.getIsUserDeleted; this._Users = mySubCalEvent.getAllUsers(); this.Vestige = mySubCalEvent.isVestige; this._Name = mySubCalEvent.getName; this._Creator = mySubCalEvent.getCreator; this._Users = mySubCalEvent.getAllUsers(); this._TimeZone = mySubCalEvent.getTimeZone; this._calendarEvent = calendarEvent; }
internal DB_SubCalendarEventFly(EventID EventIDData, string Name, DateTimeOffset StartData, DateTimeOffset EndData, int PriorityData, Location_Elements LocationData, DateTimeOffset OriginalStartData, TimeSpan EventPrepTimeData, TimeSpan Event_PreDeadlineData, bool EventRigidFlagData, EventDisplay UiData, MiscData NoteData, bool CompletionFlagData, Procrastination ProcrastinationData, NowProfile NowProfileData, TimeLine CalendarEventRangeData, bool FromRepeatFlagData, bool ElapsedFlagData, bool EnabledFlagData, List <string> UserIDData, long Sequence) { this.BusyFrame = new BusyTimeLine(EventIDData.ToString(), StartData, EndData); this.CalendarEventRange = CalendarEventRangeData; this.FromRepeatEvent = FromRepeatFlagData; this.EventName = Name; this.EventDuration = BusyFrame.BusyTimeSpan; this.Complete = CompletionFlagData; this.ConflictingEvents = new ConflictProfile(); this.DataBlob = NoteData; this.DeadlineElapsed = ElapsedFlagData; this.Enabled = EnabledFlagData; this.StartDateTime = StartData; this.EndDateTime = EndData; this.EventPreDeadline = Event_PreDeadlineData; this.RepetitionSequence = Sequence; this.LocationInfo = LocationData; //this.OldPreferredIndex = mySubCalEvent.OldUniversalIndex; //this.otherPartyID = mySubCalEvent.ThirdPartyID; //this.preferredDayIndex = mySubCalEvent.UniversalDayIndex; this.PrepTime = EventPrepTimeData; this.Priority = PriorityData; this.ProfileOfNow = NowProfileData; this.ProfileOfProcrastination = ProcrastinationData; //this.RepetitionFlag = mySubCalEvent.FromRepeat; this.RigidSchedule = EventRigidFlagData; this.UiParams = UiData; this.UniqueID = EventIDData; this.UserIDs = UserIDData; this.OriginalStart = OriginalStartData; }
internal DB_SubCalendarEventExtra(SubCalendarEvent mySubCalEvent, NowProfile NowProfileData, Procrastination ProcrastinationData) { this.BusyFrame = mySubCalEvent.ActiveSlot; this.CalendarEventRange = mySubCalEvent.getCalendarEventRange; this.FromRepeatEvent = mySubCalEvent.FromRepeat; this.EventName = mySubCalEvent.Name; this.EventDuration = mySubCalEvent.ActiveDuration; this.Complete = mySubCalEvent.isComplete; this.ConflictingEvents = mySubCalEvent.Conflicts; this.DataBlob = mySubCalEvent.Notes; this.DeadlineElapsed = mySubCalEvent.isDeadlineElapsed; this.Enabled = mySubCalEvent.isEnabled; this.EndDateTime = mySubCalEvent.End; this.EventPreDeadline = mySubCalEvent.PreDeadline; this.EventScore = mySubCalEvent.Score; this.isRestricted = mySubCalEvent.isEventRestricted; this.LocationInfo = mySubCalEvent.myLocation; this.OldPreferredIndex = mySubCalEvent.OldUniversalIndex; this.otherPartyID = mySubCalEvent.ThirdPartyID; this.preferredDayIndex = mySubCalEvent.UniversalDayIndex; this.PrepTime = mySubCalEvent.Preparation; this.Priority = mySubCalEvent.EventPriority; this.ProfileOfNow = NowProfileData; this.ProfileOfProcrastination = ProcrastinationData; //this.RepetitionFlag = mySubCalEvent.FromRepeat; this.RigidSchedule = mySubCalEvent.Rigid; this.StartDateTime = mySubCalEvent.Start; this.UiParams = mySubCalEvent.UIParam; this.UniqueID = mySubCalEvent.SubEvent_ID; this.UserDeleted = mySubCalEvent.isUserDeleted; this.UserIDs = mySubCalEvent.getAllUserIDs(); this.Vestige = mySubCalEvent.isVestige; this.OriginalStart = mySubCalEvent.OrginalStartInfo; }