void ShowMemUse_Click(object sender, RoutedEventArgs e)
 {
     if (_memDisp == null)
     {
         _memDisp         = new MemoryStatusDisplay();
         _memDisp.Closed += new EventHandler(_memDisp_Closed);
     }
     _memDisp.Show();
     System.Timers.Timer timer = new System.Timers.Timer();
     timer.Interval = 500;
     timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
     timer_Elapsed(null, null);
     timer.Start();
     _timer = timer;
 }
 void _memDisp_Closed(object sender, EventArgs e)
 {
     _timer.Stop();
     _memDisp = null;
     _timer = null;
 }
 void ShowMemUse_Click(object sender, RoutedEventArgs e)
 {
     if (_memDisp == null)
     {
         _memDisp = new MemoryStatusDisplay();
         _memDisp.Closed += new EventHandler(_memDisp_Closed);
     }
     _memDisp.Show();
     System.Timers.Timer timer = new System.Timers.Timer();
     timer.Interval = 500;
     timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
     timer_Elapsed(null, null);
     timer.Start();
     _timer = timer;
 }
 private void ShowMemUse_Click(object sender, RoutedEventArgs e)
 {
     if (_memDisp == null)
       {
     _memDisp = new MemoryStatusDisplay();
     _memDisp.Closed += _memDisp_Closed;
       }
       _memDisp.Show();
       var timer = new Timer();
       timer.Interval = 500;
       timer.Elapsed += timer_Elapsed;
       timer_Elapsed(null, null);
       timer.Start();
       _timer = timer;
 }
 void _memDisp_Closed(object sender, EventArgs e)
 {
     _timer.Stop();
     _memDisp = null;
     _timer   = null;
 }