Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/11/16 15:29:05 (8 years ago)
Author:
abeham
Message:

#2588: Adapted OKBProblemView to include download/upload of solutions

Location:
trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs

    r13684 r13691  
    2929using System.Drawing;
    3030using System.IO;
     31using System.Linq;
    3132
    3233namespace HeuristicLab.Clients.OKB.RunCreation {
     
    6364            OnOperatorsChanged();
    6465            OnReset();
     66
     67            solutions.Clear();
    6568          }
    6669        }
    6770      }
     71    }
     72
     73    [Storable]
     74    private ItemList<OKBSolution> solutions;
     75    public ItemList<OKBSolution> Solutions {
     76      get { return solutions; }
    6877    }
    6978
     
    135144      problemId = original.problemId;
    136145      problem = cloner.Clone(original.problem);
     146      solutions = cloner.Clone(original.solutions);
    137147      RegisterProblemEvents();
    138148    }
     
    142152      problemId = -1;
    143153      problem = initialProblem;
     154      solutions = new ItemList<OKBSolution>();
    144155      RegisterProblemEvents();
    145156    }
     
    159170    }
    160171
     172    public void RefreshSolutions() {
     173      Solutions.Clear();
     174      if (ProblemId != -1) {
     175        Solutions.AddRange(RunCreationClient.Instance.GetSolutions(ProblemId).Select(OKBSolution.Convert));
     176      }
     177    }
     178
    161179    public IProblem CloneProblem() {
    162180      return (IProblem)Problem.Clone();
Note: See TracChangeset for help on using the changeset viewer.