Ejemplo n.º 1
0
        public RepeatTask(string FolderName)
        {
            this.RecordFile  = FileNameGenerator.GetRepeatRecordFileName(FolderName);
            this.ContentFile = FileNameGenerator.GetRepeatContentFileName(FolderName);


            this.ValueConverter = ObjectContainer.GetConverter <TValue>();

            Verify();
        }
Ejemplo n.º 2
0
        public SecondItem(int DayInt, ISchedule schedule)
        {
            this._schedule = schedule;

            this.FileName     = FileNameGenerator.GetItemFileName(DayInt);
            this.DayInt       = DayInt;
            this.FullFileName = FileNameGenerator.GetItemFullFileName(DayInt, schedule);

            // create the file and write a header.
            if (!File.Exists(this.FullFileName))
            {
                File.WriteAllText(this.FullFileName, "store items of every second");
            }
        }
Ejemplo n.º 3
0
        public ScheduleContent(int DayInt, ISchedule schedule)
        {
            this._schedule = schedule;

            this.FileName     = FileNameGenerator.GetContentFileName(DayInt);
            this.DayInt       = DayInt;
            this.FullFileName = FileNameGenerator.GetContentFullFileName(DayInt, schedule);

            if (!File.Exists(this.FullFileName))
            {
                File.WriteAllText(this.FullFileName, "schedule content file, do not modify\r\n");
            }

            this.ValueConverter = ObjectContainer.GetConverter <TValue>();
        }
Ejemplo n.º 4
0
        public TimeSheet(int DayInt, ISchedule schedule)
        {
            this._schedule = schedule;

            _positioncache        = new Dictionary <int, long>();
            _positioncachecounter = 0;

            this.FileName     = FileNameGenerator.GetTimeFileName(DayInt);
            this.DayInt       = DayInt;
            this.FullFileName = FileNameGenerator.GetTimeFullFileName(DayInt, schedule);

            if (!File.Exists(this.FullFileName))
            {
                int currentday = DateTime.Now.DayToInt();

                if (DayInt >= currentday)
                {
                    Create();
                }
            }
        }
Ejemplo n.º 5
0
 public static bool isExists(int DayInt, ISchedule schedule)
 {
     return(File.Exists(FileNameGenerator.GetTimeFullFileName(DayInt, schedule)));
 }