Changeset 10930
- Timestamp:
- 06/04/14 10:51:34 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r10916 r10930 102 102 } 103 103 104 void FilterLogic_FilterChanged(object sender, EventArgs e) {105 OnContentChanged();106 searchIterator = null;107 }108 109 104 protected override void DeregisterContentEvents() { 110 105 base.DeregisterContentEvents(); 111 106 Content.Changed -= Content_Changed; 112 107 Content.FilterLogic.FilterChanged -= FilterLogic_FilterChanged; 108 } 109 110 void FilterLogic_FilterChanged(object sender, EventArgs e) { 111 OnContentChanged(); 112 searchIterator = null; 113 if (findAndReplaceDialog != null && !findAndReplaceDialog.IsDisposed) { 114 if (Content.FilterLogic.IsFiltered) { 115 findAndReplaceDialog.DisableReplace(); 116 } else { 117 findAndReplaceDialog.EnableReplace(); 118 } 119 } 120 btnReplace.Enabled = !Content.FilterLogic.IsFiltered; 113 121 } 114 122 … … 132 140 string errorMessage; 133 141 if (Content != null) { 134 if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered ()) {142 if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered) { 135 143 errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode."; 136 144 } else { … … 191 199 searchIterator = null; 192 200 DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace; 201 if (Content.FilterLogic.IsFiltered) { 202 findAndReplaceDialog.DisableReplace(); 203 } 193 204 } 194 205 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs
r10870 r10930 27 27 this.tabSearch = new System.Windows.Forms.TabPage(); 28 28 this.tabReplace = new System.Windows.Forms.TabPage(); 29 this.cmbComparisonOperator = new System.Windows.Forms.ComboBox(); 29 30 this.txtSearchString = new System.Windows.Forms.TextBox(); 30 31 this.lblSearch = new System.Windows.Forms.Label(); … … 37 38 this.txtValue = new System.Windows.Forms.TextBox(); 38 39 this.label1 = new System.Windows.Forms.Label(); 39 this.cmbComparisonOperator = new System.Windows.Forms.ComboBox();40 40 this.tabSearchReplace.SuspendLayout(); 41 41 this.tabReplace.SuspendLayout(); … … 87 87 this.tabReplace.UseVisualStyleBackColor = true; 88 88 // 89 // cmbComparisonOperator 90 // 91 this.cmbComparisonOperator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 92 this.cmbComparisonOperator.FormattingEnabled = true; 93 this.cmbComparisonOperator.Location = new System.Drawing.Point(103, 19); 94 this.cmbComparisonOperator.Name = "cmbComparisonOperator"; 95 this.cmbComparisonOperator.Size = new System.Drawing.Size(45, 21); 96 this.cmbComparisonOperator.TabIndex = 24; 97 // 89 98 // txtSearchString 90 99 // … … 173 182 this.label1.TabIndex = 14; 174 183 this.label1.Text = "Replace with"; 175 //176 // cmbComparisonOperator177 //178 this.cmbComparisonOperator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;179 this.cmbComparisonOperator.FormattingEnabled = true;180 this.cmbComparisonOperator.Location = new System.Drawing.Point(103, 19);181 this.cmbComparisonOperator.Name = "cmbComparisonOperator";182 this.cmbComparisonOperator.Size = new System.Drawing.Size(45, 21);183 this.cmbComparisonOperator.TabIndex = 24;184 184 // 185 185 // SearchAndReplaceDialog -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs
r10870 r10930 1 1 using System; 2 using System.Collections.Generic;3 2 using System.Windows.Forms; 4 3 … … 22 21 } 23 22 23 24 24 25 public partial class SearchAndReplaceDialog : Form { 25 26 private string[] cmbItemsText = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" }; … … 42 43 tabSearchReplace.SelectTab(tabReplace); 43 44 AddControlsToCurrentTab(); 45 } 46 47 public void DisableReplace() { 48 tabSearchReplace.SelectTab(tabSearch); 49 tabReplace.Enabled = false; 50 } 51 52 public void EnableReplace() { 53 tabReplace.Enabled = true; 44 54 } 45 55 … … 97 107 remove { btnReplace.Click -= value; } 98 108 } 99 100 109 } 101 110 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/FilterLogic.cs
r10908 r10930 82 82 } 83 83 84 public bool IsFiltered() { 85 return preprocessingData.IsFiltered; 84 public bool IsFiltered { 85 get { 86 return preprocessingData.IsFiltered; 87 } 86 88 } 87 89 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Interfaces/IFilterLogic.cs
r10900 r10930 36 36 IPreprocessingData PreprocessingData { get; } 37 37 void Reset(); 38 bool IsFiltered ();38 bool IsFiltered { get; } 39 39 40 40 event EventHandler FilterChanged;
Note: See TracChangeset
for help on using the changeset viewer.