Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/17 16:30:45 (7 years ago)
Author:
pfleck
Message:

#2709 Adapted DataTable/ScatterPlotControl to the recent (re-) merge of the -View and -Control.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs

    r14975 r14983  
    416416          foreach (var dataRow in dataTable.Rows)
    417417            dataRow.VisualProperties.IsVisibleInLegend = groupingComboBox.SelectedIndex > 0;
    418           var pcv = new DataTableControl {
     418          var pcv = new DataTableView {
    419419            Name = key.ToString(),
    420420            Content = dataTable,
    421421            Dock = DockStyle.Fill,
     422            ShowName = false
    422423            //ShowLegend = false,
    423424            //XAxisFormat = "G3"
     
    444445          }
    445446          scatterPlot.VisualProperties.Title = string.Empty;
    446           var scatterPlotControl = new ScatterPlotControl {
     447          var scatterPlotView = new ScatterPlotView {
    447448            Name = key.ToString(),
    448449            Content = scatterPlot,
    449450            Dock = DockStyle.Fill,
     451            ShowName = false
    450452            //ShowLegend = false,
    451453            //XAxisFormat = "G3"
    452454          };
    453           //scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart
    454           bodyCache.Add(key, scatterPlotControl);
     455          //scatterPlotView.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart
     456          bodyCache.Add(key, scatterPlotView);
    455457        }
    456458      }
     
    536538    //Open scatter plot in new tab with new content when double clicked
    537539    private void ScatterPlotDoubleClick(object sender, EventArgs e) {
    538       var scatterPlotControl = (ScatterPlotControl)sender;
     540      var scatterPlotView = (ScatterPlotView)sender;
    539541      var scatterContent = new SingleScatterPlotContent(Content.PreprocessingData);
    540       ScatterPlot scatterPlot = scatterPlotControl.Content;
     542      ScatterPlot scatterPlot = scatterPlotView.Content;
    541543
    542544      //Extract variable names from scatter plot and set them in content
     
    552554    //open histogram in new tab with new content when double clicked
    553555    private void HistogramDoubleClick(object sender, EventArgs e) {
    554       DataTableControl pcv = (DataTableControl)sender;
     556      DataTableView pcv = (DataTableView)sender;
    555557      HistogramContent histoContent = new HistogramContent(Content.PreprocessingData);  // create new content     
    556558                                                                                        //ToDo: histoContent.VariableItemList = Content.CreateVariableItemList();
     
    655657      int pointSize = (int)pointSizeNumericUpDown.Value;
    656658      foreach (var control in bodyCache.ToList()) {
    657         var scatterPlotControl = control.Value as ScatterPlotControl;
    658         if (scatterPlotControl != null) {
    659           foreach (var row in scatterPlotControl.Content.Rows) {
     659        var scatterPlotView = control.Value as ScatterPlotView;
     660        if (scatterPlotView != null) {
     661          foreach (var row in scatterPlotView.Content.Rows) {
    660662            row.VisualProperties.PointSize = pointSize;
    661663          }
     
    666668      float opacity = (float)pointOpacityNumericUpDown.Value;
    667669      foreach (var control in bodyCache.ToList()) {
    668         var scatterPlotControl = control.Value as ScatterPlotControl;
    669         if (scatterPlotControl != null) {
    670           foreach (var row in scatterPlotControl.Content.Rows) {
     670        var scatterPlotView = control.Value as ScatterPlotView;
     671        if (scatterPlotView != null) {
     672          foreach (var row in scatterPlotView.Content.Rows) {
    671673            var color = row.VisualProperties.Color;
    672674            if (color.IsEmpty)
     
    700702        }
    701703
    702         var scatterPlotControl = control.Value as ScatterPlotControl;
    703         if (scatterPlotControl != null) {
    704           foreach (var row in scatterPlotControl.Content.Rows) {
     704        var scatterPlotView = control.Value as ScatterPlotView;
     705        if (scatterPlotView != null) {
     706          foreach (var row in scatterPlotView.Content.Rows) {
    705707            row.VisualProperties.IsRegressionVisibleInLegend = false;
    706708            row.VisualProperties.RegressionType = regressionType;
     
    726728        }
    727729
    728         var histogramControl = control.Value as DataTableControl;
     730        var histogramControl = control.Value as DataTableView;
    729731        if (histogramControl != null) {
    730732          foreach (var row in histogramControl.Content.Rows) {
Note: See TracChangeset for help on using the changeset viewer.