10.20PLC+相机2.3视觉修改
This commit is contained in:
		
							
								
								
									
										35
									
								
								Check.Main/UI/FrmLog.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								Check.Main/UI/FrmLog.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| using System.Data; | ||||
| using System.Drawing; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Threading.Tasks; | ||||
| using System.Windows.Forms; | ||||
| using WeifenLuo.WinFormsUI.Docking; | ||||
|  | ||||
| namespace Check.Main.UI | ||||
| { | ||||
|     public partial class FrmLog : DockContent | ||||
|     { | ||||
|         public FrmLog() | ||||
|         { | ||||
|             InitializeComponent(); | ||||
|         } | ||||
|         public void AddLog(string message) | ||||
|         { | ||||
|             if (txtLog.InvokeRequired) | ||||
|             { | ||||
|                 txtLog.BeginInvoke(new Action(() => AddLog(message))); | ||||
|                 return; | ||||
|             } | ||||
|             if (txtLog.Lines.Length > 500) | ||||
|             { | ||||
|                 txtLog.Clear(); | ||||
|             } | ||||
|             txtLog.AppendText(message + Environment.NewLine); | ||||
|             txtLog.ScrollToCaret(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user