public static void SendMessage(string textMessage) { _serverParcel.Msg = textMessage; _serverParcel.TimeStamp = DateTime.Now; //update DB with the server message TCPServerDB.AddNewMessage(_serverParcel); SendParcel(_serverParcel); }
private static void OnServerParcelReceived(Parcel e) { TCPServerDB.AddNewMessage(e); EventHandler <Parcel> handler = ServerParcelReceived; if (handler != null) { handler(null, e); } }