Exemplo n.º 1
0
        async private void OnAnalyzeThread(object sender, RoutedEventArgs e)
        {
            if (_session == null)
            {
                tbDumpFilename.Focus();
                return;
            }

            try
            {
                miThreads.IsEnabled = false;

                if (_threadsWnd == null)
                {
                    _threadsWnd = new ThreadsWindow(
                        "ClrMD Studio - Threads Analysis",
                        _session,
                        _staTaskScheduler
                        );
                    _threadsWnd.ShowActivated = true;
                    _threadsWnd.ShowInTaskbar = true;
                    _threadsWnd.Owner         = this;
                    _threadsWnd.Show();
                    await _threadsWnd.StartAnalysisAsync(null);
                }
                else
                {
                    _threadsWnd.WindowState = WindowState.Normal;
                    _threadsWnd.Activate();
                }
            }
            catch (Exception x)
            {
                AddLine(x.Message);
            }
            finally
            {
                miThreads.IsEnabled = true;
            }
        }
Exemplo n.º 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;
            }
        }