Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/10/17 14:30:37 (7 years ago)
Author:
pfleck
Message:

#2845

  • Fixed/Added Progress Cancellation/Stopping
  • Added Visible property to progress and ProgressBarMode.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r15400 r15415  
    4040    private readonly ISymbolicDataAnalysisSolutionImpactValuesCalculator impactCalculator;
    4141
    42     private readonly IProgress progress = new Progress();
     42    private readonly IProgress progress = new Progress() { CanBeCanceled = true, CanBeStopped = true };
    4343
    4444    private enum TreeState { Valid, Invalid }
     
    183183      treeChart.Tree = tree.Root.SubtreeCount > 1 ? new SymbolicExpressionTree(tree.Root) : new SymbolicExpressionTree(tree.Root.GetSubtree(0).GetSubtree(0));
    184184
    185       progress.Start("Calculate Impact and Replacement Values ...");
     185      progress.Start("Calculate Impact and Replacement Values ...", 0);
    186186      var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
    187187      await Task.Delay(500); // wait for progressbar to finish animation
     
    298298
    299299    private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    300       progress.Start("Optimizing Constants ...");
     300      progress.Start("Optimizing Constants ...", 0);
    301301      var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
    302302      var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
Note: See TracChangeset for help on using the changeset viewer.