Esempio n. 1
0
 protected override void ShowNearestSelectedPointCommands(AppIdentity identity, LineSeries lineSeries, OxyMouseDownEventArgs args)
 {
     GuiModelData.SelectedApplicationIdentity = identity;
     var requestId = getSelectedRequestId(args.HitTestResult.Index, lineSeries);
     showCommands(requestId);
     setSelectedPointInfo(lineSeries, args);
 }
Esempio n. 2
0
 public AppIdentity(AppIdentity appIdentity)
 {
     this.AppDomainId = appIdentity.AppDomainId;
     this.AppDomainName = appIdentity.AppDomainName;
     this.ProcessId = appIdentity.ProcessId;
     this.ProcessName = appIdentity.ProcessName;
 }
Esempio n. 3
0
 protected BaseInfo()
 {
     AtDateTime = DateTime.Now;
     ManagedThreadId = DispatcherHelper.GetManagedThreadId();
     ApplicationIdentity = new AppIdentity();
     HttpInfo = new HttpInfo();
     AppDomainSnapshot = new AppDomainMonitorSnapshot();
 }
Esempio n. 4
0
        protected override void ShowNearestSelectedPointCommands(AppIdentity identity, LineSeries lineSeries, OxyMouseDownEventArgs args)
        {
            GuiModelData.SelectedApplicationIdentity = identity;

            var indexOfNearestPoint = (int)Math.Round(args.HitTestResult.Index);
            var point = lineSeries.Points[indexOfNearestPoint];
            var time = (long)point.X;
            showCommands(time);

            SelectedPointInfo = GetSelectedPointInfo(lineSeries, point);
        }
Esempio n. 5
0
        protected override void ShowNearestSelectedPointCommands(AppIdentity identity, LineSeries lineSeries, OxyMouseDownEventArgs args)
        {
            GuiModelData.SelectedApplicationIdentity = identity;

            var indexOfNearestPoint = (int)Math.Round(args.HitTestResult.Index);
            var point = lineSeries.Points[indexOfNearestPoint];
            var connectionId = (int)point.X;
            CallbacksManagerBase.ShowAllCommandsWithSameConnectionId(connectionId);

            SelectedPointInfo = GetSelectedPointInfo(lineSeries, point);
        }
Esempio n. 6
0
        protected virtual void AddDataPoint(AppIdentity identity, double x, double y)
        {
            LineSeries lineSeries;
            if (!LineSeries.TryGetValue(identity, out lineSeries))
            {
                lineSeries = CreateLineSeries(identity);
            }

            lineSeries.Points.Add(new DataPoint(x, y));

            UpdateXMax(x);
            UpdateYMax(y);
            HaveNewPoints = true;
        }
Esempio n. 7
0
        protected virtual DataPointInfo FindDataPointInfo(AppIdentity appIdentity, double xAxisId)
        {
            var defaultResult = new DataPointInfo(default(DataPoint), -1, null);

            LineSeries lineSeries;
            if (!LineSeries.TryGetValue(appIdentity, out lineSeries))
                return defaultResult;

            var result = lineSeries.Points.Select((value, index) => new { value, index })
                                          .FirstOrDefault(point => point.value.X.ApproxEquals(xAxisId));
            return result == null ? defaultResult : new DataPointInfo(result.value, result.index, lineSeries);
        }
Esempio n. 8
0
        protected LineSeries CreateLineSeries(AppIdentity appIdentity)
        {
            var identity = new AppIdentity(appIdentity);
            GuiModelData.ApplicationIdentities.Add(identity);

            var lineSeries = new LineSeries
            {
                MarkerType = MarkerType.Circle,
                StrokeThickness = 2,
                MarkerSize = 3,
                Title = identity.ProcessName + " [" + identity.AppDomainName + "]"
            };
            lineSeries.MouseDown += (from, args) =>
            {
                if (args.ChangedButton == OxyMouseButton.Left)
                {
                    ShowNearestSelectedPointCommands(identity, lineSeries, args);
                }
            };

            GuiModelData.PlotModel.Series.Add(lineSeries);
            LineSeries.Add(identity, lineSeries);

            return lineSeries;
        }