Changeset 7201
- Timestamp:
- 12/19/11 03:17:35 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 69 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Benchmark.cs
r7015 r7201 189 189 } 190 190 191 public static Image StaticItemImage { 192 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 193 } 191 194 public Image ItemImage { 192 195 get { … … 195 198 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused; 196 199 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 197 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;200 else return ItemAttribute.GetImage(this.GetType()); 198 201 } 199 202 } -
trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/DhrystoneBenchmark.cs
r7006 r7201 64 64 } 65 65 66 public static Image StaticItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 68 } 66 69 public Image ItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }70 get { return ItemAttribute.GetImage(this.GetType()); } 68 71 } 69 72 -
trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/LinpackBenchmark.cs
r7007 r7201 64 64 } 65 65 66 public static Image StaticItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 68 } 66 69 public Image ItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }70 get { return ItemAttribute.GetImage(this.GetType()); } 68 71 } 69 72 -
trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/WhetstoneBenchmark.cs
r7006 r7201 64 64 } 65 65 66 public static Image StaticItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 68 } 66 69 public Image ItemImage { 67 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }70 get { return ItemAttribute.GetImage(this.GetType()); } 68 71 } 69 72 -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r7112 r7201 224 224 } 225 225 } 226 public static new Image StaticItemImage { 227 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 228 } 226 229 public override Image ItemImage { 227 230 get { … … 230 233 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused; 231 234 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 232 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;235 else return base.ItemImage; 233 236 } 234 237 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs
r5809 r7201 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 using System. IO;23 using System.Drawing; 25 24 using System.Linq; 26 using System.Text;27 25 using HeuristicLab.Common; 28 26 using HeuristicLab.Core; 29 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using SVM;31 28 using HeuristicLab.Problems.DataAnalysis; 32 using System.Drawing;33 29 34 30 namespace HeuristicLab.Algorithms.DataAnalysis { … … 39 35 [Item("KMeansClusteringModel", "Represents a k-Means clustering model.")] 40 36 public sealed class KMeansClusteringModel : NamedItem, IClusteringModel { 41 public override ImageItemImage {37 public static new Image StaticItemImage { 42 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 43 39 } -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalysis/AlleleFrequencyCollection.cs
r5445 r7201 33 33 [StorableClass] 34 34 public class AlleleFrequencyCollection : ReadOnlyItemCollection<AlleleFrequency> { 35 public override ImageItemImage {35 public static new Image StaticItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Statistics; } 37 37 } -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalysis/AlleleFrequencyCollectionHistory.cs
r5445 r7201 33 33 [StorableClass] 34 34 public class AlleleFrequencyCollectionHistory : ItemCollection<AlleleFrequencyCollection> { 35 public override ImageItemImage {35 public static new Image StaticItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Cab; } 37 37 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/DataTable.cs
r5445 r7201 38 38 [StorableClass] 39 39 public class DataTable : NamedItem, IStringConvertibleMatrix { 40 public override ImageItemImage {40 public static new Image StaticItemImage { 41 41 get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; } 42 42 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/DataTableHistory.cs
r5445 r7201 33 33 [StorableClass] 34 34 public class DataTableHistory : ItemCollection<DataTable> { 35 public override ImageItemImage {35 public static new Image StaticItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Cab; } 37 37 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/HeatMap.cs
r5445 r7201 31 31 [StorableClass] 32 32 public class HeatMap : DoubleMatrix { 33 public override ImageItemImage {33 public static new Image StaticItemImage { 34 34 get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; } 35 35 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/HeatMapHistory.cs
r5445 r7201 33 33 [StorableClass] 34 34 public class HeatMapHistory : ItemCollection<HeatMap> { 35 public override ImageItemImage {35 public static new Image StaticItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Cab; } 37 37 } -
trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveJobs/HiveTask.cs
r7192 r7201 40 40 protected ReaderWriterLockSlim childHiveTasksLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); 41 41 42 public static new Image StaticItemImage { 43 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 44 } 42 45 public override Image ItemImage { 43 46 get { … … 52 55 else if (task.State == TaskState.Failed) return HeuristicLab.Common.Resources.VSImageLibrary.Error; 53 56 else if (task.State == TaskState.Finished) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 54 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;57 else return base.ItemImage; 55 58 } 56 59 } … … 120 123 hiveJob.IsControllable = value; 121 124 } 122 } finally { 125 } 126 finally { 123 127 childHiveTasksLock.ExitReadLock(); 124 128 } … … 134 138 try { 135 139 return childHiveTasks.AsReadOnly(); 136 } finally { childHiveTasksLock.ExitReadLock(); } 140 } 141 finally { childHiveTasksLock.ExitReadLock(); } 137 142 } 138 143 } … … 193 198 try { 194 199 this.childHiveTasks = cloner.Clone(original.childHiveTasks); 195 } finally { original.childHiveTasksLock.ExitReadLock(); } 200 } 201 finally { original.childHiveTasksLock.ExitReadLock(); } 196 202 this.syncTasksWithOptimizers = original.syncTasksWithOptimizers; 197 203 this.isFinishedTaskDownloaded = original.isFinishedTaskDownloaded; … … 242 248 try { 243 249 this.childHiveTasks.Add(hiveTask); 244 } finally { childHiveTasksLock.ExitWriteLock(); } 250 } 251 finally { childHiveTasksLock.ExitWriteLock(); } 245 252 } 246 253 … … 359 366 } 360 367 return jobs; 361 } finally { childHiveTasksLock.ExitReadLock(); } 368 } 369 finally { childHiveTasksLock.ExitReadLock(); } 362 370 } 363 371 … … 373 381 } 374 382 return null; 375 } finally { childHiveTasksLock.ExitWriteLock(); } 383 } 384 finally { childHiveTasksLock.ExitWriteLock(); } 376 385 } 377 386 … … 390 399 return result; 391 400 } 392 } finally { childHiveTasksLock.ExitReadLock(); } 401 } 402 finally { childHiveTasksLock.ExitReadLock(); } 393 403 } 394 404 return null; … … 405 415 child.RemoveByTaskId(jobId); 406 416 } 407 } finally { childHiveTasksLock.ExitWriteLock(); } 417 } 418 finally { childHiveTasksLock.ExitWriteLock(); } 408 419 } 409 420 … … 458 469 HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(child.task.Id)); 459 470 } 460 } finally { childHiveTasksLock.ExitReadLock(); } 471 } 472 finally { childHiveTasksLock.ExitReadLock(); } 461 473 } else { 462 474 HiveServiceLocator.Instance.CallHiveService(s => s.PauseTask(this.task.Id)); … … 471 483 HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(child.task.Id)); 472 484 } 473 } finally { childHiveTasksLock.ExitReadLock(); } 485 } 486 finally { childHiveTasksLock.ExitReadLock(); } 474 487 } else { 475 488 HiveServiceLocator.Instance.CallHiveService(s => s.StopTask(this.task.Id)); -
trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveItem.cs
r6976 r7201 38 38 get { return ItemAttribute.GetVersion(this.GetType()); } 39 39 } 40 public static new Image StaticItemImage { 41 get { return HeuristicLab.Common.Resources.VSImageLibrary.Database; } 42 } 40 43 public virtual Image ItemImage { 41 44 get { … … 43 46 return HeuristicLab.Common.Resources.VSImageLibrary.DatabaseModified; 44 47 else 45 return HeuristicLab.Common.Resources.VSImageLibrary.Database;48 return ItemAttribute.GetImage(this.GetType()); 46 49 } 47 50 } -
trunk/sources/HeuristicLab.Clients.Hive/3.3/Tasks/EngineTask.cs
r6976 r7201 152 152 } 153 153 154 public override ImageItemImage {154 public static new Image StaticItemImage { 155 155 get { return HeuristicLab.Common.Resources.VSImageLibrary.Operator; } 156 156 } -
trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs
r7123 r7201 142 142 else if (type.ContainsGenericParameters) typeNode.ImageIndex = 3; 143 143 else if (imageList.Images.ContainsKey(type.FullName)) typeNode.ImageIndex = imageList.Images.IndexOfKey(type.FullName); 144 else if (typeof(IItem).IsAssignableFrom(type) && !type.IsInterface && !type.IsAbstract && type.GetConstructor(Type.EmptyTypes) != null) { 145 IItem item = (IItem)Activator.CreateInstance(type); 146 imageList.Images.Add(type.FullName, item.ItemImage); 147 typeNode.ImageIndex = imageList.Images.IndexOfKey(type.FullName); 144 else { 145 var image = ItemAttribute.GetImage(type); 146 if (image != null) { 147 imageList.Images.Add(type.FullName, image); 148 typeNode.ImageIndex = imageList.Images.IndexOfKey(type.FullName); 149 } 148 150 } 149 151 typeNode.SelectedImageIndex = typeNode.ImageIndex; -
trunk/sources/HeuristicLab.Core/3.3/Attributes/ItemAttribute.cs
r5445 r7201 21 21 22 22 using System; 23 using System.Drawing; 23 24 using System.Linq; 24 25 using System.Reflection; … … 82 83 } 83 84 } 85 public static Image GetImage(Type type) { 86 var staticItemImageProperty = type.GetProperty("StaticItemImage", BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy); 87 return staticItemImageProperty == null ? null : (Image)staticItemImageProperty.GetValue(null, null); 88 } 84 89 } 85 90 } -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs
r5445 r7201 26 26 using HeuristicLab.Collections; 27 27 using HeuristicLab.Common; 28 using HeuristicLab.Common.Resources;29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 … … 42 41 get { return ItemAttribute.GetVersion(this.GetType()); } 43 42 } 43 public static Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 45 } 44 46 public virtual Image ItemImage { 45 get { return VSImageLibrary.Class; }47 get { return ItemAttribute.GetImage(this.GetType()); } 46 48 } 47 49 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemCollection.cs
r5445 r7201 26 26 using HeuristicLab.Collections; 27 27 using HeuristicLab.Common; 28 using HeuristicLab.Common.Resources;29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 … … 42 41 get { return ItemAttribute.GetVersion(this.GetType()); } 43 42 } 43 public static Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 45 } 44 46 public virtual Image ItemImage { 45 get { return VSImageLibrary.Class; }47 get { return ItemAttribute.GetImage(this.GetType()); } 46 48 } 47 49 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs
r5445 r7201 25 25 using HeuristicLab.Collections; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Common.Resources;28 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 28 … … 44 43 get { return ItemAttribute.GetVersion(this.GetType()); } 45 44 } 45 public static Image StaticItemImage { 46 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 47 } 46 48 public virtual Image ItemImage { 47 get { return VSImageLibrary.Class; }49 get { return ItemAttribute.GetImage(this.GetType()); } 48 50 } 49 51 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs
r5445 r7201 26 26 using HeuristicLab.Collections; 27 27 using HeuristicLab.Common; 28 using HeuristicLab.Common.Resources;29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 … … 42 41 get { return ItemAttribute.GetVersion(this.GetType()); } 43 42 } 43 public static Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 45 } 44 46 public virtual Image ItemImage { 45 get { return VSImageLibrary.Class; }47 get { return ItemAttribute.GetImage(this.GetType()); } 46 48 } 47 49 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs
r6525 r7201 26 26 using HeuristicLab.Collections; 27 27 using HeuristicLab.Common; 28 using HeuristicLab.Common.Resources;29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 … … 42 41 get { return ItemAttribute.GetVersion(this.GetType()); } 43 42 } 43 public static Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 45 } 44 46 public virtual Image ItemImage { 45 get { return VSImageLibrary.Class; }47 get { return ItemAttribute.GetImage(this.GetType()); } 46 48 } 47 49 -
trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs
r5445 r7201 40 40 get { return ItemAttribute.GetVersion(this.GetType()); } 41 41 } 42 public static Image StaticItemImage { 43 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 44 } 42 45 public virtual Image ItemImage { 43 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }46 get { return ItemAttribute.GetImage(this.GetType()); } 44 47 } 45 48 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 40 39 get { return ItemAttribute.GetVersion(this.GetType()); } 41 40 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 43 } 42 44 public virtual Image ItemImage { 43 get { return VSImageLibrary.Class; }45 get { return ItemAttribute.GetImage(this.GetType()); } 44 46 } 45 47 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 40 39 get { return ItemAttribute.GetVersion(this.GetType()); } 41 40 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 43 } 42 44 public virtual Image ItemImage { 43 get { return VSImageLibrary.Class; }45 get { return ItemAttribute.GetImage(this.GetType()); } 44 46 } 45 47 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 43 42 get { return ItemAttribute.GetVersion(this.GetType()); } 44 43 } 44 public static Image StaticItemImage { 45 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 46 } 45 47 public virtual Image ItemImage { 46 get { return VSImageLibrary.Class; }48 get { return ItemAttribute.GetImage(this.GetType()); } 47 49 } 48 50 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 40 39 get { return ItemAttribute.GetVersion(this.GetType()); } 41 40 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 43 } 42 44 public virtual Image ItemImage { 43 get { return VSImageLibrary.Class; }45 get { return ItemAttribute.GetImage(this.GetType()); } 44 46 } 45 47 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 40 39 get { return ItemAttribute.GetVersion(this.GetType()); } 41 40 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 43 } 42 44 public virtual Image ItemImage { 43 get { return VSImageLibrary.Class; }45 get { return ItemAttribute.GetImage(this.GetType()); } 44 46 } 45 47 -
trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs
r5445 r7201 24 24 using HeuristicLab.Collections; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Common.Resources;27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 27 … … 40 39 get { return ItemAttribute.GetVersion(this.GetType()); } 41 40 } 41 public static Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 43 } 42 44 public virtual Image ItemImage { 43 get { return VSImageLibrary.Class; }45 get { return ItemAttribute.GetImage(this.GetType()); } 44 46 } 45 47 -
trunk/sources/HeuristicLab.Core/3.3/Executable.cs
r5445 r7201 29 29 [StorableClass] 30 30 public abstract class Executable : Item, IExecutable { 31 public static new Image StaticItemImage { 32 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 33 } 31 34 public override Image ItemImage { 32 35 get { … … 35 38 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused; 36 39 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 37 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;40 else return base.ItemImage; 38 41 } 39 42 } -
trunk/sources/HeuristicLab.Core/3.3/Item.cs
r5445 r7201 41 41 get { return ItemAttribute.GetVersion(this.GetType()); } 42 42 } 43 public static Image StaticItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 45 } 43 46 public virtual Image ItemImage { 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; }47 get { return ItemAttribute.GetImage(this.GetType()); } 45 48 } 46 49 -
trunk/sources/HeuristicLab.Core/3.3/Log.cs
r6862 r7201 33 33 public string Filename { get; set; } 34 34 35 public override ImageItemImage {35 public static new Image StaticItemImage { 36 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.File; } 37 37 } -
trunk/sources/HeuristicLab.Core/3.3/Scope.cs
r5445 r7201 32 32 [StorableClass] 33 33 public sealed class Scope : NamedItem, IScope { 34 public override ImageItemImage {34 public static new Image StaticItemImage { 35 35 get { return HeuristicLab.Common.Resources.VSImageLibrary.OrgChart; } 36 36 } -
trunk/sources/HeuristicLab.Data/3.3/BoolValue.cs
r5445 r7201 31 31 [StorableClass] 32 32 public class BoolValue : ValueTypeValue<bool>, IComparable, IStringConvertibleValue { 33 public override ImageItemImage {33 public static new Image StaticItemImage { 34 34 get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; } 35 35 } -
trunk/sources/HeuristicLab.Data/3.3/Comparison.cs
r5445 r7201 30 30 [StorableClass] 31 31 public class Comparison : ValueTypeValue<ComparisonType>, IComparable { 32 public override ImageItemImage {32 public static new Image StaticItemImage { 33 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; } 34 34 } -
trunk/sources/HeuristicLab.Data/3.3/DoubleValue.cs
r5445 r7201 31 31 [StorableClass] 32 32 public class DoubleValue : ValueTypeValue<double>, IComparable, IStringConvertibleValue { 33 public override ImageItemImage {33 public static new Image StaticItemImage { 34 34 get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; } 35 35 } -
trunk/sources/HeuristicLab.Data/3.3/IntValue.cs
r5445 r7201 31 31 [StorableClass] 32 32 public class IntValue : ValueTypeValue<int>, IComparable, IStringConvertibleValue { 33 public override ImageItemImage {33 public static new Image StaticItemImage { 34 34 get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; } 35 35 } -
trunk/sources/HeuristicLab.Data/3.3/StringArray.cs
r5445 r7201 34 34 [StorableClass] 35 35 public class StringArray : Item, IEnumerable<string>, IStringConvertibleArray { 36 public override ImageItemImage {36 public static new Image StaticItemImage { 37 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 38 38 } -
trunk/sources/HeuristicLab.Data/3.3/StringConvertibleValueTuple.cs
r5809 r7201 32 32 where T : class, IDeepCloneable, IStringConvertibleValue 33 33 where U : class, IDeepCloneable, IStringConvertibleValue { 34 public override ImageItemImage {34 public static new Image StaticItemImage { 35 35 get { return HeuristicLab.Common.Resources.VSImageLibrary.ValueType; } 36 36 } -
trunk/sources/HeuristicLab.Data/3.3/StringMatrix.cs
r5445 r7201 34 34 [StorableClass] 35 35 public class StringMatrix : Item, IEnumerable<string>, IStringConvertibleMatrix { 36 public override ImageItemImage {36 public static new Image StaticItemImage { 37 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 38 38 } -
trunk/sources/HeuristicLab.Data/3.3/StringValue.cs
r5445 r7201 30 30 [StorableClass] 31 31 public class StringValue : Item, IComparable, IStringConvertibleValue { 32 public override ImageItemImage {32 public static new Image StaticItemImage { 33 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; } 34 34 } -
trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs
r5445 r7201 34 34 [StorableClass] 35 35 public abstract class ValueTypeArray<T> : Item, IEnumerable<T> where T : struct { 36 public override ImageItemImage {36 public static new Image StaticItemImage { 37 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 38 38 } -
trunk/sources/HeuristicLab.Data/3.3/ValueTypeMatrix.cs
r5445 r7201 34 34 [StorableClass] 35 35 public abstract class ValueTypeMatrix<T> : Item, IEnumerable<T> where T : struct { 36 public override ImageItemImage {36 public static new Image StaticItemImage { 37 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 38 38 } -
trunk/sources/HeuristicLab.Data/3.3/ValueTypeValue.cs
r5445 r7201 30 30 [StorableClass] 31 31 public abstract class ValueTypeValue<T> : Item where T : struct { 32 public override ImageItemImage {32 public static new Image StaticItemImage { 33 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.ValueType; } 34 34 } -
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationType.cs
r5445 r7201 30 30 [StorableClass] 31 31 public class PermutationType : ValueTypeValue<PermutationTypes> { 32 public override ImageItemImage {32 public static new Image StaticItemImage { 33 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; } 34 34 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs
r5809 r7201 31 31 [Item("SymbolicExpressionTree", "Represents a symbolic expression tree.")] 32 32 public class SymbolicExpressionTree : Item, ISymbolicExpressionTree { 33 public override ImageItemImage {33 public static new Image StaticItemImage { 34 34 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 35 35 } -
trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs
r5781 r7201 52 52 } 53 53 54 public override System.Drawing.ImageItemImage { get { return VSImageLibrary.Script; } }54 public static new System.Drawing.Image StaticItemImage { get { return VSImageLibrary.Script; } } 55 55 56 56 private MethodInfo executeMethod; … … 280 280 assemblies.Add(a, false); 281 281 } 282 } catch (NotSupportedException) { 282 } 283 catch (NotSupportedException) { 283 284 // NotSupportedException is thrown while accessing 284 285 // the Location property of the anonymously hosted -
trunk/sources/HeuristicLab.Operators/3.3/AlgorithmOperator.cs
r5445 r7201 32 32 [StorableClass] 33 33 public abstract class AlgorithmOperator : SingleSuccessorOperator { 34 public static new Image StaticItemImage { 35 get { return HeuristicLab.Common.Resources.VSImageLibrary.Module; } 36 } 34 37 public override Image ItemImage { 35 38 get { 36 39 if (Breakpoint) return HeuristicLab.Common.Resources.VSImageLibrary.BreakpointActive; 37 else return HeuristicLab.Common.Resources.VSImageLibrary.Module;40 else return base.ItemImage; 38 41 } 39 42 } -
trunk/sources/HeuristicLab.Operators/3.3/Operator.cs
r6114 r7201 34 34 [StorableClass] 35 35 public abstract class Operator : ParameterizedNamedItem, IOperator, IStatefulItem { 36 public static new Image StaticItemImage { 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; } 38 } 36 39 public override Image ItemImage { 37 40 get { 38 41 if (Breakpoint) return HeuristicLab.Common.Resources.VSImageLibrary.BreakpointActive; 39 else return HeuristicLab.Common.Resources.VSImageLibrary.Method;42 else return base.ItemImage; 40 43 } 41 44 } -
trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r6114 r7201 37 37 [StorableClass] 38 38 public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm { 39 public static new Image StaticItemImage { 40 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 41 } 39 42 public override Image ItemImage { 40 43 get { … … 43 46 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused; 44 47 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 45 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;48 else return base.ItemImage; 46 49 } 47 50 } -
trunk/sources/HeuristicLab.Optimization/3.3/BatchRun.cs
r6816 r7201 39 39 public string Filename { get; set; } 40 40 41 public static new Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 43 } 41 44 public override Image ItemImage { 42 45 get { … … 45 48 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunPaused; 46 49 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.BatchRunStopped; 47 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;50 else return base.ItemImage; 48 51 } 49 52 } -
trunk/sources/HeuristicLab.Optimization/3.3/Experiment.cs
r7197 r7201 39 39 public string Filename { get; set; } 40 40 41 public static new Image StaticItemImage { 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 43 } 41 44 public override Image ItemImage { 42 45 get { … … 45 48 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentPaused; 46 49 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExperimentStopped; 47 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;50 else return base.ItemImage; 48 51 } 49 52 } -
trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs
r6938 r7201 39 39 } 40 40 41 public override ImageItemImage {41 public static new Image StaticItemImage { 42 42 get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; } 43 43 } -
trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs
r5954 r7201 43 43 public string Filename { get; set; } 44 44 45 public override ImageItemImage {45 public static new Image StaticItemImage { 46 46 get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; } 47 47 } … … 263 263 #endregion 264 264 265 public override ImageItemImage {265 public static new Image StaticItemImage { 266 266 get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; } 267 267 } -
trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs
r6524 r7201 41 41 } 42 42 43 public override System.Drawing.ImageItemImage {43 public static new System.Drawing.Image StaticItemImage { 44 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; } 45 45 } -
trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
r5445 r7201 21 21 22 22 using System; 23 using System. Collections.Generic;23 using System.Drawing; 24 24 using System.Linq; 25 25 using System.Windows.Forms; … … 30 30 internal partial class NewItemDialog : Form { 31 31 private bool initialized; 32 private List<IItem> items;33 32 34 33 private IItem item; … … 39 38 public NewItemDialog() { 40 39 initialized = false; 41 items = new List<IItem>();42 40 item = null; 43 41 InitializeComponent(); … … 53 51 54 52 itemsListView.SmallImageList = new ImageList(); 53 itemsListView.SmallImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.Class); // default icon 55 54 foreach (var category in categories) { 56 55 ListViewGroup group = new ListViewGroup(category.Key); 57 56 itemsListView.Groups.Add(group); 58 57 foreach (var creatable in category) { 59 IItem i = (IItem)Activator.CreateInstance(creatable); 60 items.Add(i); 61 ListViewItem item = new ListViewItem(new string[] { i.ItemName, i.ItemVersion.ToString(), i.ItemDescription }, group); 62 itemsListView.SmallImageList.Images.Add(i.ItemImage); 63 item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1; 64 item.Tag = i; 58 string name = ItemAttribute.GetName(creatable); 59 string version = ItemAttribute.GetVersion(creatable).ToString(); 60 string description = ItemAttribute.GetDescription(creatable); 61 ListViewItem item = new ListViewItem(new string[] { name, version, description }, group); 62 item.ImageIndex = 0; 63 Image image = ItemAttribute.GetImage(creatable); 64 if (image != null) { 65 itemsListView.SmallImageList.Images.Add(image); 66 item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1; 67 } 68 item.Tag = creatable; 65 69 itemsListView.Items.Add(item); 66 70 } … … 82 86 private void okButton_Click(object sender, EventArgs e) { 83 87 if (itemsListView.SelectedItems.Count == 1) { 84 item = (IItem) ((IItem)itemsListView.SelectedItems[0].Tag).Clone();88 item = (IItem)Activator.CreateInstance((Type)itemsListView.SelectedItems[0].Tag); 85 89 DialogResult = DialogResult.OK; 86 90 Close(); … … 89 93 private void itemTypesListView_DoubleClick(object sender, EventArgs e) { 90 94 if (itemsListView.SelectedItems.Count == 1) { 91 item = (IItem) ((IItem)itemsListView.SelectedItems[0].Tag).Clone();95 item = (IItem)Activator.CreateInstance((Type)itemsListView.SelectedItems[0].Tag); 92 96 DialogResult = DialogResult.OK; 93 97 Close(); -
trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.4/AntTrail.cs
r5809 r7201 35 35 [StorableClass] 36 36 public sealed class AntTrail : Item { 37 public override ImageItemImage {37 public static new Image StaticItemImage { 38 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 39 39 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
r5914 r7201 32 32 [StorableClass] 33 33 public abstract class SymbolicDataAnalysisModel : NamedItem, ISymbolicDataAnalysisModel { 34 public override ImageItemImage {34 public static new Image StaticItemImage { 35 35 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 36 36 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r7037 r7201 102 102 #region properties 103 103 public string Filename { get; set; } 104 public override ImageItemImage { get { return VSImageLibrary.Type; } }104 public static new Image StaticItemImage { get { return VSImageLibrary.Type; } } 105 105 106 106 IDataAnalysisProblemData IDataAnalysisProblem.ProblemData { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs
r6653 r7201 37 37 public string Filename { get; set; } 38 38 39 public override ImageItemImage {39 public static new Image StaticItemImage { 40 40 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 41 41 } -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/EvaluationCache.cs
r6519 r7201 86 86 87 87 #region Properties 88 public override System.Drawing.ImageItemImage {88 public static new System.Drawing.Image StaticItemImage { 89 89 get { return VSImageLibrary.Database; } 90 90 } … … 220 220 index[entry] = list.AddLast(entry); 221 221 Trim(); 222 } finally { 222 } 223 finally { 223 224 if (!lockTaken) 224 225 Monitor.Enter(cacheLock, ref lockTaken); … … 233 234 } 234 235 } 235 } finally { 236 } 237 finally { 236 238 if (lockTaken) 237 239 Monitor.Exit(cacheLock); -
trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs
r6189 r7201 41 41 public string Filename { get; set; } 42 42 43 public override ImageItemImage {43 public static new Image StaticItemImage { 44 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; } 45 45 } -
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs
r5445 r7201 35 35 [StorableClass] 36 36 public class KnapsackSolution : Item { 37 public override ImageItemImage {37 public static new Image StaticItemImage { 38 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 39 39 } -
trunk/sources/HeuristicLab.Problems.OneMax/3.3/OneMaxSolution.cs
r5445 r7201 35 35 [StorableClass] 36 36 public sealed class OneMaxSolution : Item { 37 public override ImageItemImage {37 public static new Image StaticItemImage { 38 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 39 39 } -
trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
r7041 r7201 44 44 public string Filename { get; set; } 45 45 46 public override ImageItemImage {46 public static new Image StaticItemImage { 47 47 get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; } 48 48 } -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionSolution.cs
r5445 r7201 36 36 [StorableClass] 37 37 public class SingleObjectiveTestFunctionSolution : Item { 38 public override ImageItemImage {38 public static new Image StaticItemImage { 39 39 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 40 40 } -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs
r5445 r7201 35 35 [StorableClass] 36 36 public sealed class PathTSPTour : Item { 37 public override ImageItemImage {37 public static new Image StaticItemImage { 38 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 39 39 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/TourEncoding.cs
r5445 r7201 32 32 [StorableClass] 33 33 public abstract class TourEncoding : Item, IVRPEncoding { 34 public override ImageItemImage {34 public static new Image StaticItemImage { 35 35 get { return HeuristicLab.Common.Resources.VSImageLibrary.Class; } 36 36 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VRPSolution.cs
r5445 r7201 34 34 [StorableClass] 35 35 public sealed class VRPSolution : Item { 36 public override ImageItemImage {36 public static new Image StaticItemImage { 37 37 get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; } 38 38 }
Note: See TracChangeset
for help on using the changeset viewer.