Mono.GetOptions.OptionList.ShowHelp C# (CSharp) Method

ShowHelp() private method

private ShowHelp ( bool showSecondLevelHelp ) : void
showSecondLevelHelp bool
return void
		private void ShowHelp(bool showSecondLevelHelp)
		{
			ShowTitleLines();
			Console.WriteLine(Usage);
			Console.WriteLine("Options:");
			ArrayList lines = new ArrayList(list.Count);
			int tabSize = 0;
			foreach(OptionDetails option in list)
				if (option.SecondLevelHelp == showSecondLevelHelp)
				{
					string[] optionLines = option.ToString().Split('\n');
					foreach(string line in optionLines)
					{
						int pos = line.IndexOf('\t');
						if (pos > tabSize)
							tabSize = pos;
						lines.Add(line);
					}
				}
			tabSize += 2;
			foreach(string line in lines)
			{
				string[] parts = line.Split('\t');
				Console.Write(parts[0].PadRight(tabSize));
				Console.WriteLine(parts[1]);
				if (parts.Length > 2)
				{
					string spacer = new string(' ', tabSize);
					for(int i = 2; i < parts.Length; i++)
					{
						Console.Write(spacer);
						Console.WriteLine(parts[i]);
					}
				}
			}
			if (appAdditionalInfo != null)
				Console.WriteLine("\n{0}", appAdditionalInfo);
			if (appReportBugsTo != null)
				Console.WriteLine("\nPlease report bugs {0} <{1}>", (appReportBugsTo.IndexOf('@') > 0) ? "to" : "at",
				                  appReportBugsTo);
		}