private void OnAttachedProtoOnBogusReceived(object sender, DataReceivedEventArgs args) { if (ShowBogus) { LogData(args.Data, true); } }
private void OnAttachedProtoOnBogusSent(object sender, DataReceivedEventArgs args) { if (ShowBogus && Window != null && Window.IsHandleCreated && !Window.IsDisposed) { if (Window.InvokeRequired) { // ensure it's queued Window.BeginInvoke((Action <IEnumerable <byte>, bool, bool>)LogData, args.Data, false, true); } else { LogData(args.Data, false, true); } } }