/// <summary> /// Method to add message to display in log frame. /// </summary> /// <param name="s">The message to add to the queue.</param> public static void AddLog(string s) { // Enqueue message to display. if (logs.Count > maxLogsLinesLength) { logs.Dequeue(); } logs.Enqueue(s); IEnumerable <string> outputs = logs.Cast <string>().Reverse(); string buffer = ""; int index = outputs.Count(); foreach (string str in logs.Cast <string>().Reverse()) { //buffer += $"({(index--).ToString().PadLeft(4, '0')}) {str}"; buffer += $"- {str}"; } ApplicationBase.BeginInvokeIfRequired(() => { MessageBoxs.BusyContent = s; }); ApplicationBase.BeginInvokeIfRequired(() => { AppNavigatorBase.LogsStack.Text = buffer; }); }