//Constructor
        public SocialObserver(ListBox lb, SocialSubject ss)
        {
            // Inititalise attributes
            currentStatus    = "";
            currentTimeStamp = DateTime.Now;

            this.lb = lb;
            this.ss = ss;

            ss.AddObserver(this);
        }
        public Form1()
        {
            InitializeComponent();

            //Initialise attributes
            subject = new SocialSubject();

            main = new SocialObserver(lbMain, subject);
            fO1  = new FriendObserver(lbFriend1, subject);
            fO2  = new FriendObserver(lbFriend2, subject);
            fO3  = new FriendObserver(lbFriend3, subject);
            fO4  = new FriendObserver(lbFriend4, subject);
        }
Пример #3
0
 //Constructor
 public FriendObserver(ListBox lb, SocialSubject ss)
     : base(lb, ss)
 {
 }