//Constructor public PushForm(WeatherDataSubject subject) { InitializeComponent(); //Store the subject. this.subject = subject; //subscribe this object to subject. subject.Attach(this); }
//Constructor public CurrentConditionDisplayPushObserver(WeatherDataSubject dataSubject) { this.dataSubject = dataSubject; dataSubject.Attach(this); }