Пример #1
0
 /// <summary>
 /// Subject通知メソッド
 /// </summary>
 /// <param name="notifySubject"></param>
 public void Notify(NotifyStruct notifySubject)
 {
     fm2.textBox1.AppendText("*** Teacher ***\r\n");
     fm2.textBox1.AppendText("送信元 = " + notifySubject.from.ToString() + "\r\n");
     fm2.textBox1.AppendText("受信先 = " + notifySubject.to.ToString() + "\r\n");
     fm2.textBox1.AppendText("内容 = " + notifySubject.subject + "\r\n");
 }
Пример #2
0
        /// <summary>
        /// イベント通知用構造体格納メソッド
        /// </summary>
        /// <param name="notifySubject"></param>
        public void SetChanged(NotifyStruct notifySubject)
        {
            // イベント通知用構造体に値を格納
            this.notifySubject.from    = notifySubject.from;
            this.notifySubject.to      = notifySubject.to;
            this.notifySubject.subject = notifySubject.subject;

            // Observer送信メソッド使用
            Notify();
        }