protected void EvaluateOnTransmit(ISniffer sniffer, IState state) { try { if (InvokeRequired) { SniferStateDelegate methodDelegate = new SniferStateDelegate(EvaluateOnTransmit); BeginInvoke(methodDelegate, new object[] { sniffer, state }); } else { textBoxTransmit.AppendText("Transmission Detected"); textBoxTransmit.AppendText("\r\n"); if (state is IQuantumState) { textBoxTransmit.AppendText(((IQuantumState)state).Debugger.FullDebug); } if (state is IClassicState) { textBoxTransmit.AppendText(((IClassicState)state).Debugger.FullDebug); } textBoxTransmit.AppendText("\r\n"); textBoxTransmit.AppendText("\r\n"); } } catch { } }
protected void EvaluateOnReceive(ISniffer sniffer, IState state) { if (InvokeRequired) { SniferStateDelegate methodDelegate = new SniferStateDelegate(EvaluateOnReceive); BeginInvoke(methodDelegate, new object[] { sniffer, state }); } else { textBoxReceive.AppendText("Reception Detected"); textBoxReceive.AppendText("\r\n"); if (state is IQuantumState) { textBoxReceive.AppendText(((IQuantumState)state).Debugger.FullDebug); } if (state is IClassicState) { textBoxReceive.AppendText(((IClassicState)state).Debugger.FullDebug); } textBoxReceive.AppendText("\r\n"); textBoxReceive.AppendText("\r\n"); } }