Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10914


Ignore:
Timestamp:
05/28/14 15:29:38 (11 years ago)
Author:
mleitner
Message:

Style fixes

Location:
branches/DataPreprocessing
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs

    r10908 r10914  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion 
     21using System;
    222using System.Windows.Forms;
    323using HeuristicLab.Analysis;
     
    1737    }
    1838
    19     protected override void OnContentChanged()
    20     {
     39    protected override void OnContentChanged() {
    2140      base.OnContentChanged();
    22       if (Content != null)
    23       {
     41      if (Content != null) {
    2442        logic = Content.ChartLogic;
    25    
     43
    2644        classifierComboBox.Items.Clear();
    2745        classifierComboBox.Items.Add("None");
    2846
    29         foreach(string var in logic.GetVariableNamesForHistogramClassification()){
     47        foreach (string var in logic.GetVariableNamesForHistogramClassification()) {
    3048          classifierComboBox.Items.Add(var);
    3149        }
    3250
    33      
     51
    3452        if (classifierComboBox.SelectedItem == null) {
    3553          classifierComboBox.SelectedIndex = Content.ClassifierVariableIndex;
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs

    r10908 r10914  
    3333using HeuristicLab.Analysis.Views;
    3434
    35 namespace HeuristicLab.DataPreprocessing.Views
    36 {
     35namespace HeuristicLab.DataPreprocessing.Views {
    3736  [View("Preprocessing DataTable View")]
    3837  [Content(typeof(PreprocessingDataTable), false)]
    39   public partial class PreprocessingDataTableView : ItemView, IConfigureableView
    40   {
     38  public partial class PreprocessingDataTableView : ItemView, IConfigureableView {
    4139    protected List<Series> invisibleSeries;
    4240    protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
    4341
    44     public new PreprocessingDataTable Content
    45     {
     42    public new PreprocessingDataTable Content {
    4643      get { return (PreprocessingDataTable)base.Content; }
    4744      set { base.Content = value; }
     
    5047    public IEnumerable<double> Classification { get; set; }
    5148
    52     public PreprocessingDataTableView()
    53     {
     49    public PreprocessingDataTableView() {
    5450      InitializeComponent();
    5551      valuesRowsTable = new Dictionary<IObservableList<double>, DataRow>();
     
    6056
    6157    #region Event Handler Registration
    62     protected override void DeregisterContentEvents()
    63     {
     58    protected override void DeregisterContentEvents() {
    6459      foreach (DataRow row in Content.Rows)
    6560        DeregisterDataRowEvents(row);
     
    7671      base.DeregisterContentEvents();
    7772    }
    78     protected override void RegisterContentEvents()
    79     {
     73    protected override void RegisterContentEvents() {
    8074      base.RegisterContentEvents();
    8175      Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged);
     
    10296      row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset);
    10397    }
    104     protected virtual void DeregisterDataRowEvents(DataRow row)
    105     {
     98    protected virtual void DeregisterDataRowEvents(DataRow row) {
    10699      row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded);
    107100      row.Values.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved);
     
    122115      chart.ChartAreas[0].AxisY2.Title = string.Empty;
    123116      chart.Series.Clear();
    124       if (Content != null)
    125       {
     117      if (Content != null) {
    126118
    127119        if (Classification != null)
     
    135127    }
    136128
    137     protected override void SetEnabledStateOfControls()
    138     {
     129    protected override void SetEnabledStateOfControls() {
    139130      base.SetEnabledStateOfControls();
    140131      chart.Enabled = Content != null;
    141132    }
    142133
    143     public void ShowConfiguration()
    144     {
    145       if (Content != null)
    146       {
    147         using (var dialog = new DataTableVisualPropertiesDialog(Content))
    148         {
     134    public void ShowConfiguration() {
     135      if (Content != null) {
     136        using (var dialog = new DataTableVisualPropertiesDialog(Content)) {
    149137          dialog.ShowDialog(this);
    150138        }
    151     }
    152       else MessageBox.Show("Nothing to configure.");
    153     }
    154     protected virtual void AddDataRows(IEnumerable<DataRow> rows)
    155     {
    156       foreach (var row in rows)
    157       {
     139      } else MessageBox.Show("Nothing to configure.");
     140    }
     141
     142    protected virtual void AddDataRows(IEnumerable<DataRow> rows) {
     143      foreach (var row in rows) {
    158144        RegisterDataRowEvents(row);
    159145        var series = new Series(row.Name);
     
    175161
    176162      // only paint selection for line chart
    177       if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line)
    178       {
     163      if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) {
    179164        // add dummy series for selction entry in legend
    180165        if (rows.Count() > 0 && chart.Series.FindByName("(Selection)") == null) {
    181         Series series = new Series("(Selection)");
    182         series.IsVisibleInLegend = true;
    183         series.Color = Color.Green;
    184         series.BorderWidth = 1;
    185         series.BorderDashStyle = ChartDashStyle.Solid;
    186         series.BorderColor = Color.Empty;
    187         series.ChartType = SeriesChartType.FastLine;
    188         chart.Series.Add(series);
    189       }
    190 
    191       foreach (var row in rows) {
     166          Series series = new Series("(Selection)");
     167          series.IsVisibleInLegend = true;
     168          series.Color = Color.Green;
     169          series.BorderWidth = 1;
     170          series.BorderDashStyle = ChartDashStyle.Solid;
     171          series.BorderColor = Color.Empty;
     172          series.ChartType = SeriesChartType.FastLine;
     173          chart.Series.Add(series);
     174        }
     175
     176        foreach (var row in rows) {
    192177          row.VisualProperties.IsVisibleInLegend = false;
    193178          row.VisualProperties.Color = Color.Green;
     
    197182          FillSeriesWithRowValues(series, row);
    198183
    199           if (Classification == null) 
     184          if (Classification == null)
    200185            chart.Series.Add(series);
    201        
    202       }
    203     }
     186
     187        }
     188      }
    204189    }
    205190
     
    207192
    208193      // only remove selection for line chart
    209       if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line)
    210       {
    211       //remove selection entry in legend
    212       if (Content.SelectedRows.Count == 0) {
    213         Series series = chart.Series["(Selection)"];
    214         chart.Series.Remove(series);
    215       }
    216 
    217       foreach (var row in rows) {
    218         Series series = chart.Series[row.Name + "(Selected)"];
    219         chart.Series.Remove(series);
    220       }
    221     }
     194      if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) {
     195        //remove selection entry in legend
     196        if (Content.SelectedRows.Count == 0) {
     197          Series series = chart.Series["(Selection)"];
     198          chart.Series.Remove(series);
     199        }
     200
     201        foreach (var row in rows) {
     202          Series series = chart.Series[row.Name + "(Selected)"];
     203          chart.Series.Remove(series);
     204        }
     205      }
    222206    }
    223207
     
    233217    }
    234218
    235     private void ConfigureSeries(Series series, DataRow row)
    236     {
     219    private void ConfigureSeries(Series series, DataRow row) {
    237220      RemoveCustomPropertyIfExists(series, "PointWidth");
    238221      series.BorderWidth = 1;
     
    255238          if (!chart.Series.Any(x => x.ChartType != SeriesChartType.Bar && x.ChartType != SeriesChartType.StackedBar && x.ChartType != SeriesChartType.StackedBar100))
    256239            series.ChartType = SeriesChartType.Bar;
    257           else
    258           {
     240          else {
    259241            series.ChartType = SeriesChartType.FastPoint; //default
    260242            row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points;
     
    300282    }
    301283
    302     private void ConfigureChartArea(ChartArea area)
    303     {
     284    private void ConfigureChartArea(ChartArea area) {
    304285      if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont;
    305286      if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor;
     
    328309    }
    329310
    330     private void RecalculateAxesScale(ChartArea area)
    331     {
     311    private void RecalculateAxesScale(ChartArea area) {
    332312      // Reset the axes bounds so that RecalculateAxesScale() will assign new bounds
    333       foreach (Axis a in area.Axes)
    334       {
     313      foreach (Axis a in area.Axes) {
    335314        a.Minimum = double.NaN;
    336315        a.Maximum = double.NaN;
     
    354333    }
    355334
    356     protected virtual void UpdateYCursorInterval()
    357     {
     335    protected virtual void UpdateYCursorInterval() {
    358336      double interestingValuesRange = (
    359337        from series in chart.Series
     
    374352    #region Event Handlers
    375353    #region Content Event Handlers
    376     private void Content_VisualPropertiesChanged(object sender, EventArgs e)
    377     {
     354    private void Content_VisualPropertiesChanged(object sender, EventArgs e) {
    378355      if (InvokeRequired)
    379356        Invoke(new EventHandler(Content_VisualPropertiesChanged), sender, e);
    380       else
    381       {
     357      else {
    382358        ConfigureChartArea(chart.ChartAreas[0]);
    383359        RecalculateAxesScale(chart.ChartAreas[0]); // axes min/max could have changed
     
    425401      if (InvokeRequired)
    426402        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded), sender, e);
    427       else
    428       {
     403      else {
    429404        AddDataRows(e.Items);
    430405      }
    431406    }
    432     private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e)
    433     {
     407    private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
    434408      if (InvokeRequired)
    435409        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsRemoved), sender, e);
    436       else
    437       {
     410      else {
    438411        RemoveDataRows(e.Items);
    439412      }
    440413    }
    441     private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e)
    442     {
     414    private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
    443415      if (InvokeRequired)
    444416        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e);
    445       else
    446       {
     417      else {
    447418        RemoveDataRows(e.OldItems);
    448419        AddDataRows(e.Items);
    449420      }
    450421    }
    451     private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e)
    452     {
     422    private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
    453423      if (InvokeRequired)
    454424        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset), sender, e);
    455       else
    456       {
     425      else {
    457426        RemoveDataRows(e.OldItems);
    458427        AddDataRows(e.Items);
     
    461430    #endregion
    462431    #region Row Event Handlers
    463     private void Row_VisualPropertiesChanged(object sender, EventArgs e)
    464     {
     432    private void Row_VisualPropertiesChanged(object sender, EventArgs e) {
    465433      if (InvokeRequired)
    466434        Invoke(new EventHandler(Row_VisualPropertiesChanged), sender, e);
    467       else
    468       {
     435      else {
    469436        DataRow row = (DataRow)sender;
    470437        Series series = chart.Series[row.Name];
     
    475442      }
    476443    }
    477     private void Row_NameChanged(object sender, EventArgs e)
    478     {
     444    private void Row_NameChanged(object sender, EventArgs e) {
    479445      if (InvokeRequired)
    480446        Invoke(new EventHandler(Row_NameChanged), sender, e);
    481       else
    482       {
     447      else {
    483448        DataRow row = (DataRow)sender;
    484449        chart.Series[row.Name].Name = row.Name;
     
    487452    #endregion
    488453    #region Values Event Handlers
    489     private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
    490     {
     454    private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
    491455      if (InvokeRequired)
    492456        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded), sender, e);
    493       else
    494       {
     457      else {
    495458        DataRow row = null;
    496459        valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
    497         if (row != null)
    498         {
     460        if (row != null) {
    499461          Series rowSeries = chart.Series[row.Name];
    500           if (!invisibleSeries.Contains(rowSeries))
    501           {
     462          if (!invisibleSeries.Contains(rowSeries)) {
    502463            rowSeries.Points.Clear();
    503464            FillSeriesWithRowValues(rowSeries, row);
     
    508469      }
    509470    }
    510     private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
    511     {
     471    private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
    512472      if (InvokeRequired)
    513473        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved), sender, e);
    514       else
    515       {
     474      else {
    516475        DataRow row = null;
    517476        valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
    518         if (row != null)
    519         {
     477        if (row != null) {
    520478          Series rowSeries = chart.Series[row.Name];
    521           if (!invisibleSeries.Contains(rowSeries))
    522           {
     479          if (!invisibleSeries.Contains(rowSeries)) {
    523480            rowSeries.Points.Clear();
    524481            FillSeriesWithRowValues(rowSeries, row);
     
    529486      }
    530487    }
    531     private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
    532     {
     488    private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
    533489      if (InvokeRequired)
    534490        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsReplaced), sender, e);
    535       else
    536       {
     491      else {
    537492        DataRow row = null;
    538493        valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
    539         if (row != null)
    540         {
     494        if (row != null) {
    541495          Series rowSeries = chart.Series[row.Name];
    542           if (!invisibleSeries.Contains(rowSeries))
    543           {
    544             if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)
    545             {
     496          if (!invisibleSeries.Contains(rowSeries)) {
     497            if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) {
    546498              rowSeries.Points.Clear();
    547499              FillSeriesWithRowValues(rowSeries, row);
    548             }
    549             else
    550             {
    551               foreach (IndexedItem<double> item in e.Items)
    552               {
     500            } else {
     501              foreach (IndexedItem<double> item in e.Items) {
    553502                if (IsInvalidValue(item.Value))
    554503                  rowSeries.Points[item.Index].IsEmpty = true;
    555                 else
    556                 {
     504                else {
    557505                  rowSeries.Points[item.Index].YValues = new double[] { item.Value };
    558506                  rowSeries.Points[item.Index].IsEmpty = false;
     
    566514      }
    567515    }
    568     private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
    569     {
     516    private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
    570517      if (InvokeRequired)
    571518        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsMoved), sender, e);
    572       else
    573       {
     519      else {
    574520        DataRow row = null;
    575521        valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
    576         if (row != null)
    577         {
     522        if (row != null) {
    578523          Series rowSeries = chart.Series[row.Name];
    579           if (!invisibleSeries.Contains(rowSeries))
    580           {
     524          if (!invisibleSeries.Contains(rowSeries)) {
    581525            rowSeries.Points.Clear();
    582526            FillSeriesWithRowValues(rowSeries, row);
     
    588532    }
    589533
    590     private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
    591     {
     534    private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
    592535      if (InvokeRequired)
    593536        Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset), sender, e);
    594       else
    595       {
     537      else {
    596538        DataRow row = null;
    597539        valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
    598         if (row != null)
    599         {
     540        if (row != null) {
    600541          Series rowSeries = chart.Series[row.Name];
    601           if (!invisibleSeries.Contains(rowSeries))
    602           {
     542          if (!invisibleSeries.Contains(rowSeries)) {
    603543            rowSeries.Points.Clear();
    604544            FillSeriesWithRowValues(rowSeries, row);
     
    613553
    614554    #region Chart Event Handlers
    615     private void chart_MouseDown(object sender, MouseEventArgs e)
    616     {
     555    private void chart_MouseDown(object sender, MouseEventArgs e) {
    617556      HitTestResult result = chart.HitTest(e.X, e.Y);
    618       if (result.ChartElementType == ChartElementType.LegendItem)
    619       {
     557      if (result.ChartElementType == ChartElementType.LegendItem) {
    620558        ToggleSeriesVisible(result.Series);
    621559      }
    622560    }
    623     private void chart_MouseMove(object sender, MouseEventArgs e)
    624     {
     561    private void chart_MouseMove(object sender, MouseEventArgs e) {
    625562      HitTestResult result = chart.HitTest(e.X, e.Y);
    626563      if (result.ChartElementType == ChartElementType.LegendItem)
     
    629566        this.Cursor = Cursors.Default;
    630567    }
    631     private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e)
    632     {
    633       foreach (LegendItem legendItem in e.LegendItems)
    634       {
     568    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
     569      foreach (LegendItem legendItem in e.LegendItems) {
    635570        var series = chart.Series[legendItem.SeriesName];
    636         if (series != null)
    637         {
     571        if (series != null) {
    638572          bool seriesIsInvisible = invisibleSeries.Contains(series);
    639           foreach (LegendCell cell in legendItem.Cells)
    640           {
     573          foreach (LegendCell cell in legendItem.Cells) {
    641574            cell.ForeColor = seriesIsInvisible ? Color.Gray : Color.Black;
    642575          }
     
    646579    #endregion
    647580
    648     private void ToggleSeriesVisible(Series series)
    649     {
     581    private void ToggleSeriesVisible(Series series) {
    650582
    651583      if (!Content.Rows.Any(x => x.Name == series.Name))
    652584        return;
    653585
    654       if (!invisibleSeries.Contains(series))
    655       {
     586      if (!invisibleSeries.Contains(series)) {
    656587        series.Points.Clear();
    657588        invisibleSeries.Add(series);
    658       }
    659       else
    660       {
     589      } else {
    661590        invisibleSeries.Remove(series);
    662         if (Content != null)
    663         {
     591        if (Content != null) {
    664592
    665593          var row = (from r in Content.Rows
     
    674602    }
    675603
    676     private void FillSeriesWithRowValues(Series series, DataRow row)
    677     {
    678       switch (row.VisualProperties.ChartType)
    679       {
     604    private void FillSeriesWithRowValues(Series series, DataRow row) {
     605      switch (row.VisualProperties.ChartType) {
    680606        case DataRowVisualProperties.DataRowChartType.Histogram:
    681607          CalculateHistogram(series, row);
    682608          break;
    683         default:
    684           {
     609        default: {
    685610            bool yLogarithmic = series.YAxisType == AxisType.Primary
    686611                                  ? Content.VisualProperties.YAxisLogScale
     
    689614                                  ? Content.VisualProperties.XAxisLogScale
    690615                                  : Content.VisualProperties.SecondXAxisLogScale;
    691             for (int i = 0; i < row.Values.Count; i++)
    692             {
     616            for (int i = 0; i < row.Values.Count; i++) {
    693617              var value = row.Values[i];
    694618              var point = new DataPoint();
     
    709633      double min = Double.MaxValue;
    710634
    711       foreach (double value in values)
    712       {
     635      foreach (double value in values) {
    713636        if (!Double.IsNaN(value) && value < min)
    714637          min = value;
     
    718641
    719642    //get maximium ignores nan values
    720     private double GetMaximum(IEnumerable<double> values)
    721     {
     643    private double GetMaximum(IEnumerable<double> values) {
    722644      double max = Double.MinValue;
    723645
    724       foreach (double value in values)
    725       {
     646      foreach (double value in values) {
    726647        if (!Double.IsNaN(value) && value > max)
    727648          max = value;
     
    765686      double intervalWidth = (maxValue - minValue) / bins;
    766687      if (intervalWidth < 0) return;
    767       if (intervalWidth == 0)
    768       {
     688      if (intervalWidth == 0) {
    769689        series.Points.AddXY(minValue, row.Values.Count);
    770690        return;
     
    818738      // add data points
    819739      int j = 0;
    820       foreach (var d in doubleRange)
    821       {
     740      foreach (var d in doubleRange) {
    822741        double sum = 0.0;
    823742        // sum the frequency values that fall within the same interval
    824         while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d)
    825         {
     743        while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d) {
    826744          sum += valueFrequencies[j].Item2;
    827745          ++j;
     
    833751                              ? "Y"
    834752                              : Content.VisualProperties.YAxisTitle;
    835         series.Points.Add(new DataPoint(d - intervalCenter, sum)
    836         {
     753        series.Points.Add(new DataPoint(d - intervalCenter, sum) {
    837754          ToolTip =
    838755            xAxisTitle + ": [" + (d - intervalWidth) + "-" + d + ")" + Environment.NewLine +
     
    843760
    844761    #region Helpers
    845     public static IEnumerable<double> DoubleRange(double min, double max, double step)
    846     {
     762    public static IEnumerable<double> DoubleRange(double min, double max, double step) {
    847763      double i;
    848764      for (i = min; i <= max; i += step)
     
    853769    }
    854770
    855     protected void RemoveCustomPropertyIfExists(Series series, string property)
    856     {
     771    protected void RemoveCustomPropertyIfExists(Series series, string property) {
    857772      if (series.IsCustomPropertySet(property)) series.DeleteCustomProperty(property);
    858773    }
    859774
    860     private double HumanRoundRange(double range)
    861     {
     775    private double HumanRoundRange(double range) {
    862776      double base10 = Math.Pow(10.0, Math.Floor(Math.Log10(range)));
    863777      double rounding = range / base10;
     
    870784    }
    871785
    872     private double HumanRoundMax(double max)
    873     {
     786    private double HumanRoundMax(double max) {
    874787      double base10;
    875788      if (max > 0) base10 = Math.Pow(10.0, Math.Floor(Math.Log10(max)));
     
    880793    }
    881794
    882     private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle)
    883     {
    884       switch (dataRowLineStyle)
    885       {
     795    private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) {
     796      switch (dataRowLineStyle) {
    886797        case DataRowVisualProperties.DataRowLineStyle.Dash:
    887798          return ChartDashStyle.Dash;
     
    901812    }
    902813
    903     protected static bool IsInvalidValue(double x)
    904     {
     814    protected static bool IsInvalidValue(double x) {
    905815      return double.IsNaN(x) || x < (double)decimal.MinValue || x > (double)decimal.MaxValue;
    906816    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/CorrelationMatrixContent.cs

    r10908 r10914  
    2828
    2929  [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")]
    30   public class CorrelationMatrixContent : Item, IViewShortcut
    31   {
     30  public class CorrelationMatrixContent : Item, IViewShortcut {
    3231    public DataAnalysisProblemData ProblemData { get; set; }
    3332
     
    3837    public CorrelationMatrixContent(CorrelationMatrixContent original, Cloner cloner)
    3938      : base(original, cloner) {
    40  
     39
    4140    }
    42  
     41
    4342    public static new Image StaticItemImage {
    4443      get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs

    r10908 r10914  
    3030    private int classifierVariableIndex = 0;
    3131
    32     public HistogramContent(IChartLogic chartlogic) :base(chartlogic) {
     32    public HistogramContent(IChartLogic chartlogic)
     33      : base(chartlogic) {
    3334      AllInOneMode = false;
    3435    }
     
    3839    }
    3940
    40     public int ClassifierVariableIndex
    41     {
     41    public int ClassifierVariableIndex {
    4242      get { return this.classifierVariableIndex; }
    4343      set { this.classifierVariableIndex = value; }
Note: See TracChangeset for help on using the changeset viewer.