Beispiel #1
0
        private void OnShowGCMemory(object sender, RoutedEventArgs e)
        {
            if (_session == null)
            {
                tbDumpFilename.Focus();
                return;
            }

            try
            {
                miGCMemory.IsEnabled = false;
                if (_gcMemoryWnd == null)
                {
                    _gcMemoryWnd = new GCMemoryWindow(
                        "ClrMD Studio - Show GC Memory",
                        _session,
                        _staTaskScheduler
                        );
                    _gcMemoryWnd.ShowActivated = true;
                    _gcMemoryWnd.ShowInTaskbar = true;
                    _gcMemoryWnd.Owner         = this;
                    _gcMemoryWnd.Show();
                }
                else
                {
                    _gcMemoryWnd.WindowState = WindowState.Normal;
                    _gcMemoryWnd.Activate();
                }
            }
            catch (Exception x)
            {
                AddLine(x.Message);
            }
            finally
            {
                miGCMemory.IsEnabled = true;
            }
        }
Beispiel #2
0
        private void CloseAnalysisPanes()
        {
            if (_threadPoolWnd != null)
            {
                _threadPoolWnd.ForceClose();
                _threadPoolWnd = null;
            }

            if (_threadsWnd != null)
            {
                _threadsWnd.ForceClose();
                _threadsWnd = null;
            }

            if (_stringsWnd != null)
            {
                _stringsWnd.ForceClose();
                _stringsWnd = null;
            }

            if (_timersWnd != null)
            {
                _timersWnd.ForceClose();
                _timersWnd = null;
            }

            if (_pinnedObjectsWnd != null)
            {
                _pinnedObjectsWnd.ForceClose();
                _pinnedObjectsWnd = null;
            }

            if (_gcMemoryWnd != null)
            {
                _gcMemoryWnd.ForceClose();
                _gcMemoryWnd = null;
            }
        }