Changeset 10696
- Timestamp:
- 04/02/14 11:44:22 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FilterView.Designer.cs
r10637 r10696 130 130 // 131 131 this.applyFilterButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 132 this.applyFilterButton.Enabled = false; 132 133 this.applyFilterButton.Location = new System.Drawing.Point(554, 474); 133 134 this.applyFilterButton.Name = "applyFilterButton"; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FilterView.cs
r10693 r10696 57 57 { 58 58 List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>(); 59 60 int activeFilters = filters.Count(c => c.Active); 61 62 applyFilterButton.Enabled = (activeFilters > 0); 63 59 64 bool[] result = Content.FilterLogic.Preview(filters); 60 int filteredCnt = 0; 61 for (int i = 0; i < result.Length; i++) 62 { 63 if (result[i] == true) 64 filteredCnt++; 65 } 65 66 int filteredCnt = result.Count(c => c); 67 66 68 tbFiltered.Text = filteredCnt.ToString(); 67 69 double percentage = filteredCnt * 100 / result.Length; … … 72 74 private void applyFilterButton_Click(object sender, EventArgs e) 73 75 { 74 //todo: inform Logic for apply Filter 76 List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>(); 77 Content.FilterLogic.Apply(filters); 75 78 } 76 79 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj
r10676 r10696 227 227 </ProjectReference> 228 228 </ItemGroup> 229 <ItemGroup> 230 <EmbeddedResource Include="FilterView.resx"> 231 <DependentUpon>FilterView.cs</DependentUpon> 232 </EmbeddedResource> 233 </ItemGroup> 229 234 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 230 235 <PropertyGroup> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
r10692 r10696 35 35 public bool[] Preview(IList<IFilter> filters) 36 36 { 37 IList<IFilter> activeFilters = filters.Where(f => f.Active && f.ConstraintData != null).ToList<IFilter>(); 38 39 if (activeFilters.Count == 0) { 40 return new bool[preprocessingData.Rows]; 41 } 42 37 43 bool[] result = Enumerable.Repeat<bool>(true, preprocessingData.Rows).ToArray(); 38 44 39 45 foreach (IFilter filter in filters) 40 46 { 41 if (filter.ConstraintData == null || !filter.Active) {42 continue;43 }44 45 47 bool[] filterResult = filter.Check(); 46 48
Note: See TracChangeset
for help on using the changeset viewer.