Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/11/14 12:35:14 (10 years ago)
Author:
rstoll
Message:
  • Simplified DataGridContent - using a private set in the property instead of private fields
  • Disabled transformation if filter is active
  • Code Fromatted
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.cs

    r10948 r10977  
    4848      } else {
    4949        transformationListView.Content = Content.CheckedTransformationList;
     50        CheckFilters();
     51      }
     52    }
     53
     54    /// <summary>
     55    /// Adds eventhandlers to the current instance.
     56    /// </summary>
     57    protected override void RegisterContentEvents() {
     58      Content.FilterLogic.FilterChanged += FilterLogic_FilterChanged;
     59    }
     60
     61    /// <summary>
     62    /// Removes the eventhandlers from the current instance.
     63    /// </summary>
     64    protected override void DeregisterContentEvents() {
     65      Content.FilterLogic.FilterChanged -= FilterLogic_FilterChanged;
     66    }
     67
     68    void FilterLogic_FilterChanged(object sender, EventArgs e) {
     69      if (Content != null) {
     70        CheckFilters();
     71      }
     72    }
     73
     74    private void CheckFilters() {
     75      if (Content.FilterLogic.IsFiltered) {
     76        applyButton.Enabled = false;
     77        lblFilterNotice.Visible = true;
     78      } else {
     79        applyButton.Enabled = true;
     80        lblFilterNotice.Visible = false;
    5081      }
    5182    }
Note: See TracChangeset for help on using the changeset viewer.