Example #1
0
 /// <summary>
 /// Creates a new TFMS_Data object that contains a command, a message, and a user name, all in separate fields
 /// encapsulates all the data about a message into one object
 /// </summary>
 /// <param name="cmd">the message command</param>
 /// <param name="msg">the data portion</param>
 /// <param name="name">the user name of the sender</param>
 public TFMS_Data(TFMS_Command cmd, string msg, string name)
 {
     cmdCommand = cmd;
     strMessage = msg;
     strName = name;
     acknowledged = false;
     timeStamp = DateTime.Now;
 }
Example #2
0
 /// <summary>
 /// Performs a shallow copy of the specified TFMS_Data object
 /// </summary>
 /// <param name="data">the TFMS_Data object that you want to duplicate</param>
 private void clone(TFMS_Data data)
 {
     if (data == null) return;
     this.acknowledged = data.acknowledged;
     this.cmdCommand = data.cmdCommand;
     this.strMessage = data.strMessage;
     this.strName = data.strName;
     this.timeStamp = data.timeStamp;
 }