Exemplo n.º 1
0
 protected override void OnClosed(EventArgs e)
 {
     if (taskTrayIconManager != null)
     {
         taskTrayIconManager.Dispose();
         taskTrayIconManager = null;
     }
     var disposeObj = DataContext as IDisposable;
     if (disposeObj != null)
         disposeObj.Dispose();
     base.OnClosed(e);
 }
Exemplo n.º 2
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     taskTrayIconManager = new TaskTrayIconManager(
         (Window)sender, (INotifyPropertyChanged)DataContext, "HasNotifyIcon");
 }