- Timestamp:
- 12/13/11 13:13:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/LogView.cs
r6983 r7182 24 24 using HeuristicLab.Clients.Hive.SlaveCore.Views.Properties; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Core.Views; 27 28 using HeuristicLab.MainForm; … … 40 41 } 41 42 43 private ILog log; 44 42 45 public LogView() { 43 46 InitializeComponent(); 47 log = new ThreadSafeLog(Settings.Default.MaxLogCount); 48 hlLogView.Content = log; 44 49 } 45 50 … … 58 63 #endregion 59 64 60 61 65 protected override void OnContentChanged() { 62 66 base.OnContentChanged(); … … 69 73 #region Event Handlers 70 74 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); 78 76 } 79 77
Note: See TracChangeset
for help on using the changeset viewer.