public void Init(TextBox TB_showProcess) { this.TB_showProcess = TB_showProcess; foreach (var eStream in _package.Effect.BytesSamples) { _messages.Enqueue(eStream); } _rs232.Open(); _thread = new Thread(SendFunc); _thread.IsBackground = false; _thread.Start(); }
public void Init(TextBox TB_showProcess) { try { this.TB_showProcess = TB_showProcess; foreach (var eStream in _package.Effect.BytesSamples) { _messages.Enqueue(eStream); } _rs232.Open(); _thread = new Thread(SendFunc); _thread.IsBackground = false; _thread.Start(); } catch (Exception ex) { CallBacker.CallBackException?.Invoke(ex); } }