Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10902


Ignore:
Timestamp:
05/28/14 14:12:29 (8 years ago)
Author:
pfleck
Message:
  • Removed sorting of ItemCollectionView and used ItemListView instead.
Location:
branches/DataPreprocessing
Files:
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r10899 r10902  
    5757      get { return itemsListView; }
    5858    }
    59 
    60     private SortOrder sorting = SortOrder.Ascending;
    61     public SortOrder Sorting {
    62       get { return sorting; }
    63       set { sorting = value; }
    64     }
    65 
    6659    public ItemCollectionView() {
    6760      InitializeComponent();
     
    112105          AddListViewItem(CreateListViewItem(item));
    113106        AdjustListViewColumnSizes();
    114         if (Sorting != SortOrder.None)
    115           SortItemsListView(Sorting);
     107        SortItemsListView(SortOrder.Ascending);
    116108      }
    117109    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/CheckedTransformationListView.Designer.cs

    r10901 r10902  
    2121
    2222namespace HeuristicLab.DataPreprocessing.Views {
    23   partial class CheckedTransformationCollectionView {
     23  partial class CheckedTransformationListView {
    2424    /// <summary>
    2525    /// Required designer variable.
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/CheckedTransformationListView.cs

    r10900 r10902  
    3131
    3232namespace HeuristicLab.DataPreprocessing.Views {
    33   [View("CheckedTransformationCollection View")]
     33  [View("CheckedTransformationList View")]
    3434  //[Content(typeof(RunCollectionConstraintCollection), true)]
    35   [Content(typeof(ICheckedItemCollection<ITransformation>), false)]
    36   public partial class CheckedTransformationCollectionView : CheckedItemCollectionView<ITransformation> {
     35  [Content(typeof(ICheckedItemList<ITransformation>), false)]
     36  public partial class CheckedTransformationListView : CheckedItemListView<ITransformation> {
    3737
    38     public CheckedTransformationCollectionView() {
     38    public CheckedTransformationListView() {
    3939      InitializeComponent();
    4040      itemsGroupBox.Text = "Transformations";
    41       Sorting = SortOrder.None;
    4241    }
    4342
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj

    r10882 r10902  
    7070      <DependentUpon>CheckedFilterCollectionView.cs</DependentUpon>
    7171    </Compile>
    72     <Compile Include="CheckedTransformationCollectionView.cs">
    73       <SubType>UserControl</SubType>
    74     </Compile>
    75     <Compile Include="CheckedTransformationCollectionView.Designer.cs">
    76       <DependentUpon>CheckedTransformationCollectionView.cs</DependentUpon>
     72    <Compile Include="CheckedTransformationListView.cs">
     73      <SubType>UserControl</SubType>
     74    </Compile>
     75    <Compile Include="CheckedTransformationListView.Designer.cs">
     76      <DependentUpon>CheckedTransformationListView.cs</DependentUpon>
    7777    </Compile>
    7878    <Compile Include="ComparisonFilterView.cs">
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/TransformationView.Designer.cs

    r10786 r10902  
    4747    /// </summary>
    4848    private void InitializeComponent() {
    49       this.transformationCollectionView = new HeuristicLab.DataPreprocessing.Views.CheckedTransformationCollectionView();
     49      this.transformationListView = new HeuristicLab.DataPreprocessing.Views.CheckedTransformationListView();
    5050      this.applyButton = new System.Windows.Forms.Button();
    5151      this.SuspendLayout();
    5252      //
    53       // transformationCollectionView
     53      // transformationListView
    5454      //
    55       this.transformationCollectionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    56             | System.Windows.Forms.AnchorStyles.Left) 
     55      this.transformationListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     56            | System.Windows.Forms.AnchorStyles.Left)
    5757            | System.Windows.Forms.AnchorStyles.Right)));
    58       this.transformationCollectionView.Caption = "Transformations";
    59       this.transformationCollectionView.Content = null;
    60       this.transformationCollectionView.Location = new System.Drawing.Point(0, 0);
    61       this.transformationCollectionView.Name = "transformationCollectionView";
    62       this.transformationCollectionView.ReadOnly = false;
    63       this.transformationCollectionView.ShowDetails = true;
    64       this.transformationCollectionView.Size = new System.Drawing.Size(627, 482);
    65       this.transformationCollectionView.TabIndex = 0;
     58      this.transformationListView.Caption = "Transformations";
     59      this.transformationListView.Content = null;
     60      this.transformationListView.Location = new System.Drawing.Point(0, 0);
     61      this.transformationListView.Name = "transformationListView";
     62      this.transformationListView.ReadOnly = false;
     63      this.transformationListView.Size = new System.Drawing.Size(627, 482);
     64      this.transformationListView.TabIndex = 0;
    6665      //
    6766      // applyButton
     
    8180      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    8281      this.Controls.Add(this.applyButton);
    83       this.Controls.Add(this.transformationCollectionView);
     82      this.Controls.Add(this.transformationListView);
    8483      this.Name = "TransformationView";
    8584      this.Size = new System.Drawing.Size(627, 514);
     
    8988
    9089    #endregion
    91     private CheckedTransformationCollectionView transformationCollectionView;
     90    private CheckedTransformationListView transformationListView;
    9291    private System.Windows.Forms.Button applyButton;
    9392  }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/TransformationView.cs

    r10819 r10902  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Windows.Forms;
    2425using HeuristicLab.MainForm;
     
    4344      base.OnContentChanged();
    4445      if (Content == null) {
    45         transformationCollectionView.Content = null;
     46        transformationListView.Content = null;
    4647      } else {
    47         transformationCollectionView.Content = Content.CheckedTransformationCollection;
     48        transformationListView.Content = Content.CheckedTransformationList;
    4849      }
    4950    }
    5051
    5152    private void applyButton_Click(object sender, EventArgs e) {
    52       var transformations = Content.CheckedTransformationCollection.CheckedItems;
     53      var transformations = Content.CheckedTransformationList.CheckedItems.Select(x => x.Value);
    5354
    5455      var transformator = new PreprocessingTransformator(Content.Data);
     
    5657      bool success = transformator.ApplyTransformations(transformations, out errorMsg);
    5758      if (success) {
    58         Content.CheckedTransformationCollection.Clear();
     59        Content.CheckedTransformationList.Clear();
    5960        MessageBox.Show(this, "Transformations applied.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
    6061      } else {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/TransformationContent.cs

    r10814 r10902  
    3131    public IPreprocessingData Data { get; private set; }
    3232
    33     public ICheckedItemCollection<ITransformation> CheckedTransformationCollection { get; private set; }
     33    public ICheckedItemList<ITransformation> CheckedTransformationList { get; private set; }
    3434
    3535    public TransformationContent(IPreprocessingData data) {
    3636      Data = data;
    37       CheckedTransformationCollection = new CheckedItemCollection<ITransformation>();
     37      CheckedTransformationList = new CheckedItemList<ITransformation>();
    3838    }
    3939
     
    4141      : base(original, cloner) {
    4242      Data = original.Data;
    43       CheckedTransformationCollection = new CheckedItemCollection<ITransformation>(original.CheckedTransformationCollection);
     43      CheckedTransformationList = new CheckedItemList<ITransformation>(original.CheckedTransformationList);
    4444    }
    4545
Note: See TracChangeset for help on using the changeset viewer.