示例#1
0
        internal static void WriteDevLog(DevLogEntries entries)
        {
            //TODO tasklog and devlog should have their own filenames
            if (File.Exists(GetRelativeCurrentFilePath()))
            {
                File.Delete(GetRelativeCurrentFilePath());
            }

            StringBuilder sb = new StringBuilder();

            Directory.CreateDirectory(STORAGE_DIRECTORY);

            if (!File.Exists(GetRelativeCurrentFilePath()))
            {
                sb.Append(GetDevLogIntro());
            }

            sb.AppendLine("## Released Features");
            sb.AppendLine();
            sb.AppendLine("The following features have been tested and, to the best of our knowledge, work as intended. However, we are not perfect. Please let us know if you find a problem, like the feature or do not like a feature.");
            sb.AppendLine();
            for (int i = 0; i < entries.GetEntries().Count; i++)
            {
                if (entries.GetEntry(i).status == DevLogEntry.Status.Done)
                {
                    sb.Append(GetMarkdown(entries.GetEntry(i)));
                }
            }

            if (entries.GetEntries(DevLogEntry.Status.Testing).Count > 0)
            {
                sb.AppendLine("## Beta Features");
                sb.AppendLine("The following features are currently being tested. They may not work as intended, please let us know if you find a problem, like the feature or do not like a feature.");
                sb.AppendLine();
                sb.AppendLine();
                for (int i = 0; i < entries.GetEntries().Count; i++)
                {
                    if (entries.GetEntry(i).status == DevLogEntry.Status.Testing)
                    {
                        sb.Append(GetMarkdown(entries.GetEntry(i)));
                    }
                }
            }

            using (StreamWriter file = File.AppendText(GetRelativeCurrentFilePath()))
            {
                file.Write(sb.ToString());
                file.Close();
            }
        }
示例#2
0
        internal static void WriteTaskLog(DevLogEntries entries)
        {
            //TODO tasklog and devlog should have their own filenames
            if (File.Exists(GetRelativeCurrentFilePath()))
            {
                File.Delete(GetRelativeCurrentFilePath());
            }

            StringBuilder sb = new StringBuilder();

            Directory.CreateDirectory(STORAGE_DIRECTORY);

            if (!File.Exists(GetRelativeCurrentFilePath()))
            {
                sb.Append(GetDevLogIntro());
            }

            sb.AppendLine("## In Progress Features");
            sb.AppendLine();
            for (int i = 0; i < entries.GetEntries().Count; i++)
            {
                if (entries.GetEntry(i).status == DevLogEntry.Status.InProgress)
                {
                    sb.Append(GetMarkdown(entries.GetEntry(i)));
                }
            }

            if (entries.GetEntries(DevLogEntry.Status.ToDo).Count > 0)
            {
                sb.AppendLine("## To Do Features");
                sb.AppendLine();
                for (int i = 0; i < entries.GetEntries().Count; i++)
                {
                    if (entries.GetEntry(i).status == DevLogEntry.Status.ToDo)
                    {
                        sb.Append(GetMarkdown(entries.GetEntry(i)));
                    }
                }
            }

            using (StreamWriter file = File.AppendText(GetRelativeCurrentFilePath()))
            {
                file.Write(sb.ToString());
                file.Close();
            }
        }