- Timestamp:
- 04/02/14 15:39:03 (11 years ago)
- 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 102 102 break; 103 103 } 104 105 104 } 106 105 } … … 160 159 161 160 void findAndReplaceDialog_ReplaceEvent(object sender, EventArgs e) { 162 if (searchIterator != null && searchIterator.GetCurrent() != null) 163 { 161 if (searchIterator != null && searchIterator.GetCurrent() != null) { 164 162 Replace(TransformToDictionary(currentCell)); 165 163 } … … 175 173 currentSearchText = findAndReplaceDialog.GetSearchText(); 176 174 } 177 175 178 176 bool moreOccurences = false; 179 177 do { … … 294 292 e.Graphics.FillRectangle(backColorBrush, bounds); 295 293 } 296 294 297 295 using (Brush gridBrush = new SolidBrush(Color.LightGray)) { 298 296 Pen gridLinePen = new Pen(gridBrush); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FilterView.cs
r10707 r10712 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.ComponentModel;4 using System.Drawing;5 using System.Data;6 3 using System.Linq; 7 using System.Text;8 4 using System.Windows.Forms; 5 using HeuristicLab.Collections; 6 using HeuristicLab.Core; 9 7 using HeuristicLab.Core.Views; 8 using HeuristicLab.Data; 9 using HeuristicLab.DataPreprocessing.Filter; 10 10 using HeuristicLab.MainForm; 11 using HeuristicLab.Core;12 using HeuristicLab.DataPreprocessing.Filter;13 using HeuristicLab.Collections;14 using HeuristicLab.Data;15 11 16 namespace HeuristicLab.DataPreprocessing.Views 17 { 12 namespace HeuristicLab.DataPreprocessing.Views { 18 13 [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 { 22 16 private CheckedItemCollectionView<IFilter> filterView; 23 17 24 public FilterView() 25 { 18 public FilterView() { 26 19 InitializeComponent(); 27 20 tbTotal.Text = "0"; … … 37 30 } 38 31 39 public new FilterContent Content 40 { 32 public new FilterContent Content { 41 33 get { return (FilterContent)base.Content; } 42 set { base.Content = value; }34 set { base.Content = value; } 43 35 } 44 36 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))) { 52 41 filter.ConstraintData = new StringValue("0"); 53 42 } … … 59 48 } 60 49 61 private void UpdateFilterInfo() 62 { 50 private void UpdateFilterInfo() { 63 51 List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>(); 64 52 … … 68 56 69 57 bool[] result = Content.FilterLogic.Preview(filters); 70 58 71 59 int filteredCnt = result.Count(c => !c); 72 60 73 61 tbFiltered.Text = filteredCnt.ToString(); 74 62 double percentage = filteredCnt * 100 / result.Length; … … 77 65 } 78 66 79 private void applyFilterButton_Click(object sender, EventArgs e) 80 { 67 private void applyFilterButton_Click(object sender, EventArgs e) { 81 68 List<IFilter> filters = filterView.ItemCollection.ToList<IFilter>(); 82 69 Content.FilterLogic.Apply(filters); … … 84 71 85 72 //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) { 90 75 filter.ConstrainedValue = Content.FilterLogic.PreprocessingData; 91 76 filter.Active = true; … … 95 80 } 96 81 97 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) 98 { 82 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) { 99 83 UpdateFilterInfo(); 100 84 } -
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; 1 using System.Windows.Forms; 9 2 using HeuristicLab.Analysis; 10 using HeuristicLab.Collections;11 using HeuristicLab.Core;12 using HeuristicLab.Core.Views;13 using HeuristicLab.Data;14 3 using HeuristicLab.MainForm; 15 4 … … 17 6 18 7 [View("Histogram View")] 19 [Content(typeof(HistogramContent), false)]8 [Content(typeof(HistogramContent), true)] 20 9 public partial class HistogramView : PreprocessingChartView { 21 10 … … 33 22 } 34 23 35 protected override void OnContentChanged() {36 base.OnContentChanged();37 }38 24 } 39 25 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs
r10709 r10712 27 27 28 28 [View("Line Chart View")] 29 [Content(typeof(LineChartContent), false)]29 [Content(typeof(LineChartContent), true)] 30 30 public partial class LineChartView : PreprocessingChartView { 31 31 … … 42 42 set { base.Content = value; } 43 43 } 44 45 protected override void OnContentChanged() {46 base.OnContentChanged();47 }48 44 } 49 45 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.cs
r10710 r10712 29 29 30 30 [View("Manipulation Chart View")] 31 [Content(typeof(ManipulationContent), false)]31 [Content(typeof(ManipulationContent), true)] 32 32 public partial class ManipulationView : ItemView { 33 33 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
r10658 r10712 36 36 private IChartLogic logic; 37 37 private DataTable dataTable; 38 private ICheckedItemList<StringValue> variableItemList; 38 private ICheckedItemList<StringValue> variableItemList; 39 39 protected DataRowVisualProperties.DataRowChartType chartType; 40 40 protected string chartTitle; … … 50 50 51 51 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) { 54 53 string variableName = item.Value.Value; 55 54 if (VariableIsDisplayed(variableName)) { … … 122 121 case DataPreprocessingChangedEventType.ChangeItem: 123 122 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)); 125 124 break; 126 125 case DataPreprocessingChangedEventType.DeleteRow: … … 155 154 } 156 155 157 158 156 } 159 157 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/StatisticsView.cs
r10691 r10712 29 29 30 30 [View("Statistics View")] 31 [Content(typeof(StatisticsContent), false)]31 [Content(typeof(StatisticsContent), true)] 32 32 public partial class StatisticsView : ItemView { 33 33 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/TransformationView.cs
r10558 r10712 20 20 #endregion 21 21 22 using HeuristicLab.Core.Views;23 22 using HeuristicLab.MainForm; 23 using HeuristicLab.MainForm.WindowsForms; 24 24 25 25 namespace HeuristicLab.DataPreprocessing.Views { 26 26 27 27 [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 { 30 30 public TransformationView() { 31 31 InitializeComponent(); … … 36 36 set { base.Content = value; } 37 37 } 38 39 protected override void OnContentChanged() {40 base.OnContentChanged();41 }42 38 } 43 39 }
Note: See TracChangeset
for help on using the changeset viewer.