45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Diagnostics;
 | |
| using System.Drawing;
 | |
| using System.IO;
 | |
| using System.Linq;
 | |
| using System.Net;
 | |
| using System.Text;
 | |
| using System.Windows.Forms;
 | |
| 
 | |
| namespace Project
 | |
| {
 | |
|     public partial class FMain
 | |
|     {
 | |
|         delegate void ShowLotTextHandler(string value);
 | |
|        
 | |
|         delegate void UpdateDMTextHandler(string value1);
 | |
|        
 | |
|         //void UpdateResultText(string value1)
 | |
|         //{
 | |
|         //    if (this.lbResult.InvokeRequired)
 | |
|         //    {
 | |
|         //        lbResult.BeginInvoke(new UpdateDMTextHandler(UpdateResultText), new object[] { value1 });
 | |
|         //    }
 | |
|         //    else
 | |
|         //    {
 | |
|         //        lbResult.Text = value1;
 | |
|         //    }
 | |
|         //}
 | |
| 
 | |
|         delegate void UpdateLabelTextHandler(Control ctl, string value);
 | |
|         void UpdateLabelText(Control ctl, string value)
 | |
|         {
 | |
|             if (ctl.InvokeRequired)
 | |
|             {
 | |
|                 ctl.BeginInvoke(new UpdateLabelTextHandler(UpdateLabelText), new object[] { ctl, value });
 | |
|             }
 | |
|             else
 | |
|             {
 | |
|                 ctl.Text = value;
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | 
