Ejemplo n.º 1
0
        // Constructors
        public TaskAide(Database db, ISystemTime systemTime, ITimer timer)
        {
            this.systemTime = systemTime;
            this.timer      = timer;

            var taskTable = new TaskTable("Tasks", db);

            this.taskUidGenerator = new UidGenerator(
                ApplicationData.Current.RoamingSettings,
                "TaskUids",
                (uid) => { return(taskTable.Get(uid.ToString()) == null); });
            this.taskList = new TaskList(taskTable);

            //this.sessionTable = new SessionTable("Sessions", db);
            //this.sessionUidGenerator = new UidGenerator(
            //    ApplicationData.Current.RoamingSettings,
            //    "SessionUids",
            //    (uid) => { return this.sessionTable.Get(uid.ToString()) == null; });

            //this.intervalTable = new IntervalTable("Intervals", db);
            //this.intervalUidGenerator = new UidGenerator(
            //    ApplicationData.Current.RoamingSettings,
            //    "IntervalUids",
            //    (uid) => { return this.intervalTable.Get(uid.ToString()) == null; });
        }
Ejemplo n.º 2
0
 // Constructors
 public TaskList(TaskTable table)
 {
     this.table = table;
     this.tasks = this.GetListFromStorage();
     this.Tasks = new ReadOnlyObservableCollection <ITask>(this.tasks);
 }