示例#1
0
 public static void SendMessage(string textMessage)
 {
     _serverParcel.Msg       = textMessage;
     _serverParcel.TimeStamp = DateTime.Now;
     //update DB with the server message
     TCPServerDB.AddNewMessage(_serverParcel);
     SendParcel(_serverParcel);
 }
示例#2
0
        private static void OnServerParcelReceived(Parcel e)
        {
            TCPServerDB.AddNewMessage(e);
            EventHandler <Parcel> handler = ServerParcelReceived;

            if (handler != null)
            {
                handler(null, e);
            }
        }