예제 #1
0
        public Indexable GetNextIndexable()
        {
            FileInfo file = (FileInfo)note_files.Current;

            if (!file.Exists)
            {
                return(null);
            }

            if (IsUpToDate(file.FullName))
            {
                return(null);
            }

            Note note = TomboyNote.ParseNote(file);

            if (note == null)
            {
                return(null);
            }

            Indexable indexable = NoteToIndexable(file, note);

            return(indexable);
        }
예제 #2
0
        private void IndexNote(FileInfo file, Scheduler.Priority priority)
        {
            if (this.IsUpToDate(file.FullName))
            {
                return;
            }

            // Try and parse a Note from the given path
            Note note = TomboyNote.ParseNote(file);

            if (note == null)
            {
                return;
            }

            // A Note was returned; add it to the index
            Indexable indexable = NoteToIndexable(file, note);

            Scheduler.Task task = NewAddTask(indexable);
            task.Priority    = priority;
            task.SubPriority = 0;
            ThisScheduler.Add(task);
        }