/// <summary>
 /// Writes numbered lines to the console
 /// </summary>
 public static string[] WriteFormattedLines(string[] lines, FormattedLines formattedLines = FormattedLines.numbered)
 {
     string[] output = new string[lines.Length];
     System.Console.OutputEncoding = System.Text.Encoding.UTF8;
     if (formattedLines == FormattedLines.numbered)
     {
         for (int i = 1; i < lines.Length + 1; i++)
         {
             WriteLine(i + ". " + lines[i - 1]);
             output[i - 1] = i + ". " + lines[i - 1];
         }
     }
     else if (formattedLines == FormattedLines.bulleted)
     {
         for (int i = 1; i < lines.Length + 1; i++)
         {
             WriteLine("• " + lines[i - 1]);
             output[i - 1] = "• " + lines[i - 1];
         }
     }
     else if (formattedLines == FormattedLines.dashed)
     {
         for (int i = 1; i < lines.Length + 1; i++)
         {
             WriteLine("- " + lines[i - 1]);
             output[i - 1] = "- " + lines[i - 1];
         }
     }
     return(output);
 }
Exemple #2
0
        public async Task ExpandTreeNode()
        {
            if (!FormattedLines.IsLoaded)
            {
                IsLoading = true;
                await FormattedLines.LoadAsync();

                IsLoading = false;
            }
            IsExpanded = true;
        }