chore: 初始化合力驱动桥MES采集程序
This commit is contained in:
53
SyUpLoadBak/SyUpLoad/PartLoad.SetControl.cs
Normal file
53
SyUpLoadBak/SyUpLoad/PartLoad.SetControl.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using MesWorkMqtt;
|
||||
using MQTTnet.Client.Connecting;
|
||||
using MQTTnet.Client.Disconnecting;
|
||||
using MQTTnet.Client.Receiving;
|
||||
|
||||
using bizFacade;
|
||||
using MesWorkMqtt;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using MQTTnet;
|
||||
using System.Threading;
|
||||
using DoWhatPlc;
|
||||
using MesServerWork;
|
||||
|
||||
namespace SyUpLoad
|
||||
{
|
||||
public partial class PartLoad
|
||||
{
|
||||
private void SetChekcBox(int tagValue, object checkBox)
|
||||
{
|
||||
|
||||
CheckBox cb = (CheckBox)checkBox;
|
||||
cb.Invoke(new Action(() => {
|
||||
if (tagValue == 1)
|
||||
{
|
||||
cb.Checked = true;
|
||||
cb.BackColor = Color.LightGreen;
|
||||
}
|
||||
else
|
||||
{
|
||||
cb.Checked = false;
|
||||
cb.BackColor = Color.Gray;
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
private void SetTextBox(string text, object controlBox)
|
||||
{
|
||||
TextBox cb = (TextBox)controlBox;
|
||||
cb.Invoke(new Action(() => {
|
||||
cb.Text = text;
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user