Exemplo n.º 1
0
        private void ClearButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            timeLine.Clear();
            EventThreadViewControl.Group = null;
            SummaryVM.Summary            = null;
            SummaryVM.CaptureName        = null;

            FunctionSummaryVM.Load(null, null);
            FunctionInstanceVM.Load(null, null);

            FunctionSamplingVM.Load(null, null);
            SysCallsSamplingVM.Load(null, null);

            FrameInfoControl.DataContext   = null;
            SampleInfoControl.DataContext  = null;
            SysCallInfoControl.DataContext = null;

            //SamplingTreeControl.SetDescription(null, null);

            MainViewModel vm = DataContext as MainViewModel;

            if (vm.IsCapturing)
            {
                ProfilerClient.Get().SendMessage(new CancelMessage());
            }
        }
Exemplo n.º 2
0
        private void OpenFrame(object source, FocusFrameEventArgs args)
        {
            Data.Frame frame = args.Frame;

            if (frame is EventFrame)
            {
                EventThreadViewControl.Highlight(frame as EventFrame, null);
            }

            if (frame is EventFrame)
            {
                EventFrame eventFrame = frame as EventFrame;
                FrameGroup group      = eventFrame.Group;

                if (eventFrame.RootEntry != null)
                {
                    EventDescription desc = eventFrame.RootEntry.Description;

                    FunctionSummaryVM.Load(group, desc);
                    FunctionInstanceVM.Load(group, desc);

                    FunctionSamplingVM.Load(group, desc);
                    SysCallsSamplingVM.Load(group, desc);

                    FrameInfoControl.SetFrame(frame, null);
                }
            }

            if (frame != null && frame.Group != null)
            {
                if (!ReferenceEquals(SummaryVM.Summary, frame.Group.Summary))
                {
                    SummaryVM.Summary     = frame.Group.Summary;
                    SummaryVM.CaptureName = _captureName;
                }
            }
        }