コード例 #1
0
        protected override void Reevaluate()
        {
            if (_reevaluate != null)
            {
                _reevaluate(this);
            }

            if (CurrentMin.CompareTo(CurrentValue) > 0)
            {
                CurrentValue = CurrentMin;
            }
            if (CurrentValue.CompareTo(CurrentMax) > 0)
            {
                CurrentValue = CurrentMax;
            }
        }
コード例 #2
0
ファイル: CurrentPlot.cs プロジェクト: Erroman/FurnacesInhand
 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);
 }