public double localX(double x)
{
return HorizontalScale * (x - HorizontalOffset);
}
private void SetTime_Click(object sender, RoutedEventArgs e) { float prev = point.Previous?.Value.InVal ?? float.MinValue; float next = point.Next?.Value.InVal ?? float.MaxValue; string res = Microsoft.VisualBasic.Interaction.InputBox($"Enter time between {prev} and {next}", "Set Time", point.Value.InVal.ToString()); float result = 0; if (float.TryParse(res, out result) && result > prev && result < next) { X = graph.localX(result); graph.Paint(true); } }