Esempio n. 1
0
        /// <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());
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
        /// <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);
        }
Esempio n. 5
0
 private void OnUnloaded(object sender, RoutedEventArgs e)
 {
     if (!_loaded)
     {
         return;
     }
     _loaded = false;
     ActualModel.Unload();
 }
Esempio n. 6
0
        /// <summary>
        /// Resets all axes.
        /// </summary>
        public void ResetAllAxes()
        {
            if (ActualModel != null)
            {
                ActualModel.ResetAllAxes();
            }

            InvalidatePlot(false);
        }
Esempio n. 7
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     if (_loaded)
     {
         return;
     }
     _loaded = true;
     ActualModel.Load();
 }
Esempio n. 8
0
        /// <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);
        }
Esempio n. 9
0
 /// <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));
 }
Esempio n. 11
0
        /// <summary>
        /// Resets all axes.
        /// </summary>
        public void ResetAllAxes()
        {
            ActualModel?.ResetAllAxes();

            InvalidatePlot(false);
        }
Esempio n. 12
0
        /// <summary>
        /// Zooms all axes.
        /// </summary>
        /// <param name="factor">The zoom factor.</param>
        public void ZoomAllAxes(double factor)
        {
            ActualModel?.ZoomAllAxes(factor);

            InvalidatePlot(false);
        }
Esempio n. 13
0
        /// <summary>
        /// Pans all axes.
        /// </summary>
        /// <param name="delta">The delta.</param>
        public void PanAllAxes(Vector delta)
        {
            ActualModel?.PanAllAxes(delta.X, delta.Y);

            InvalidatePlot(false);
        }
Esempio n. 14
0
 /// <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));
 }