Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
- Timestamp:
- 06/28/18 11:13:37 (6 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Drawing;25 using System.IO;26 22 using HeuristicLab.Common; 27 23 using HeuristicLab.Core; … … 29 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 26 using HeuristicLab.Persistence.Default.Xml; 27 using System; 28 using System.Collections.Generic; 29 using System.Drawing; 30 using System.IO; 31 using System.Linq; 31 32 32 33 namespace HeuristicLab.Clients.OKB.RunCreation { … … 63 64 OnOperatorsChanged(); 64 65 OnReset(); 66 67 solutions.Clear(); 65 68 } 66 69 } 67 70 } 71 } 72 73 [Storable] 74 private ItemList<OKBSolution> solutions; 75 public ItemList<OKBSolution> Solutions { 76 get { return solutions; } 68 77 } 69 78 … … 135 144 problemId = original.problemId; 136 145 problem = cloner.Clone(original.problem); 146 solutions = cloner.Clone(original.solutions); 137 147 RegisterProblemEvents(); 138 148 } … … 142 152 problemId = -1; 143 153 problem = initialProblem; 154 solutions = new ItemList<OKBSolution>(); 144 155 RegisterProblemEvents(); 145 156 } … … 148 159 if (this.problemId != problemId) { 149 160 IHeuristicOptimizationProblem problem; 150 byte[] problemData = RunCreationClient. GetProblemData(problemId);161 byte[] problemData = RunCreationClient.Instance.GetProblemData(problemId); 151 162 using (MemoryStream stream = new MemoryStream(problemData)) { 152 163 problem = XmlParser.Deserialize<IHeuristicOptimizationProblem>(stream); … … 157 168 } 158 169 } 170 } 171 172 public void RefreshSolutions() { 173 if (ProblemId != -1) { 174 var sols = RunCreationClient.Instance.GetSolutions(ProblemId).Select(OKBSolution.Convert).ToList(); 175 foreach (var sol in sols) sol.DownloadData(); 176 Solutions.Replace(sols); 177 } else Solutions.Clear(); 159 178 } 160 179
Note: See TracChangeset
for help on using the changeset viewer.