Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13796 for trunk


Ignore:
Timestamp:
04/26/16 13:03:39 (9 years ago)
Author:
mkommend
Message:

#2599: Disabled preview of manipulated columns if more than 50 columns are affected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r12676 r13796  
    155155        int count = filteredColumns.Count;
    156156        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
    157         lblPreviewColumnsInfo.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with more than " + txtDeleteColumnsInfo.Text + "% missing values.";
    158         if (count > 0) {
     157        lblPreviewColumnsInfo.Text = string.Format("{0} column{1} of {2} ({3}) were detected with more than {4}% missing values.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsInfo.Text);
     158
     159        //only display column names more than 0 and fewer than 50 are affected
     160        if (count > 0 && count < 50) {
    159161          StringBuilder sb = new StringBuilder();
    160162          sb.Append(Environment.NewLine);
     
    170172
    171173          lblPreviewColumnsInfo.Text += sb.ToString();
    172         } else {
    173           btnApply.Enabled = false;
    174         }
     174        }
     175
     176        btnApply.Enabled = count > 0;
    175177      } else {
    176178        lblPreviewColumnsInfo.Text = "Preview not possible yet - please input the limit above.";
     
    184186        int count = filteredColumns.Count;
    185187        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
    186         lblPreviewColumnsVariance.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with a variance smaller than " + txtDeleteColumnsVariance.Text + ".";
    187         if (count > 0) {
     188        lblPreviewColumnsVariance.Text = string.Format("{0} column{1} of {2} ({3}) were detected with a variance smaller than {4}.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsVariance.Text);
     189
     190        //only display column names more than 0 and fewer than 50 are affected
     191        if (count > 0 && count < 50) {
    188192          StringBuilder sb = new StringBuilder();
    189193          sb.Append(Environment.NewLine);
     
    199203
    200204          lblPreviewColumnsVariance.Text += sb.ToString();
    201         } else {
    202           btnApply.Enabled = false;
    203         }
     205        }
     206
     207        btnApply.Enabled = count > 0;
    204208      } else {
    205209        lblPreviewColumnsVariance.Text = "Preview not possible yet - please input the limit for the variance above.";
Note: See TracChangeset for help on using the changeset viewer.