private void SetValue_Click(object sender, RoutedEventArgs e) { string res = Microsoft.VisualBasic.Interaction.InputBox($"Enter new value", "Set Value", point.Value.OutVal.ToString()); float result = 0; if (float.TryParse(res, out result)) { Y = graph.localY(result); graph.Paint(true); } }
public Anchor(CurveGraph g, LinkedListNode <CurvePoint> p) { graph = g; point = p; X = graph.localX(point.Value.InVal); Y = graph.localY(point.Value.OutVal); this.DragDelta += OnDragDelta; this.DragStarted += OnDragStarted; this.MouseDown += Anchor_MouseDown; leftHandle = new Handle(this, true); graph.graph.Children.Add(leftHandle); rightHandle = new Handle(this, false); graph.graph.Children.Add(rightHandle); leftBez = null; rightBez = null; }
public Anchor(CurveGraph g, LinkedListNode<CurvePoint> p) { graph = g; point = p; X = graph.localX(point.Value.InVal); Y = graph.localY(point.Value.OutVal); this.DragDelta += OnDragDelta; this.DragStarted += OnDragStarted; this.MouseDown += Anchor_MouseDown; leftHandle = new Handle(this, true); graph.graph.Children.Add(leftHandle); rightHandle = new Handle(this, false); graph.graph.Children.Add(rightHandle); leftBez = null; rightBez = null; }