public bool Notify(object obj) { try { object old = win.SelectedObject; if (old != null) { Publisher.Unsubscribe(old as IBound, this); } win.SelectedObject = obj; if (obj != null) { Publisher.Subscribe(obj as IBound, this); } } catch { //NullReferenceExeception is expected } return(true); }
public Subscriber_DiskView(string url, TreeView win) { this.url = url; this.win = win; Publisher.Subscribe(url, this); }
public Subscriber_ListBox(string url, ListBox win) { this.url = url; this.win = win; Publisher.Subscribe(url, this); }
public Subscriber_TreeView(TreeView win) { this.win = win; Publisher.Subscribe("*", this); }