示例#1
0
 /// <summary>
 /// Creates an appointment.
 /// </summary>
 /// <param name="classId"></param>
 /// <param name="objectId"></param>
 /// <param name="label"></param>
 /// <param name="occurs"></param>
 /// <param name="durationMinutes">Negative minutes are transformed to zero.</param>
 /// <param name="details"></param>
 protected Appointment(ClassId classId, ObjectId objectId, String label, DateTime occurs, int durationMinutes, String details) : base(classId, objectId, label)
 {
     mStarts          = new DateTime(occurs);
     mDurationMinutes = durationMinutes;
     mDetails         = details;
     mContacts        = new Relation1M <Contact>();
 }
示例#2
0
        /// <summary>
        /// Initializes a DiaryCreator.
        /// </summary>
        /// <param name="classId"></param>
        public DiaryCreator(ClassId classId)
        {
            mClassId = classId;

            var persistenceFolderPath = ConfigurationManager.AppSettings["PersistenceFolderPath"];

            if (mDiaryCreatorCount == 0)
            {
                sDataFile = new VariableLengthRecordFile(persistenceFolderPath, ConfigurationManager.AppSettings["PersistenceDataFileNameWithoutExtension"]);
                sKeyFile  = new KeyFile(persistenceFolderPath, ConfigurationManager.AppSettings["PersistenceKeyFileNameWithoutExtension"]);
            }

            mDiaryCreatorCount++;
        }
示例#3
0
 /// <summary>
 /// Creates a calendar event.
 /// </summary>
 /// <param name="classId"></param>
 /// <param name="objectId"></param>
 /// <param name="label"></param>
 /// <remarks>Events occuring in the past are not handled different than those in the future.</remarks>
 public CalendarEvent(ClassId classId, ObjectId objectId, String label) : base(classId, objectId)
 {
     mLabel = label;
 }
示例#4
0
 /// <summary>
 /// Evaluates if this factory can be used for creating a particular object.
 /// </summary>
 /// <param name="classId"></param>
 /// <returns></returns>
 public bool RecognizesClue(ClassId classId)
 {
     return(classId.CompareTo(mClassId) == 0);
 }