Torna al Thread

string protlettura = string.Concat(">", indperiferica, "rFF", CheckSum(">" + indperiferica + "rFF"), "!"); sp.Write(protlettura); byte[] ByteLetti = new byte[1]; if (sp.BytesToRead > 0) { Array.Resize(ref ByteLetti, sp.BytesToRead); sp.Read(ByteLetti, 0, ByteLetti.Length); s_ricevi = System.Text.Encoding.ASCII.GetString(ByteLetti); this.Invoke(new Aggiorna(_Aggiorna), s_ricevi); } if (l == 21) { this.Invoke(new Aggiorna(stato), s_ricevi); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5