Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10712


Ignore:
Timestamp:
04/02/14 15:39:03 (10 years ago)
Author:
rstoll
Message:
  • Changed views to standard views in order that a double click opens them in a new tab
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
Files:
8 edited

Legend:

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

    r10706 r10712  
    102102            break;
    103103        }
    104 
    105104      }
    106105    }
     
    160159
    161160    void findAndReplaceDialog_ReplaceEvent(object sender, EventArgs e) {
    162       if (searchIterator != null && searchIterator.GetCurrent() != null)
    163       {
     161      if (searchIterator != null && searchIterator.GetCurrent() != null) {
    164162        Replace(TransformToDictionary(currentCell));
    165163      }
     
    175173        currentSearchText = findAndReplaceDialog.GetSearchText();
    176174      }
    177      
     175
    178176      bool moreOccurences = false;
    179177      do {
     
    294292        e.Graphics.FillRectangle(backColorBrush, bounds);
    295293      }
    296      
     294
    297295      using (Brush gridBrush = new SolidBrush(Color.LightGray)) {
    298296        Pen gridLinePen = new Pen(gridBrush);
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FilterView.cs

    r10707 r10712  
    11using System;
    22using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    63using System.Linq;
    7 using System.Text;
    84using System.Windows.Forms;
     5using HeuristicLab.Collections;
     6using HeuristicLab.Core;
    97using HeuristicLab.Core.Views;
     8using HeuristicLab.Data;
     9using HeuristicLab.DataPreprocessing.Filter;
    1010using HeuristicLab.MainForm;
    11 using HeuristicLab.Core;
    12 using HeuristicLab.DataPreprocessing.Filter;
    13 using HeuristicLab.Collections;
    14 using HeuristicLab.Data;
    1511
    16 namespace HeuristicLab.DataPreprocessing.Views
    17 {
     12namespace HeuristicLab.DataPreprocessing.Views {
    1813  [View("CheckedFilterCollection View")]
    19   [Content(typeof(FilterContent), false)]
    20   public partial class FilterView : ItemView
    21   {
     14  [Content(typeof(FilterContent), true)]
     15  public partial class FilterView : ItemView {
    2216    private CheckedItemCollectionView<IFilter> filterView;
    2317
    24     public FilterView()
    25     {
     18    public FilterView() {
    2619      InitializeComponent();
    2720      tbTotal.Text = "0";
     
    3730    }
    3831
    39     public new FilterContent Content
    40     {
     32    public new FilterContent Content {
    4133      get { return (FilterContent)base.Content; }
    42       set { base.Content = value;}
     34      set { base.Content = value; }
    4335    }
    4436
    45     private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e)
    46     {
    47      
    48       foreach (IFilter filter in e.Items)
    49       {
    50         if (filterView.Content.CheckedItems.Contains(filter) && (filter.ConstraintData == null || string.IsNullOrEmpty(((StringValue)filter.ConstraintData).Value)) )
    51         {
     37    private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
     38
     39      foreach (IFilter filter in e.Items) {
     40        if (filterView.Content.CheckedItems.Contains(filter) && (filter.ConstraintData == null || string.IsNullOrEmpty(((StringValue)filter.ConstraintData).Value))) {
    5241          filter.ConstraintData = new StringValue("0");
    5342        }
     
    5948    }
    6049
    61     private void UpdateFilterInfo()
    62     {
     50    private void UpdateFilterInfo() {
    6351      List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>();
    6452
     
    6856
    6957      bool[] result = Content.FilterLogic.Preview(filters);
    70      
     58
    7159      int filteredCnt = result.Count(c => !c);
    72  
     60
    7361      tbFiltered.Text = filteredCnt.ToString();
    7462      double percentage = filteredCnt * 100 / result.Length;
     
    7765    }
    7866
    79     private void applyFilterButton_Click(object sender, EventArgs e)
    80     {
     67    private void applyFilterButton_Click(object sender, EventArgs e) {
    8168      List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>();
    8269      Content.FilterLogic.Apply(filters);
     
    8471
    8572    //whenever a new filter is added the preprocessing data is set to the filter
    86     private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e)
    87     {
    88       foreach (IFilter filter in e.Items)
    89       {
     73    private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
     74      foreach (IFilter filter in e.Items) {
    9075        filter.ConstrainedValue = Content.FilterLogic.PreprocessingData;
    9176        filter.Active = true;
     
    9580    }
    9681
    97     private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e)
    98     {
     82    private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) {
    9983      UpdateFilterInfo();
    10084    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs

    r10658 r10712  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    6 using System.Linq;
    7 using System.Text;
    8 using System.Windows.Forms;
     1using System.Windows.Forms;
    92using HeuristicLab.Analysis;
    10 using HeuristicLab.Collections;
    11 using HeuristicLab.Core;
    12 using HeuristicLab.Core.Views;
    13 using HeuristicLab.Data;
    143using HeuristicLab.MainForm;
    154
     
    176
    187  [View("Histogram View")]
    19   [Content(typeof(HistogramContent), false)]
     8  [Content(typeof(HistogramContent), true)]
    209  public partial class HistogramView : PreprocessingChartView {
    2110
     
    3322    }
    3423
    35     protected override void OnContentChanged() {
    36       base.OnContentChanged();
    37     }
    3824  }
    3925}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs

    r10709 r10712  
    2727
    2828  [View("Line Chart View")]
    29   [Content(typeof(LineChartContent), false)]
     29  [Content(typeof(LineChartContent), true)]
    3030  public partial class LineChartView : PreprocessingChartView {
    3131
     
    4242      set { base.Content = value; }
    4343    }
    44 
    45     protected override void OnContentChanged() {
    46       base.OnContentChanged();
    47     }
    4844  }
    4945}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.cs

    r10710 r10712  
    2929
    3030  [View("Manipulation Chart View")]
    31   [Content(typeof(ManipulationContent), false)]
     31  [Content(typeof(ManipulationContent), true)]
    3232  public partial class ManipulationView : ItemView {
    3333
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs

    r10658 r10712  
    3636    private IChartLogic logic;
    3737    private DataTable dataTable;
    38     private ICheckedItemList<StringValue> variableItemList;   
     38    private ICheckedItemList<StringValue> variableItemList;
    3939    protected DataRowVisualProperties.DataRowChartType chartType;
    4040    protected string chartTitle;
     
    5050
    5151    private void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) {
    52       foreach(IndexedItem<StringValue> item in checkedItems.Items)
    53       {
     52      foreach (IndexedItem<StringValue> item in checkedItems.Items) {
    5453        string variableName = item.Value.Value;
    5554        if (VariableIsDisplayed(variableName)) {
     
    122121        case DataPreprocessingChangedEventType.ChangeItem:
    123122          dataTable.Rows.Remove(logic.GetVariableNameByIndex(e.Column));
    124           dataTable.Rows.Add(logic.CreateDataRow(logic.GetVariableNameByIndex(e.Column),chartType));
     123          dataTable.Rows.Add(logic.CreateDataRow(logic.GetVariableNameByIndex(e.Column), chartType));
    125124          break;
    126125        case DataPreprocessingChangedEventType.DeleteRow:
     
    155154    }
    156155
    157 
    158156  }
    159157}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/StatisticsView.cs

    r10691 r10712  
    2929
    3030  [View("Statistics View")]
    31   [Content(typeof(StatisticsContent), false)]
     31  [Content(typeof(StatisticsContent), true)]
    3232  public partial class StatisticsView : ItemView {
    3333
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/TransformationView.cs

    r10558 r10712  
    2020#endregion
    2121
    22 using HeuristicLab.Core.Views;
    2322using HeuristicLab.MainForm;
     23using HeuristicLab.MainForm.WindowsForms;
    2424
    2525namespace HeuristicLab.DataPreprocessing.Views {
    2626
    2727  [View("Transformation View")]
    28   [Content(typeof(TransformationContent), false)]
    29   public partial class TransformationView : ItemView {
     28  [Content(typeof(TransformationContent), true)]
     29  public partial class TransformationView : AsynchronousContentView {
    3030    public TransformationView() {
    3131      InitializeComponent();
     
    3636      set { base.Content = value; }
    3737    }
    38 
    39     protected override void OnContentChanged() {
    40       base.OnContentChanged();
    41     }
    4238  }
    4339}
Note: See TracChangeset for help on using the changeset viewer.