Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10970


Ignore:
Timestamp:
06/11/14 11:12:58 (10 years ago)
Author:
rstoll
Message:
  • disabled manipulation if a filter is active
  • Reordered code ManipulationContent
Location:
branches/DataPreprocessing
Files:
4 edited

Legend:

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

    r10969 r10970  
    2626using HeuristicLab.Core.Views;
    2727using HeuristicLab.MainForm;
    28 using HeuristicLab.DataPreprocessing;
    29 using HeuristicLab.Problems.DataAnalysis;
    3028
    3129namespace HeuristicLab.DataPreprocessing.Views {
     
    5452        //var correlationMatrixLogic = new ChartLogic(data);
    5553        var filterLogic = new FilterLogic(data);
    56        
     54
    5755        //var dataCompletenessLogic = new ChartLogic(data);
    5856
     
    6866         
    6967          new FilterContent(filterLogic),
    70           new ManipulationContent(manipulationLogic, searchLogic, dataGridLogic),
     68          new ManipulationContent(manipulationLogic, searchLogic, dataGridLogic, filterLogic),
    7169          new TransformationContent(data)
    7270        };
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs

    r10905 r10970  
    5353      this.tabsPreview = new System.Windows.Forms.TabControl();
    5454      this.tabPreviewInactive = new System.Windows.Forms.TabPage();
     55      this.lblPreviewInActive = new System.Windows.Forms.Label();
    5556      this.tabPreviewDeleteColumnsInfo = new System.Windows.Forms.TabPage();
    5657      this.lblPreviewColumnsInfo = new System.Windows.Forms.Label();
     
    7576      this.grpBoxPreview.SuspendLayout();
    7677      this.tabsPreview.SuspendLayout();
     78      this.tabPreviewInactive.SuspendLayout();
    7779      this.tabPreviewDeleteColumnsInfo.SuspendLayout();
    7880      this.tabPreviewDeleteColumnsVariance.SuspendLayout();
     
    8486      // lstMethods
    8587      //
    86       this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     88      this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    8789            | System.Windows.Forms.AnchorStyles.Right)));
    8890      this.lstMethods.FormattingEnabled = true;
     
    114116      // grpBoxData
    115117      //
    116       this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     118      this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    117119            | System.Windows.Forms.AnchorStyles.Right)));
    118120      this.grpBoxData.Controls.Add(this.tabsData);
     
    126128      // tabsData
    127129      //
    128       this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     130      this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    129131            | System.Windows.Forms.AnchorStyles.Right)));
    130132      this.tabsData.Controls.Add(this.tabPage1);
     
    369371      // grpBoxPreview
    370372      //
    371       this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    372             | System.Windows.Forms.AnchorStyles.Left)
     373      this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     374            | System.Windows.Forms.AnchorStyles.Left) 
    373375            | System.Windows.Forms.AnchorStyles.Right)));
    374376      this.grpBoxPreview.Controls.Add(this.tabsPreview);
     
    382384      // tabsPreview
    383385      //
    384       this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     386      this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    385387            | System.Windows.Forms.AnchorStyles.Right)));
    386388      this.tabsPreview.Controls.Add(this.tabPreviewInactive);
     
    399401      // tabPreviewInactive
    400402      //
     403      this.tabPreviewInactive.Controls.Add(this.lblPreviewInActive);
    401404      this.tabPreviewInactive.Location = new System.Drawing.Point(4, 22);
    402405      this.tabPreviewInactive.Name = "tabPreviewInactive";
     
    406409      this.tabPreviewInactive.Text = "inactive";
    407410      this.tabPreviewInactive.UseVisualStyleBackColor = true;
     411      //
     412      // lblPreviewInActive
     413      //
     414      this.lblPreviewInActive.AutoSize = true;
     415      this.lblPreviewInActive.Location = new System.Drawing.Point(3, 3);
     416      this.lblPreviewInActive.Name = "lblPreviewInActive";
     417      this.lblPreviewInActive.Size = new System.Drawing.Size(361, 39);
     418      this.lblPreviewInActive.TabIndex = 2;
     419      this.lblPreviewInActive.Text = "Filters are active and thus manipulations cannot be applied!\r\n\r\nPlease deactive t" +
     420    "he filter(s) first in order to be able to perform manipulations.";
    408421      //
    409422      // tabPreviewDeleteColumnsInfo
     
    549562      this.grpBoxPreview.ResumeLayout(false);
    550563      this.tabsPreview.ResumeLayout(false);
     564      this.tabPreviewInactive.ResumeLayout(false);
     565      this.tabPreviewInactive.PerformLayout();
    551566      this.tabPreviewDeleteColumnsInfo.ResumeLayout(false);
    552567      this.tabPreviewDeleteColumnsInfo.PerformLayout();
     
    606621    private System.Windows.Forms.ComboBox cmbVariableNames;
    607622    private System.Windows.Forms.Label label8;
     623    private System.Windows.Forms.Label lblPreviewInActive;
    608624  }
    609625}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r10905 r10970  
    4545      tabsPreview.ItemSize = new Size(0, 1);
    4646      tabsPreview.SizeMode = TabSizeMode.Fixed;
     47      lblPreviewInActive.Visible = false;
    4748
    4849      validators = new Action[] {
     
    7273        }
    7374        cmbVariableNames.SelectedIndex = 0;
     75        checkFilters();
    7476      }
    7577    }
     
    7880      base.RegisterContentEvents();
    7981      Content.ManipulationLogic.Changed += Content_Changed;
     82      Content.FilterLogic.FilterChanged += FilterLogic_FilterChanged;
    8083    }
    8184
     
    8386      base.DeregisterContentEvents();
    8487      Content.ManipulationLogic.Changed -= Content_Changed;
     88      Content.FilterLogic.FilterChanged -= FilterLogic_FilterChanged;
     89    }
     90
     91    private void FilterLogic_FilterChanged(object sender, EventArgs e) {
     92      if (Content != null) {
     93        checkFilters();
     94      }
     95    }
     96
     97    private void checkFilters() {
     98      if (Content.FilterLogic.IsFiltered) {
     99        tabsPreview.SelectedIndex = 0;
     100        lstMethods.Enabled = false;
     101        tabsData.Enabled = false;
     102        tabsPreview.Enabled = false;
     103        lblPreviewInActive.Visible = true;
     104        btnApply.Enabled = false;
     105      } else {
     106        lblPreviewInActive.Visible = false;
     107        tabsData.Enabled = true;
     108        tabsPreview.Enabled = true;
     109        lstMethods.Enabled = true;
     110        lstMethods_SelectedIndexChanged(null, null);
     111      }
    85112    }
    86113
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationContent.cs

    r10905 r10970  
    3232    private ISearchLogic searchLogic;
    3333    private IDataGridLogic dataGridLogic;
     34    private IFilterLogic filterLogic;
    3435
    35     public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic, IDataGridLogic theDataGridLogic) {
     36    public IManipulationLogic ManipulationLogic { get { return manipulationLogic; } }
     37    public ISearchLogic SearchLogic { get { return searchLogic; } }
     38    public IDataGridLogic DataGridLogic { get { return dataGridLogic; } }
     39    public IFilterLogic FilterLogic { get { return filterLogic; } }
     40
     41    public static new Image StaticItemImage {
     42      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
     43    }
     44
     45    public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic, IDataGridLogic theDataGridLogic, IFilterLogic theFitlerLogic) {
    3646      manipulationLogic = theManipulationLogic;
    3747      searchLogic = theSearchLogic;
    3848      dataGridLogic = theDataGridLogic;
     49      filterLogic = theFitlerLogic;
    3950    }
    4051
     
    4556    }
    4657
    47     public IManipulationLogic ManipulationLogic {
    48       get {
    49         return manipulationLogic;
    50       }
    51     }
    5258
    53     public ISearchLogic SearchLogic {
    54       get {
    55         return searchLogic;
    56       }
    57     }
    58 
    59     public IDataGridLogic DataGridLogic {
    60       get {
    61         return dataGridLogic;
    62       }
    63     }
    64 
    65     public static new Image StaticItemImage {
    66       get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    67     }
    6859  }
    6960}
Note: See TracChangeset for help on using the changeset viewer.