Пример #1
0
 /// <summary>
 /// Faxs the message.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void FaxMsg(Object sender, MailEventMsgArgs e)
 {
     Console.WriteLine("Sending fax...");
     Console.WriteLine(string.Format("Message from {0} to {1}.", e.from, e.to));
     Console.WriteLine(string.Format("Subject: {0}", e.subject));
     Console.WriteLine(e.body);
 }
Пример #2
0
        public void SimulateArrivingMsg(string from, string to, string subject, string body)
        {
            MailEventMsgArgs e = new MailEventMsgArgs(from, to, subject, body);

            OnMailMsg(e);
        }
Пример #3
0
 /// <summary>
 /// Ons the mail message.
 /// </summary>
 /// <param name="e">E.</param>
 protected virtual void OnMailMsg(MailEventMsgArgs e)
 {
     e.Raise(this, ref MailMsg);
 }
Пример #4
0
 private void PageMsg(Object sender, MailEventMsgArgs e)
 {
     Console.WriteLine(string.Format("Beep-beep: {0} is in trouble.", e.to));
 }