/// <summary> /// Called on mouse move events. /// </summary> /// <param name="args">An instance that contains the event data.</param> protected override void OnMouseMoved(MouseMovedEventArgs args) { base.OnMouseMoved(args); if (args.Handled) { return; } if (ShowDynamicTooltips) { string tooltip = null; var hitArgs = new HitTestArguments(new ScreenPoint(args.X, args.Y), MouseHitTolerance); foreach (var result in ActualModel.HitTest(hitArgs)) { var plotElement = result.Element as PlotElement; if (plotElement != null && !String.IsNullOrEmpty(plotElement.ToolTip)) { tooltip = String.IsNullOrEmpty(tooltip) ? plotElement.ToolTip : tooltip + Environment.NewLine + plotElement.ToolTip; } } TooltipText = tooltip; } args.Handled = ActualController.HandleMouseMove(this, args.ToOxyMouseEventArgs()); }
public override IProjectSubscriptionUpdate ToActualModel() { var model = new ActualModel(); if (CurrentState != null) { model.CurrentState = CurrentState.Select(x => new KeyValuePair <string, IProjectRuleSnapshot>(x.Key, x.Value)) .ToImmutableDictionary(); } else { model.CurrentState = ImmutableDictionary <string, IProjectRuleSnapshot> .Empty; } if (ProjectChanges != null) { model.ProjectChanges = ProjectChanges.Select(x => new KeyValuePair <string, IProjectChangeDescription>(x.Key, x.Value.ToActualModel())) .ToImmutableDictionary(); } else { model.ProjectChanges = ImmutableDictionary <string, IProjectChangeDescription> .Empty; } if (ProjectConfiguration != null) { model.ProjectConfiguration = ProjectConfiguration.ToActualModel(); } return(model); }
/// <summary> /// Pans all axes. /// </summary> /// <param name="dx">Dx.</param> /// <param name="dy">Dy.</param> public void PanAllAxes(double dx, double dy) { if (ActualModel != null) { ActualModel.PanAllAxes(dx, dy); } InvalidatePlot(false); }
/// <summary> /// Pans all axes. /// </summary> /// <param name="delta">The delta.</param> public void PanAllAxes(Vector delta) { if (ActualModel != null) { ActualModel.PanAllAxes(delta.X, delta.Y); } InvalidatePlot(false); }
private void OnUnloaded(object sender, RoutedEventArgs e) { if (!_loaded) { return; } _loaded = false; ActualModel.Unload(); }
/// <summary> /// Resets all axes. /// </summary> public void ResetAllAxes() { if (ActualModel != null) { ActualModel.ResetAllAxes(); } InvalidatePlot(false); }
private void OnLoaded(object sender, RoutedEventArgs e) { if (_loaded) { return; } _loaded = true; ActualModel.Load(); }
/// <summary> /// Zooms all axes. /// </summary> /// <param name="factor">The zoom factor.</param> public void ZoomAllAxes(double factor) { if (ActualModel != null) { ActualModel.ZoomAllAxes(factor); } InvalidatePlot(false); }
/// <summary> /// Zooms to a level so that everything is in view. /// </summary> public void ZoomToAll() { ActualModel.ResetAllAxes(); InvalidatePlot(false); }
//RegressionModel methods public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { return(ActualModel.IsProblemDataCompatible(problemData, out errorMessage)); }
/// <summary> /// Resets all axes. /// </summary> public void ResetAllAxes() { ActualModel?.ResetAllAxes(); InvalidatePlot(false); }
/// <summary> /// Zooms all axes. /// </summary> /// <param name="factor">The zoom factor.</param> public void ZoomAllAxes(double factor) { ActualModel?.ZoomAllAxes(factor); InvalidatePlot(false); }
/// <summary> /// Pans all axes. /// </summary> /// <param name="delta">The delta.</param> public void PanAllAxes(Vector delta) { ActualModel?.PanAllAxes(delta.X, delta.Y); InvalidatePlot(false); }
/// <summary> /// Performs a 'fake' zoom, so that the view is not updated when series are hidden or shown. /// </summary> private void FixateZoom() { ActualModel.ZoomAllAxes(1.0); }
// forward message to actual model (recalculate model first if necessary) public override IEnumerable <double> GetEstimatedValues(IDataset dataset, IEnumerable <int> rows) { return(ActualModel.GetEstimatedValues(dataset, rows)); }
public ISymbolicExpressionTree ExtractTree(int treeIdx) { return(ActualModel.ExtractTree(treeIdx)); }
public IEnumerable <double> GetEstimatedVariances(IDataset dataset, IEnumerable <int> rows) { return(ActualModel.GetEstimatedVariances(dataset, rows)); }