protected override void Reevaluate() { if (_reevaluate != null) { _reevaluate(this); } if (CurrentMin.CompareTo(CurrentValue) > 0) { CurrentValue = CurrentMin; } if (CurrentValue.CompareTo(CurrentMax) > 0) { CurrentValue = CurrentMax; } }
void currentPlot(List <TimeParameterPair> timeParameterPairs) { this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(delegate(Object state) { if (currentGraph != null) { CurrentPlot.Children?.Remove(currentGraph); } Rect rectangular = new Rect(0, 0, CurrentPlot.ActualWidth, CurrentPlot.ActualHeight); FurnacesInHandViewModel vm = (FurnacesInHandViewModel)this.DataContext; //Установить верхние и нижние границы значений, отображаеиых на графике CurrentMax.GetBindingExpression(TextBox.TextProperty).UpdateSource(); CurrentMin.GetBindingExpression(TextBox.TextProperty).UpdateSource(); currentGraph = new CurrentGraph(timeParameterPairs, rect: rectangular, startTime: this.startTime, finishTime: this.finishTime, vm: vm); CurrentPlot.Children.Add(currentGraph); return(null); } ), null); }