Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/11 13:13:16 (12 years ago)
Author:
ascheibe
Message:

#1672 switched to HeuristicLab Log and LogView for the Slave UI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/LogView.cs

    r6983 r7182  
    2424using HeuristicLab.Clients.Hive.SlaveCore.Views.Properties;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Core;
    2627using HeuristicLab.Core.Views;
    2728using HeuristicLab.MainForm;
     
    4041    }
    4142
     43    private ILog log;
     44
    4245    public LogView() {
    4346      InitializeComponent();
     47      log = new ThreadSafeLog(Settings.Default.MaxLogCount);
     48      hlLogView.Content = log;
    4449    }
    4550
     
    5863    #endregion
    5964
    60 
    6165    protected override void OnContentChanged() {
    6266      base.OnContentChanged();
     
    6973    #region Event Handlers
    7074    void Content_SlaveMessageLogged(object sender, EventArgs<string> e) {
    71       string msg = string.Format("{0}: {1} {2}", DateTime.Now.ToString("HH:mm:ss"), e.Value, Environment.NewLine);
    72 
    73       if (txtLog.InvokeRequired) {
    74         txtLog.Invoke(new Action<string>(txtLog.AppendText), msg);
    75       } else {
    76         txtLog.AppendText(msg);
    77       }
     75      log.LogMessage(e.Value);
    7876    }
    7977
Note: See TracChangeset for help on using the changeset viewer.