Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3393


Ignore:
Timestamp:
04/18/10 03:00:00 (14 years ago)
Author:
swagner
Message:

Changed items and views according to the refactoring of HeuristicLab.Collections (#977)

Location:
trunk/sources
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemArrayView.cs

    r3362 r3393  
    3434  [View("ItemArray View")]
    3535  [Content(typeof(ItemArray<>), true)]
    36   [Content(typeof(IObservableArray<>), false)]
     36  [Content(typeof(IItemArray<>), false)]
    3737  public partial class ItemArrayView<T> : AsynchronousContentView where T : class, IItem {
    3838    /// <summary>
     
    4141    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
    4242    /// No won data storage present.</remarks>
    43     public new IObservableArray<T> Content {
    44       get { return (IObservableArray<T>)base.Content; }
     43    public new IItemArray<T> Content {
     44      get { return (IItemArray<T>)base.Content; }
    4545      set { base.Content = value; }
    4646    }
     
    5757      Caption = "Item Array";
    5858    }
    59     public ItemArrayView(IObservableArray<T> content)
     59    public ItemArrayView(IItemArray<T> content)
    6060      : this() {
    6161      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r3362 r3393  
    3131  [View("ItemCollection View")]
    3232  [Content(typeof(ItemCollection<>), true)]
    33   [Content(typeof(IObservableCollection<>), false)]
     33  [Content(typeof(IItemCollection<>), false)]
    3434  public partial class ItemCollectionView<T> : AsynchronousContentView where T : class, IItem {
    35     public new IObservableCollection<T> Content {
    36       get { return (IObservableCollection<T>)base.Content; }
     35    public new IItemCollection<T> Content {
     36      get { return (IItemCollection<T>)base.Content; }
    3737      set { base.Content = value; }
    3838    }
     
    4646      Caption = "Item Collection";
    4747    }
    48     public ItemCollectionView(IObservableCollection<T> content)
     48    public ItemCollectionView(IItemCollection<T> content)
    4949      : this() {
    5050      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r3362 r3393  
    3434  [View("ItemList View")]
    3535  [Content(typeof(ItemList<>), true)]
    36   [Content(typeof(IObservableList<>), false)]
     36  [Content(typeof(IItemList<>), false)]
    3737  public partial class ItemListView<T> : AsynchronousContentView where T : class, IItem {
    3838    /// <summary>
     
    4141    /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
    4242    /// No won data storage present.</remarks>
    43     public new IObservableList<T> Content {
    44       get { return (IObservableList<T>)base.Content; }
     43    public new IItemList<T> Content {
     44      get { return (IItemList<T>)base.Content; }
    4545      set { base.Content = value; }
    4646    }
     
    5757      Caption = "Item List";
    5858    }
    59     public ItemListView(IObservableList<T> content)
     59    public ItemListView(IItemList<T> content)
    6060      : this() {
    6161      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs

    r2917 r3393  
    2828  [View("ItemSet View")]
    2929  [Content(typeof(ItemSet<>), true)]
    30   [Content(typeof(IObservableSet<>), false)]
     30  [Content(typeof(IItemSet<>), false)]
    3131  public partial class ItemSetView<T> : ItemCollectionView<T> where T : class, IItem {
    32     public new IObservableSet<T> Content {
    33       get { return (IObservableSet<T>)base.Content; }
     32    public new IItemSet<T> Content {
     33      get { return (IItemSet<T>)base.Content; }
    3434      set { base.Content = value; }
    3535    }
     
    4545      Caption = "Item Set";
    4646    }
    47     public ItemSetView(IObservableSet<T> content)
     47    public ItemSetView(IItemSet<T> content)
    4848      : this() {
    4949      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.cs

    r3362 r3393  
    2929  [Content(typeof(NamedItemCollection<>), true)]
    3030  public partial class NamedItemCollectionView<T> : ItemCollectionView<T> where T : class, INamedItem {
    31     public new IObservableKeyedCollection<string, T> Content {
    32       get { return (IObservableKeyedCollection<string, T>)base.Content; }
     31    public new IKeyedItemCollection<string, T> Content {
     32      get { return (IKeyedItemCollection<string, T>)base.Content; }
    3333      set { base.Content = value; }
    3434    }
     
    4444      Caption = "Named Item Collection";
    4545    }
    46     public NamedItemCollectionView(IObservableKeyedCollection<string, T> content)
     46    public NamedItemCollectionView(IKeyedItemCollection<string, T> content)
    4747      : this() {
    4848      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs

    r2924 r3393  
    66  [View("OperatorCollection View")]
    77  [Content(typeof(OperatorCollection), true)]
    8   [Content(typeof(IObservableCollection<IOperator>), false)]
     8  [Content(typeof(IItemCollection<IOperator>), false)]
    99  public partial class OperatorCollectionView : ItemCollectionView<IOperator> {
    1010    protected TypeSelectorDialog typeSelectorDialog;
     
    2424    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    2525    /// <param name="scope">The scope whose variables should be represented visually.</param>
    26     public OperatorCollectionView(IObservableCollection<IOperator> content)
     26    public OperatorCollectionView(IItemCollection<IOperator> content)
    2727      : this() {
    2828      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs

    r3274 r3393  
    2727  [View("OperatorList View")]
    2828  [Content(typeof(OperatorList), true)]
    29   [Content(typeof(IObservableList<IOperator>), false)]
     29  [Content(typeof(IItemList<IOperator>), false)]
    3030  public partial class OperatorListView : ItemListView<IOperator> {
    3131    protected TypeSelectorDialog typeSelectorDialog;
     
    4545    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    4646    /// <param name="scope">The scope whose variables should be represented visually.</param>
    47     public OperatorListView(IObservableList<IOperator> content)
     47    public OperatorListView(IItemList<IOperator> content)
    4848      : this() {
    4949      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs

    r2924 r3393  
    66  [View("OperatorSet View")]
    77  [Content(typeof(OperatorSet), true)]
    8   [Content(typeof(IObservableSet<IOperator>), false)]
     8  [Content(typeof(IItemSet<IOperator>), false)]
    99  public partial class OperatorSetView : ItemSetView<IOperator> {
    1010    protected TypeSelectorDialog typeSelectorDialog;
     
    2424    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    2525    /// <param name="scope">The scope whose variables should be represented visually.</param>
    26     public OperatorSetView(IObservableSet<IOperator> content)
     26    public OperatorSetView(IItemSet<IOperator> content)
    2727      : this() {
    2828      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs

    r3362 r3393  
    3737    private Dictionary<IValueParameter<IOperator>, List<TreeNode>> opParamNodeTable;
    3838    private Dictionary<IOperator, List<TreeNode>> operatorNodeTable;
    39     private Dictionary<IObservableKeyedCollection<string, IParameter>, IOperator> parametersOperatorTable;
     39    private Dictionary<IKeyedItemCollection<string, IParameter>, IOperator> parametersOperatorTable;
    4040
    4141    /// <summary>
     
    6868      opParamNodeTable = new Dictionary<IValueParameter<IOperator>, List<TreeNode>>();
    6969      operatorNodeTable = new Dictionary<IOperator, List<TreeNode>>();
    70       parametersOperatorTable = new Dictionary<IObservableKeyedCollection<string, IParameter>, IOperator>();
     70      parametersOperatorTable = new Dictionary<IKeyedItemCollection<string, IParameter>, IOperator>();
    7171      Caption = "Operator";
    7272    }
     
    291291        Invoke(new CollectionItemsChangedEventHandler<IParameter>(Parameters_ItemsAdded), sender, e);
    292292      else {
    293         IObservableKeyedCollection<string, IParameter> coll = (IObservableKeyedCollection<string, IParameter>)sender;
     293        IKeyedItemCollection<string, IParameter> coll = (IKeyedItemCollection<string, IParameter>)sender;
    294294        IOperator op = parametersOperatorTable[coll];
    295295        AddParameterNodes(op, e.Items);
     
    307307      else {
    308308        RemoveParameterNodes(e.Items);
    309         IObservableKeyedCollection<string, IParameter> coll = (IObservableKeyedCollection<string, IParameter>)sender;
     309        IKeyedItemCollection<string, IParameter> coll = (IKeyedItemCollection<string, IParameter>)sender;
    310310        IOperator op = parametersOperatorTable[coll];
    311311        AddParameterNodes(op, e.Items);
     
    317317      else {
    318318        RemoveParameterNodes(e.Items);
    319         IObservableKeyedCollection<string, IParameter> coll = (IObservableKeyedCollection<string, IParameter>)sender;
     319        IKeyedItemCollection<string, IParameter> coll = (IKeyedItemCollection<string, IParameter>)sender;
    320320        IOperator op = parametersOperatorTable[coll];
    321321        AddParameterNodes(op, e.Items);
  • trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs

    r2924 r3393  
    2828  [View("ParameterCollection View")]
    2929  [Content(typeof(ParameterCollection), true)]
    30   [Content(typeof(IObservableKeyedCollection<string, IParameter>), false)]
     30  [Content(typeof(IKeyedItemCollection<string, IParameter>), false)]
    3131  public partial class ParameterCollectionView : NamedItemCollectionView<IParameter> {
    3232    protected CreateParameterDialog createParameterDialog;
     
    4545    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    4646    /// <param name="scope">The scope whose variables should be represented visually.</param>
    47     public ParameterCollectionView(IObservableKeyedCollection<string, IParameter> content)
     47    public ParameterCollectionView(IKeyedItemCollection<string, IParameter> content)
    4848      : this() {
    4949      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ScopeListView.cs

    r2924 r3393  
    55  [View("ScopeList View")]
    66  [Content(typeof(ScopeList), true)]
    7   [Content(typeof(IObservableList<IScope>), false)]
     7  [Content(typeof(IItemList<IScope>), false)]
    88  public partial class ScopeListView : ItemListView<IScope> {
    99    /// <summary>
     
    2121    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    2222    /// <param name="scope">The scope whose variables should be represented visually.</param>
    23     public ScopeListView(IObservableList<IScope> content)
     23    public ScopeListView(IItemList<IScope> content)
    2424      : this() {
    2525      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/ValueParameterCollectionView.cs

    r2924 r3393  
    2828  [View("ValueParameterCollection View")]
    2929  [Content(typeof(ValueParameterCollection), true)]
    30   [Content(typeof(IObservableKeyedCollection<string, IValueParameter>), false)]
     30  [Content(typeof(IKeyedItemCollection<string, IValueParameter>), false)]
    3131  public partial class ValueParameterCollectionView : NamedItemCollectionView<IValueParameter> {
    3232    protected CreateParameterDialog createParameterDialog;
     
    4545    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    4646    /// <param name="scope">The scope whose variables should be represented visually.</param>
    47     public ValueParameterCollectionView(IObservableKeyedCollection<string, IValueParameter> content)
     47    public ValueParameterCollectionView(IKeyedItemCollection<string, IValueParameter> content)
    4848      : this() {
    4949      Content = content;
  • trunk/sources/HeuristicLab.Core.Views/3.3/VariableCollectionView.cs

    r2924 r3393  
    55  [View("VariableCollection View")]
    66  [Content(typeof(VariableCollection), true)]
    7   [Content(typeof(IObservableKeyedCollection<string, IVariable>), false)]
     7  [Content(typeof(IKeyedItemCollection<string, IVariable>), false)]
    88  public partial class VariableCollectionView : NamedItemCollectionView<IVariable> {
    99    /// <summary>
     
    2121    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    2222    /// <param name="scope">The scope whose variables should be represented visually.</param>
    23     public VariableCollectionView(IObservableKeyedCollection<string, IVariable> content)
     23    public VariableCollectionView(IKeyedItemCollection<string, IVariable> content)
    2424      : this() {
    2525      Content = content;
  • trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs

    r3385 r3393  
    3737    }
    3838
    39     public IObservableKeyedCollection<string, IParameter> Parameters {
     39    public IKeyedItemCollection<string, IParameter> Parameters {
    4040      get { return parameterizedItem.Parameters; }
    4141    }
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs

    r3376 r3393  
    2929  public interface IExecutionContext : IDeepCloneable {
    3030    IExecutionContext Parent { get; }
    31     IObservableKeyedCollection<string, IParameter> Parameters { get; }
     31    IKeyedItemCollection<string, IParameter> Parameters { get; }
    3232    IScope Scope { get; }
    3333
  • trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs

    r3260 r3393  
    2828  /// </summary>
    2929  public interface IParameterizedItem : IItem {
    30     IObservableKeyedCollection<string, IParameter> Parameters { get; }
     30    IKeyedItemCollection<string, IParameter> Parameters { get; }
    3131
    3232    void CollectParameterValues(IDictionary<string, IItem> values);
  • trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs

    r3376 r3393  
    3838      get { return parameters; }
    3939    }
    40     private ReadOnlyObservableKeyedCollection<string, IParameter> readOnlyParameters;
    41     IObservableKeyedCollection<string, IParameter> IParameterizedItem.Parameters {
     40    private ReadOnlyKeyedItemCollection<string, IParameter> readOnlyParameters;
     41    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
    4242      get {
    4343        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs

    r3386 r3393  
    3636    [Storable]
    3737    private BidirectionalLookup<IOperator, IOperatorShapeInfo> operatorShapeInfoMapping;
    38     private BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>> operatorParameterCollectionMapping;
     38    private BidirectionalLookup<IOperator, IKeyedItemCollection<string, IParameter>> operatorParameterCollectionMapping;
    3939    private Dictionary<IParameter, IOperator> parameterOperatorMapping;
    4040
     
    4242      : base() {
    4343      this.operatorShapeInfoMapping = new BidirectionalLookup<IOperator, IOperatorShapeInfo>();
    44       this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>>();
     44      this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IKeyedItemCollection<string, IParameter>>();
    4545      this.parameterOperatorMapping = new Dictionary<IParameter, IOperator>();
    4646    }
     
    4949    private OperatorGraphVisualizationInfo(bool deserializing)
    5050      : base() {
    51       this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IObservableKeyedCollection<string, IParameter>>();
     51      this.operatorParameterCollectionMapping = new BidirectionalLookup<IOperator, IKeyedItemCollection<string, IParameter>>();
    5252      this.parameterOperatorMapping = new Dictionary<IParameter, IOperator>();
    5353    }
     
    367367
    368368    private void Parameters_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
    369       IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
     369      IKeyedItemCollection<string, IParameter> parameterCollection = sender as IKeyedItemCollection<string, IParameter>;
    370370      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
    371371      foreach (IParameter param in e.Items)
     
    374374    }
    375375    private void Parameters_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
    376       IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
     376      IKeyedItemCollection<string, IParameter> parameterCollection = sender as IKeyedItemCollection<string, IParameter>;
    377377      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
    378378      foreach (IParameter param in e.Items)
     
    381381    }
    382382    private void Parameters_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
    383       IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
     383      IKeyedItemCollection<string, IParameter> parameterCollection = sender as IKeyedItemCollection<string, IParameter>;
    384384      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
    385385      foreach (IParameter param in e.OldItems)
     
    390390    }
    391391    private void Parameters_CollectionReset(object sender, CollectionItemsChangedEventArgs<IParameter> e) {
    392       IObservableKeyedCollection<string, IParameter> parameterCollection = sender as IObservableKeyedCollection<string, IParameter>;
     392      IKeyedItemCollection<string, IParameter> parameterCollection = sender as IKeyedItemCollection<string, IParameter>;
    393393      IOperator op = this.operatorParameterCollectionMapping.GetBySecond(parameterCollection);
    394394      foreach (IParameter param in e.OldItems)
  • trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs

    r3376 r3393  
    3838      get { return base.Parameters; }
    3939    }
    40     IObservableKeyedCollection<string, IParameter> IParameterizedItem.Parameters {
     40    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
    4141      get { return Parameters; }
    4242    }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.cs

    r3274 r3393  
    2222using System.Windows.Forms;
    2323using HeuristicLab.Collections;
     24using HeuristicLab.Core;
    2425using HeuristicLab.Core.Views;
    2526using HeuristicLab.MainForm;
     
    2829  [View("OptimizerList View")]
    2930  [Content(typeof(OptimizerList), true)]
    30   [Content(typeof(IObservableList<IOptimizer>), false)]
     31  [Content(typeof(IItemList<IOptimizer>), false)]
    3132  public partial class OptimizerListView : ItemListView<IOptimizer> {
    3233    protected TypeSelectorDialog typeSelectorDialog;
     
    4647    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    4748    /// <param name="scope">The scope whose variables should be represented visually.</param>
    48     public OptimizerListView(IObservableList<IOptimizer> content)
     49    public OptimizerListView(IItemList<IOptimizer> content)
    4950      : this() {
    5051      Content = content;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs

    r3376 r3393  
    2929  [View("ResultCollection View")]
    3030  [Content(typeof(ResultCollection), true)]
    31   [Content(typeof(IObservableKeyedCollection<string, IResult>), false)]
     31  [Content(typeof(IKeyedItemCollection<string, IResult>), false)]
    3232  public partial class ResultCollectionView : NamedItemCollectionView<IResult> {
    3333    public override bool ReadOnly {
     
    5050    /// <remarks>Calls <see cref="VariablesScopeView()"/>.</remarks>
    5151    /// <param name="scope">The scope whose variables should be represented visually.</param>
    52     public ResultCollectionView(IObservableKeyedCollection<string, IResult> content)
     52    public ResultCollectionView(IKeyedItemCollection<string, IResult> content)
    5353      : this() {
    5454      Content = content;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r3367 r3393  
    2121
    2222using HeuristicLab.Collections;
     23using HeuristicLab.Core;
    2324using HeuristicLab.Core.Views;
    2425using HeuristicLab.MainForm;
     
    3132  [View("RunCollection View")]
    3233  [Content(typeof(RunCollection), true)]
    33   [Content(typeof(IObservableCollection<IRun>), false)]
     34  [Content(typeof(IItemCollection<IRun>), false)]
    3435  public partial class RunCollectionView : AsynchronousContentView {
    35     public new IObservableCollection<IRun> Content {
    36       get { return (IObservableCollection<IRun>)base.Content; }
     36    public new IItemCollection<IRun> Content {
     37      get { return (IItemCollection<IRun>)base.Content; }
    3738      set { base.Content = value; }
    3839    }
     
    4748    }
    4849
    49     public RunCollectionView(IObservableCollection<IRun> content)
     50    public RunCollectionView(IItemCollection<IRun> content)
    5051      : this() {
    5152      Content = content;
  • trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs

    r3376 r3393  
    3737      get { return base.Parameters; }
    3838    }
    39     IObservableKeyedCollection<string, IParameter> IParameterizedItem.Parameters {
     39    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
    4040      get { return Parameters; }
    4141    }
Note: See TracChangeset for help on using the changeset viewer.