Beispiel #1
0
 private void OnClosing(object sender, FormClosingEventArgs e)
 {
     Publisher.Unsubscribe("CD:ROOT", sub_treeview);
     Logger.RemoveStatusBar(statusbar);
     Logger.RemoveProgressBar(progressbar);
     View.disktool = null;
 }
 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);
 }