Пример #1
0
        private void HandlerMessageFromRdt(InvokeReason reason, string message)
        {
            switch (reason)
            {
            case InvokeReason.Sender:
            {
                textBox_Client.AppendText(">>> " + message + Environment.NewLine);
                break;
            }

            case InvokeReason.Receiver:
            {
                textBox_Client.AppendText("<<< " + message + Environment.NewLine);
                break;
            }

            case InvokeReason.Error:
            {
                textBox_Server.AppendText("[ERROR] " + message + Environment.NewLine);
                break;
            }

            case InvokeReason.Debug:
            {
                textBox_Server.AppendText("[DEBUG] " + message + Environment.NewLine);
                break;
            }
            }
        }
Пример #2
0
 protected void RaiseOnDeliver(InvokeReason reason, string text)
 {
     OnDeliver?.Invoke(reason, text);
 }