Changeset 7182
- Timestamp:
- 12/13/11 13:13:16 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/LogView.Designer.cs
r6983 r7182 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.txtLog = new System.Windows.Forms.TextBox();48 47 this.chkShowBalloonTips = new System.Windows.Forms.CheckBox(); 48 this.hlLogView = new HeuristicLab.Core.Views.LogView(); 49 49 this.SuspendLayout(); 50 //51 // txtLog52 //53 this.txtLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)54 | System.Windows.Forms.AnchorStyles.Left)55 | System.Windows.Forms.AnchorStyles.Right)));56 this.txtLog.BackColor = System.Drawing.Color.White;57 this.txtLog.Location = new System.Drawing.Point(3, 3);58 this.txtLog.Multiline = true;59 this.txtLog.Name = "txtLog";60 this.txtLog.ReadOnly = true;61 this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;62 this.txtLog.Size = new System.Drawing.Size(480, 238);63 this.txtLog.TabIndex = 2;64 50 // 65 51 // chkShowBalloonTips … … 75 61 this.chkShowBalloonTips.CheckedChanged += new System.EventHandler(this.chkShowBalloonTips_CheckedChanged); 76 62 // 63 // hlLogView 64 // 65 this.hlLogView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 66 | System.Windows.Forms.AnchorStyles.Left) 67 | System.Windows.Forms.AnchorStyles.Right))); 68 this.hlLogView.Caption = "Log View"; 69 this.hlLogView.Content = null; 70 this.hlLogView.Location = new System.Drawing.Point(3, 3); 71 this.hlLogView.Name = "hlLogView"; 72 this.hlLogView.ReadOnly = false; 73 this.hlLogView.Size = new System.Drawing.Size(480, 238); 74 this.hlLogView.TabIndex = 4; 75 // 77 76 // LogView 78 77 // 79 78 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 80 79 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 80 this.Controls.Add(this.hlLogView); 81 81 this.Controls.Add(this.chkShowBalloonTips); 82 this.Controls.Add(this.txtLog);83 82 this.Name = "LogView"; 84 83 this.Size = new System.Drawing.Size(486, 267); … … 91 90 #endregion 92 91 93 private System.Windows.Forms.TextBox txtLog;94 92 private System.Windows.Forms.CheckBox chkShowBalloonTips; 93 private HeuristicLab.Core.Views.LogView hlLogView; 95 94 } 96 95 } -
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 -
trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.Designer.cs
r7135 r7182 95 95 } 96 96 } 97 98 [global::System.Configuration.ApplicationScopedSettingAttribute()] 99 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 [global::System.Configuration.DefaultSettingValueAttribute("1000")] 101 public int MaxLogCount { 102 get { 103 return ((int)(this["MaxLogCount"])); 104 } 105 } 97 106 } 98 107 } -
trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/Properties/Settings.settings
r7135 r7182 21 21 <Value Profile="(Default)">00:00:03</Value> 22 22 </Setting> 23 <Setting Name="MaxLogCount" Type="System.Int32" Scope="Application"> 24 <Value Profile="(Default)">1000</Value> 25 </Setting> 23 26 </Settings> 24 27 </SettingsFile> -
trunk/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/app.config
r7135 r7182 4 4 <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 5 5 <section name="HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> 6 </sectionGroup> 7 <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 8 <section name="HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 6 9 </sectionGroup> 7 10 </configSections> … … 28 31 </HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings> 29 32 </userSettings> 33 <applicationSettings> 34 <HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings> 35 <setting name="MaxLogCount" serializeAs="String"> 36 <value>1000</value> 37 </setting> 38 </HeuristicLab.Clients.Hive.SlaveCore.Views.Properties.Settings> 39 </applicationSettings> 30 40 </configuration>
Note: See TracChangeset
for help on using the changeset viewer.