initial commit
This commit is contained in:
29
Cs_HMI/Project/StateMachine/DisplayTextHandler.cs
Normal file
29
Cs_HMI/Project/StateMachine/DisplayTextHandler.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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 UpdateControlTextHandler(Control ctl, string value);
|
||||
void UpdateControlText(Control ctl, string value)
|
||||
{
|
||||
if (ctl.InvokeRequired)
|
||||
{
|
||||
ctl.BeginInvoke(new UpdateControlTextHandler(UpdateControlText), new object[] { ctl, value });
|
||||
}
|
||||
else
|
||||
{
|
||||
ctl.Text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user