示例#1
0
 private void windowClosing(Object sender, CancelEventArgs e)
 {
     if (!closeReally)
     {
         e.Cancel        = true; //don't close as such
         this.Visibility = Visibility.Hidden;
     }
     if (heardWindow != null)
     {
         heardWindow.Close();
         heardWindow = null;
     }
     if (keyWindow != null)
     {
         keyWindow.Close();
         keyWindow = null;
     }
 }
 private void windowClosing(Object sender, CancelEventArgs e)
 {
     //e.Cancel = true;  //if you wanted to stop it
     if (updateTimer != null)
     {
         updateTimer.Stop();
     }
     if (wplayer != null)
     {
         wplayer.controls.stop();
         wplayer.close();
     }
     if (configWindow != null)
     {
         configWindow.closeReally = true;
     }
     configWindow.Close();
     if (keyWindow != null)
     {
         keyWindow.Close();
         keyWindow = null;
     }
 }