private void WriteValuesToScreenFromThread(LogStack logStack, FileToMonitor fileToMonitor) { if (DateTime.Compare(File.GetLastWriteTime(fileToMonitor.getPath()), fileToMonitor.getTimeStamp()) > 0) { string text = String.Empty; while (!logStack.GetCount().Equals(0)) { Node node = logStack.Pop(); text = text + Environment.NewLine + node.getText(); historyStack.Push(node); } txtbxLogDisplay.Invoke((MethodInvoker)delegate { txtbxLogDisplay.Text = text; }); fileToMonitor.setDateTime(File.GetLastWriteTime(fileToMonitor.getPath())); } }
private void WriteValuesToScreen(LogStack logStack) { string text = String.Empty; while (!logStack.GetCount().Equals(0)) { Node node = logStack.Pop(); text = text + Environment.NewLine + node.getText(); historyStack.Push(node); } txtbxLogDisplay.Text = text; }