Changeset 13656 for branches/WebJobManager/HeuristicLab.Clients.OKB/3.3
- Timestamp:
- 03/07/16 10:18:05 (9 years ago)
- Location:
- branches/WebJobManager
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.OKB/3.3/Administration/ServiceClient/OKBItem.cs
r12012 r13656 30 30 [Item("OKBItem", "Base class for all OKB items.")] 31 31 public partial class OKBItem : IOKBItem { 32 public virtual string ItemName { 32 public virtual string ItemName 33 { 33 34 get { return ItemAttribute.GetName(this.GetType()); } 34 35 } 35 public virtual string ItemDescription { 36 public virtual string ItemDescription 37 { 36 38 get { return ItemAttribute.GetDescription(this.GetType()); } 37 39 } 38 public Version ItemVersion { 40 public Version ItemVersion 41 { 39 42 get { return ItemAttribute.GetVersion(this.GetType()); } 40 43 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Database; } 44 public static Image StaticItemImage 45 { 46 get { return new Bitmap(25, 25); } 43 47 } 44 public virtual Image ItemImage { 45 get { 48 public virtual Image ItemImage 49 { 50 get 51 { 46 52 if (Modified) 47 53 return HeuristicLab.Common.Resources.VSImageLibrary.DatabaseModified; … … 52 58 53 59 private bool modified; 54 public bool Modified { 60 public bool Modified 61 { 55 62 get { return modified; } 56 private set { 63 private set 64 { 57 65 if (value != modified) { 58 66 modified = value; -
branches/WebJobManager/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs
r12504 r13656 41 41 42 42 private long algorithmId; 43 public long AlgorithmId { 43 public long AlgorithmId 44 { 44 45 get { return algorithmId; } 45 46 } 46 47 private IAlgorithm algorithm; 47 private IAlgorithm Algorithm { 48 private IAlgorithm Algorithm 49 { 48 50 get { return algorithm; } 49 set { 51 set 52 { 50 53 if (value == null) throw new ArgumentNullException("Algorithm", "Algorithm cannot be null."); 51 54 if (value != algorithm) { … … 77 80 } 78 81 79 public IEnumerable<IOptimizer> NestedOptimizers { 80 get { 82 public IEnumerable<IOptimizer> NestedOptimizers 83 { 84 get 85 { 81 86 // inner algorithm cannot be accessed directly 82 87 return Enumerable.Empty<IOptimizer>(); … … 84 89 } 85 90 86 public override Image ItemImage { 91 public override Image ItemImage 92 { 87 93 get { return Algorithm.ItemImage; } 88 94 } 89 95 90 public static new Image StaticItemImage { 91 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 92 } 93 94 public string Name { 96 97 98 public string Name 99 { 95 100 get { return Algorithm.Name; } 96 101 set { throw new NotSupportedException("Name cannot be changed."); } 97 102 } 98 public string Description { 103 public string Description 104 { 99 105 get { return Algorithm.Description; } 100 106 set { throw new NotSupportedException("Description cannot be changed."); } 101 107 } 102 public bool CanChangeName { 108 public bool CanChangeName 109 { 103 110 get { return false; } 104 111 } 105 public bool CanChangeDescription { 112 public bool CanChangeDescription 113 { 106 114 get { return false; } 107 115 } 108 116 109 public IKeyedItemCollection<string, IParameter> Parameters { 117 public IKeyedItemCollection<string, IParameter> Parameters 118 { 110 119 get { return Algorithm.Parameters; } 111 120 } 112 121 113 public ExecutionState ExecutionState { 122 public ExecutionState ExecutionState 123 { 114 124 get { return Algorithm.ExecutionState; } 115 125 } 116 public TimeSpan ExecutionTime { 126 public TimeSpan ExecutionTime 127 { 117 128 get { return Algorithm.ExecutionTime; } 118 129 } 119 130 120 public Type ProblemType { 131 public Type ProblemType 132 { 121 133 get { return Algorithm.ProblemType; } 122 134 } 123 public IProblem Problem { 135 public IProblem Problem 136 { 124 137 get { return Algorithm.Problem; } 125 138 set { Algorithm.Problem = value; } 126 139 } 127 140 128 public ResultCollection Results { 141 public ResultCollection Results 142 { 129 143 get { return Algorithm.Results; } 130 144 } 131 145 132 146 private RunCollection runs; 133 public RunCollection Runs { 147 public RunCollection Runs 148 { 134 149 get { return runs; } 135 150 } 136 151 private bool storeRunsAutomatically; 137 public bool StoreRunsAutomatically { 152 public bool StoreRunsAutomatically 153 { 138 154 get { return storeRunsAutomatically; } 139 set { 155 set 156 { 140 157 if (value != storeRunsAutomatically) { 141 158 storeRunsAutomatically = value; … … 144 161 } 145 162 } 146 public bool StoreAlgorithmInEachRun { 163 public bool StoreAlgorithmInEachRun 164 { 147 165 get { return Algorithm.StoreAlgorithmInEachRun; } 148 166 set { Algorithm.StoreAlgorithmInEachRun = value; } … … 154 172 155 173 [Storable(Name = "AlgorithmId")] 156 private long StorableAlgorithmId { 174 private long StorableAlgorithmId 175 { 157 176 get { return algorithmId; } 158 177 set { algorithmId = value; } 159 178 } 160 179 [Storable(Name = "Algorithm")] 161 private IAlgorithm StorableAlgorithm { 180 private IAlgorithm StorableAlgorithm 181 { 162 182 get { return algorithm; } 163 set { 183 set 184 { 164 185 algorithm = value; 165 186 RegisterAlgorithmEvents(); … … 167 188 } 168 189 [Storable(Name = "Runs")] 169 private RunCollection StorableRuns { 190 private RunCollection StorableRuns 191 { 170 192 get { return runs; } 171 set { 193 set 194 { 172 195 runs = value; 173 196 RegisterRunsEvents(); … … 175 198 } 176 199 [Storable(Name = "StoreRunsAutomatically")] 177 private bool StorableStoreRunsAutomatically { 200 private bool StorableStoreRunsAutomatically 201 { 178 202 get { return storeRunsAutomatically; } 179 203 set { storeRunsAutomatically = value; } -
branches/WebJobManager/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBProblem.cs
r12012 r13656 34 34 [StorableClass] 35 35 public abstract class OKBProblem : Item, IHeuristicOptimizationProblem { 36 public virtual Type ProblemType { 36 public virtual Type ProblemType 37 { 37 38 get { return typeof(IHeuristicOptimizationProblem); } 38 39 } 39 40 private long problemId; 40 public long ProblemId { 41 public long ProblemId 42 { 41 43 get { return problemId; } 42 44 } 43 45 private IHeuristicOptimizationProblem problem; 44 protected IHeuristicOptimizationProblem Problem { 46 protected IHeuristicOptimizationProblem Problem 47 { 45 48 get { return problem; } 46 private set { 49 private set 50 { 47 51 if (value == null) throw new ArgumentNullException("Problem", "Problem cannot be null."); 48 52 if (value != problem) { … … 68 72 } 69 73 70 public override Image ItemImage { 74 public override Image ItemImage 75 { 71 76 get { return Problem.ItemImage; } 72 77 } 73 78 74 public static new Image StaticItemImage { 75 get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; } 76 } 77 78 public string Name { 79 80 81 public string Name 82 { 79 83 get { return Problem.Name; } 80 84 set { throw new NotSupportedException("Name cannot be changed."); } 81 85 } 82 public string Description { 86 public string Description 87 { 83 88 get { return Problem.Description; } 84 89 set { throw new NotSupportedException("Description cannot be changed."); } 85 90 } 86 public bool CanChangeName { 91 public bool CanChangeName 92 { 87 93 get { return false; } 88 94 } 89 public bool CanChangeDescription { 95 public bool CanChangeDescription 96 { 90 97 get { return false; } 91 98 } 92 99 93 public IKeyedItemCollection<string, IParameter> Parameters { 100 public IKeyedItemCollection<string, IParameter> Parameters 101 { 94 102 get { return Problem.Parameters; } 95 103 } 96 104 97 public IParameter SolutionCreatorParameter { 105 public IParameter SolutionCreatorParameter 106 { 98 107 get { return Problem.SolutionCreatorParameter; } 99 108 } 100 public ISolutionCreator SolutionCreator { 109 public ISolutionCreator SolutionCreator 110 { 101 111 get { return Problem.SolutionCreator; } 102 112 } 103 public IParameter EvaluatorParameter { 113 public IParameter EvaluatorParameter 114 { 104 115 get { return Problem.EvaluatorParameter; } 105 116 } 106 public IEvaluator Evaluator { 117 public IEvaluator Evaluator 118 { 107 119 get { return Problem.Evaluator; } 108 120 } 109 public IEnumerable<IItem> Operators { 121 public IEnumerable<IItem> Operators 122 { 110 123 get { return Problem.Operators; } 111 124 } … … 115 128 #region Persistence Properties 116 129 [Storable(Name = "ProblemId")] 117 private long StorableProblemId { 130 private long StorableProblemId 131 { 118 132 get { return problemId; } 119 133 set { problemId = value; } 120 134 } 121 135 [Storable(Name = "Problem")] 122 private IHeuristicOptimizationProblem StorableProblem { 136 private IHeuristicOptimizationProblem StorableProblem 137 { 123 138 get { return problem; } 124 set { 139 set 140 { 125 141 problem = value; 126 142 RegisterProblemEvents();
Note: See TracChangeset
for help on using the changeset viewer.