Beispiel #1
0
        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()));
            }
        }
Beispiel #2
0
        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;
        }