Вы находитесь на странице: 1из 1

using

.
.
.
.
.
.
namespace TxRx_SerialPort
{
public partial class Form1 : Form
{
int RA0, RA1, RA2, RA3, RA4; // Variables Globales Puerto A
int RB0, RB1, RB2, RB3; // Variables Globales Puerto B
int tubo1;
public Form1()
{
InitializeComponent();
//Control.CheckForIllegalCrossThreadCalls = false;
}
private void puertosDisponibles()
.
.
.
.
.
.
.
public void eventos()
{
if (InvokeRequired)
{
if (RA0 == 1) Invoke(new Action(() => ON.Visible = true)); // Interruptor
if (RA1 == 1) // Paro
{
Invoke(new Action(() => paroON.Visible = true));
Invoke(new Action(() => ON.Visible = false));
Invoke(new Action(() => B1ON.Visible = false));
Invoke(new Action(() => cicloON.Visible = false));
Invoke(new Action(() => falloON.Visible = false));
Invoke(new Action(() => NbON.Visible = false));
Invoke(new Action(() => NaON.Visible = false));
}
if (RA1 == 0) Invoke(new Action(() => paroON.Visible = false));
if (RA2 == 1)
{
Invoke(new Action(() => NbON.Visible = true));
}
else
{
Invoke(new Action(() => NbON.Visible = false));
}
if (RA3 == 1)
{
Invoke(new
}
else
{
Invoke(new
}
if (RA4 == 1)
{
Invoke(new
Invoke(new
}
else
{
Invoke(new
Invoke(new
}

Action(() => NaON.Visible = true));

Action(() => NaON.Visible = false));

Action(() => termico.Visible = true));


Action(() => termico1.Visible = true));

Action(() => termico.Visible = false));


Action(() => termico1.Visible = false));

/********************** Puerto C o B *********************************/


if (RB0 == 1) Invoke(new Action(() => cicloON.Visible = true)); // LED
if (RB1 == 1) Invoke(new Action(() => falloON.Visible = true));
else
Invoke(new Action(() => falloON.Visible = false));
if (RB2 == 1)
{
Invoke(new
Invoke(new
}
if (RB2 == 0)
{
Invoke(new
Invoke(new
}
}
}
.
.
.
.
.
.
.
.

Action(() => B1ON.Visible = true));// Bomba de Agua...


Action(() => timer1.Enabled = true));// Bomba de Agua...

Action(() => B1ON.Visible = false));// Bomba de Agua...


Action(() => timer1.Enabled = false));// Bomba de Agua...

Вам также может понравиться