internal void BackgroundRun(JulianDay startDate, JulianDay endDate) { // Run the document in the background to avoid slowing UI performance if (_BackgroundRun != null) { Pair argument = new Pair() { X = startDate, Y = endDate }; _BackgroundRun.Run(argument, true/*bCancelPrevious*/); } }
private Pair GetCoordinateFromPosition(Point position) { if (PlotArea == null || XAxis == null || YAxis == null) return new Pair { X = null, Y = null }; IComparable xValue = XAxis.GetValueAtPosition(new UnitValue(position.X, Unit.Pixels)); IComparable yValue = YAxis.GetValueAtPosition(new UnitValue(PlotArea.ActualHeight - position.Y, Unit.Pixels)); Pair coord = new Pair() { X = xValue, Y = yValue }; return coord; }