示例#1
0
 public Messages(DatingProfile sender, string messageTitle, string messageData)
 {
     this.sender       = sender;
     this.messageTitle = messageTitle;
     this.messageData  = messageData;
     isRead            = false;
 }
示例#2
0
        static void Main(string[] args)
        {
            DatingProfile Samuel = new DatingProfile("Samuel", "Alade", 33, "Male");

            Samuel.WriteBio("I love sports, I love listening to music,");

            DatingProfile Vivian = new DatingProfile("Vivian", "Gordon", 27, "Female");

            Vivian.WriteBio("new to this site. Hoping to find new friends");


            Samuel.SendMessage("Hello, Vivian", "Want to go out to the park", Vivian);
            Vivian.ReadMessage();

            Vivian.SendMessage("Hey, Samuel", "Yes. I would like to go out to the park with you. what time?", Samuel);
            Samuel.ReadMessage();

            Samuel.SendMessage("Okay, Vivian", "Be there at 1 pm :)", Vivian);
            Vivian.ReadMessage();

            Vivian.SendMessage("Ok, Samuel", "I'll be there :)", Samuel);
            Samuel.ReadMessage();
        }
示例#3
0
        public void SendMessage(string messageTitle, string messageData, DatingProfile sentTo)
        {
            Messages message = new Messages(this, messageTitle, messageData);

            sentTo.InboxAdd(message);
        }