Changeset 10934
- Timestamp:
- 06/04/14 12:30:08 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r10930 r10934 36 36 private bool notOwnEvent = true; 37 37 private bool isSearching = false; 38 private bool updateOnMouseUp = false; 38 39 private SearchAndReplaceDialog findAndReplaceDialog; 39 40 private IFindPreprocessingItemsIterator searchIterator; … … 70 71 dataGridView.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(dataGridView_CellPainting); 71 72 dataGridView.KeyDown += dataGridView_KeyDown; 73 dataGridView.MouseUp += dataGridView_MouseUp; 72 74 contextMenuCell.Items.Add(ShowHideColumns); 73 75 _highlightedRowIndices = new List<int>(); … … 79 81 if (Content != null) { 80 82 if (!isSearching) { 83 84 if (Control.MouseButtons == MouseButtons.Left) { 85 updateOnMouseUp = true; 86 return; 87 } 88 81 89 base.dataGridView_SelectionChanged(sender, e); 90 82 91 Content.DataGridLogic.SetSelection(GetSelectedCells()); 83 92 } 84 93 } 85 94 } 95 96 private void dataGridView_MouseUp(object sender, MouseEventArgs e) { 97 if (!updateOnMouseUp) 98 return; 99 100 updateOnMouseUp = false; 101 dataGridView_SelectionChanged(sender, e); 102 } 86 103 87 104 protected override void OnContentChanged() { -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r10922 r10934 54 54 //var correlationMatrixLogic = new ChartLogic(data); 55 55 var filterLogic = new FilterLogic(data); 56 var creator = new ProblemDataCreator(Content); 57 var problemData = (DataAnalysisProblemData)creator.CreateProblemData(); 56 58 57 //var dataCompletenessLogic = new ChartLogic(data); 59 58 … … 65 64 new HistogramContent(chartLogic), 66 65 new ScatterPlotContent(chartLogic), 67 new CorrelationMatrixContent( problemData),66 new CorrelationMatrixContent(Content), 68 67 new DataCompletenessChartContent(dataGridLogic, searchLogic), 69 68 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs
r10908 r10934 66 66 } 67 67 68 68 69 protected override void RegisterContentEvents() { 69 70 base.RegisterContentEvents(); 71 Content.PreprocessingData.Changed += Data_Changed; 70 72 fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation); 71 73 fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished); … … 73 75 74 76 protected override void DeregisterContentEvents() { 77 Content.PreprocessingData.Changed -= Data_Changed; 75 78 fcc.CorrelationCalculationFinished -= new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished); 76 79 fcc.ProgressCalculation -= new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation); 77 80 base.DeregisterContentEvents(); 81 } 82 83 private void Data_Changed(object sender, DataPreprocessingChangedEventArgs e) { 84 OnContentChanged(); 78 85 } 79 86 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.4/Implementations/CorrelationMatrixContent.cs
r10914 r10934 29 29 [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")] 30 30 public class CorrelationMatrixContent : Item, IViewShortcut { 31 public DataAnalysisProblemData ProblemData { get; set; }32 31 33 public CorrelationMatrixContent(DataAnalysisProblemData data) { 34 ProblemData = data; 32 public DataAnalysisProblemData ProblemData { 33 get { 34 var creator = new ProblemDataCreator(Context); 35 return (DataAnalysisProblemData)creator.CreateProblemData(); 36 } 37 } 38 39 public ITransactionalPreprocessingData PreprocessingData { 40 get { 41 return Context.Data; 42 } 43 } 44 45 private IPreprocessingContext Context { get; set; } 46 public CorrelationMatrixContent(IPreprocessingContext context) { 47 Context = context; 48 49 35 50 } 36 51 … … 47 62 return new CorrelationMatrixContent(this, cloner); 48 63 } 64 65 public event DataPreprocessingChangedEventHandler Changed { 66 add { PreprocessingData.Changed += value; } 67 remove { PreprocessingData.Changed -= value; } 68 } 49 69 } 50 70 }
Note: See TracChangeset
for help on using the changeset viewer.