public override void ConsumeInput(Input input)
        {
            if (m_outputFile == null && !InitialiseFile())
            {
                throw new FileNotFoundException();
            }

            m_outputFile.WriteLine(string.Format("[{0}] {1}", ConsoleHelper.currentTimeFormatted(), input.InputContent));
            m_outputFile.Flush();
            base.ConsumeInput(input);
        }
示例#2
0
        public void AddInput(Input input)
        {
            if (!input.IsValid())
            {
                return;
            }

            Dispatcher.Invoke(new Action(() =>
            {
                Label newLabel   = new Label();
                newLabel.Content = string.Format("[{0}] {1}", ConsoleHelper.currentTimeFormatted(), input.InputContent);
                contentList.Items.Add(newLabel);
                contentList.ScrollIntoView(newLabel);
            }));
        }