Inheritance: MarkdownLog.MarkdownContainer
示例#1
0
        protected bool ExportTask(Task task, BulletedMarkdownContainer mdParent, bool root)
        {
            // add ourselves

            mdParent.Append(new RawMarkdown(FormatTaskAttributes(task, root)));

            // then our subtasks in a container
            BulletedMarkdownContainer mdSubtasks = new BulletedMarkdownContainer();

            Task subtask = task.GetFirstSubtask();

            if (subtask.IsValid())
            {
                while (subtask.IsValid())
                {
                    ExportTask(subtask, mdSubtasks, false);

                    subtask = subtask.GetNextTask();
                }

                mdParent.Append(mdSubtasks);
            }

            return(true);
        }
        protected bool ExportTask(TDLTask task, BulletedMarkdownContainer mdParent, bool root)
        {
            // add ourselves
            
            mdParent.Append(new RawMarkdown(FormatTaskAttributes(task, root)));

            // then our subtasks in a container
            BulletedMarkdownContainer mdSubtasks = new BulletedMarkdownContainer();

            TDLTask subtask = task.GetFirstSubtask();

            if (subtask.IsValid())
            {
                while (subtask.IsValid())
                {
                    ExportTask(subtask, mdSubtasks, false);

                    subtask = subtask.GetNextTask();
                }

                mdParent.Append(mdSubtasks);
            }

            return true;
        }
示例#3
0
        public bool Export(TaskList srcTasks, string sDestFilePath, bool bSilent, Preferences prefs, string sKey)
        {
            UInt32 taskCount = srcTasks.GetTaskCount();

            BulletedMarkdownContainer mdTasks = new BulletedMarkdownContainer();

            Task task = srcTasks.GetFirstTask();

            while (task.IsValid())
            {
                ExportTask(task, mdTasks, true);

                task = task.GetNextTask();
            }

            Debug.Write(mdTasks.ToMarkdown());
            System.IO.File.WriteAllText(sDestFilePath, mdTasks.ToMarkdown());

            return(true);
        }
        public bool Export(TDLTaskList srcTasks, string sDestFilePath, bool bSilent, TDLPreferences prefs, string sKey)
        {
            UInt32 taskCount = srcTasks.GetTaskCount();

            BulletedMarkdownContainer mdTasks = new BulletedMarkdownContainer();

            TDLTask task = srcTasks.GetFirstTask();

            while (task.IsValid())
            {
                ExportTask(task, mdTasks, true);

                task = task.GetNextTask();
            }

            Debug.Write(mdTasks.ToMarkdown());
            System.IO.File.WriteAllText(sDestFilePath, mdTasks.ToMarkdown());

            return true;
        }