Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/20/16 15:56:56 (8 years ago)
Author:
pfleck
Message:

#2597:

  • Moved variable name + cursor value to the top.
  • Fixed some warnings (missing async await).
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionGradientView.cs

    r14095 r14131  
    162162    }
    163163
    164     private void trackbar_CheckedChanged(object sender, EventArgs e) {
     164    private async void trackbar_CheckedChanged(object sender, EventArgs e) {
    165165      var trackBar = sender as DensityTrackbar;
    166166      if (trackBar == null || !trackBar.Checked) return;
     
    169169        tb.Checked = false;
    170170      gradientChart.FreeVariable = variableNames[trackbars.IndexOf(trackBar)];
    171       gradientChart.RecalculateAsync();
    172     }
    173 
    174     private void trackbar_LimitsChanged(object sender, EventArgs e) {
     171      await gradientChart.RecalculateAsync();
     172    }
     173
     174    private async void trackbar_LimitsChanged(object sender, EventArgs e) {
    175175      var trackBar = sender as DensityTrackbar;
    176176      if (trackBar == null || !trackBar.Checked) return;
    177177      gradientChart.FixedXAxisMin = trackBar.Limits.Lower;
    178178      gradientChart.FixedXAxisMax = trackBar.Limits.Upper;
    179       gradientChart.RecalculateAsync();
    180     }
    181 
    182     private void trackbar_ValueChanged(object sender, EventArgs e) {
     179      await gradientChart.RecalculateAsync();
     180    }
     181
     182    private async void trackbar_ValueChanged(object sender, EventArgs e) {
    183183      var trackBar = sender as DensityTrackbar;
    184184      if (trackBar == null) return;
    185185      sharedFixedVariables.SetVariableValue((double)trackBar.Value, variableNames[trackbars.IndexOf(trackBar)], 0);
    186       gradientChart.RecalculateAsync();
     186      await gradientChart.RecalculateAsync();
    187187    }
    188188
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs

    r14095 r14131  
    127127          Margin = Padding.Empty,
    128128          Height = 12,
    129           Visible = false
     129          Visible = false,
     130          Top = (int)(gradientChart.Height * 0.1),
    130131        };
    131132        densityCharts.Add(variableName, densityChart);
     
    137138          if (density.Visible)
    138139            UpdateDensityChart(density, gradient.FreeVariable);
     140        };
     141        gradientChart.SizeChanged += (o, e) => {
     142          var gradient = (GradientChart)o;
     143          var density = densityCharts[gradient.FreeVariable];
     144          density.Top = (int)(gradient.Height * 0.1);
    139145        };
    140146
     
    372378        densityChart.Visible = true;
    373379      }
     380
     381      gradientChart.UpdateTitlePosition();
    374382    }
    375383
Note: See TracChangeset for help on using the changeset viewer.