54 lines
1.2 KiB
C#
54 lines
1.2 KiB
C#
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;
|
|
}));
|
|
}
|
|
}
|
|
}
|