private void HandlingCommunication(Communication.CommunicationStream communication) { string thread_name = Thread.CurrentThread.Name; this._client.Form.DebugLog.Invoke(new System.Windows.Forms.MethodInvoker(delegate { this._client.Form.DebugLog.PrintDebug(System.Drawing.Color.White, "[" + thread_name + "] Communication recieve :\n["); })); switch (communication) { case Response r: this.HandlingResponse(r); break; default: this._client.Form.DebugLog.Invoke(new System.Windows.Forms.MethodInvoker(delegate { this._client.Form.DebugLog.PrintDebug(System.Drawing.Color.DarkRed, "[" + thread_name + "] Type of Communication unknown"); })); break; } this._client.Form.DebugLog.Invoke(new System.Windows.Forms.MethodInvoker(delegate { this._client.Form.DebugLog.PrintDebug(System.Drawing.Color.White, "]\n"); })); }
private void HandlingCommunication(Communication.CommunicationStream communication) { ConsoleManager.TrackWriteLine(ConsoleColor.White, "[" + Thread.CurrentThread.Name + "] Communication recieve :\n["); switch (communication) { case Response r: this.HandlingResponse(r); break; default: ConsoleManager.TrackWriteLine(ConsoleColor.DarkRed, "[" + Thread.CurrentThread.Name + "] Type of Communication unknown"); break; } ConsoleManager.TrackWriteLine(ConsoleColor.White, "]\n"); }
public ResponseEvent(Communication.CommunicationStream request, Action <object> callback) { this.request = request; this.callback = callback; }