Exemplo n.º 1
0
 void ShowLogItem(LogEntity log)
 {
     AppendContent(GetParagraphForLog(log));
     if (_logViewModel.IsAutoScrollToEnd)
     {
         RichTextBoxLogs.ScrollToEnd();
     }
 }
Exemplo n.º 2
0
 private void ReceivedText(string message)
 {
     Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background,
                                                new Action(() =>
     {
         RichTextBoxLogs.AppendText(Environment.NewLine + message);
     }));
 }
Exemplo n.º 3
0
 private void AppendRichtTextBoxLog(string text)
 {
     Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background,
                                                new Action(() =>
     {
         RichTextBoxLogs.AppendText(Environment.NewLine + "[" + ConvertDateTimeToString(DateTime.Now) + "] " + text);
     }));
 }
Exemplo n.º 4
0
 void ShowLog(string log)
 {
     AppendContent(new Paragraph(new Run(log))
     {
         Tag = DateTime.Now
     });
     if (_logViewModel.IsAutoScrollToEnd)
     {
         RichTextBoxLogs.ScrollToEnd();
     }
 }
Exemplo n.º 5
0
        public DetailView(IServerListener listener, Model.Client client)
        {
            InitializeComponent();
            _listener = listener;
            _client   = client;

            if (_client.LogPath != null)
            {
                RichTextBoxLogs.AppendText(File.ReadAllText(Path.GetFullPath(_client.LogPath)));
            }


            _client.TextReceived += new ReceivedText(ReceivedText);
        }