Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/13 13:01:40 (11 years ago)
Author:
bburlacu
Message:

#1772: Merged remaining trunk changes into the EvolutionaryTracking branch.

Location:
branches/HeuristicLab.EvolutionaryTracking
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.Designer.cs

    r7967 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    6161      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
    6262      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
     63      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    6364      this.splitContainer.Panel1.SuspendLayout();
    6465      this.splitContainer.Panel2.SuspendLayout();
     
    7172      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    7273      this.xAxisLabel.AutoSize = true;
    73       this.xAxisLabel.Location = new System.Drawing.Point(298, 256);
     74      this.xAxisLabel.Location = new System.Drawing.Point(363, 345);
    7475      this.xAxisLabel.Name = "xAxisLabel";
    7576      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
     
    8384      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    8485      this.xAxisComboBox.FormattingEnabled = true;
    85       this.xAxisComboBox.Location = new System.Drawing.Point(319, 253);
     86      this.xAxisComboBox.Location = new System.Drawing.Point(384, 342);
    8687      this.xAxisComboBox.Name = "xAxisComboBox";
    87       this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
     88      this.xAxisComboBox.Size = new System.Drawing.Size(600, 21);
    8889      this.xAxisComboBox.TabIndex = 11;
    8990      this.xAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
     
    105106      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
    106107      this.yAxisComboBox.Name = "yAxisComboBox";
    107       this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
     108      this.yAxisComboBox.Size = new System.Drawing.Size(600, 21);
    108109      this.yAxisComboBox.TabIndex = 9;
    109110      this.yAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged);
     
    111112      // chart
    112113      //
    113       this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    114                   | System.Windows.Forms.AnchorStyles.Left)
    115                   | System.Windows.Forms.AnchorStyles.Right)));
     114      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     115            | System.Windows.Forms.AnchorStyles.Left)
     116            | System.Windows.Forms.AnchorStyles.Right)));
    116117      chartArea1.Name = "ChartArea1";
    117118      this.chart.ChartAreas.Add(chartArea1);
    118       this.chart.Location = new System.Drawing.Point(6, 30);
     119      this.chart.Location = new System.Drawing.Point(-1, 30);
    119120      this.chart.Name = "chart";
    120121      series1.ChartArea = "ChartArea1";
     
    125126      series1.YValuesPerPoint = 6;
    126127      this.chart.Series.Add(series1);
    127       this.chart.Size = new System.Drawing.Size(534, 217);
     128      this.chart.Size = new System.Drawing.Size(989, 306);
    128129      this.chart.TabIndex = 17;
    129130      this.chart.Text = "chart";
     
    135136      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    136137      this.noRunsLabel.AutoSize = true;
    137       this.noRunsLabel.Location = new System.Drawing.Point(212, 122);
     138      this.noRunsLabel.Location = new System.Drawing.Point(434, 167);
    138139      this.noRunsLabel.Name = "noRunsLabel";
    139140      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
     
    161162      //
    162163      this.splitContainer.Panel2.Controls.Add(this.statisticsGroupBox);
    163       this.splitContainer.Size = new System.Drawing.Size(543, 416);
    164       this.splitContainer.SplitterDistance = 277;
     164      this.splitContainer.Size = new System.Drawing.Size(987, 550);
     165      this.splitContainer.SplitterDistance = 366;
    165166      this.splitContainer.TabIndex = 23;
    166167      //
     
    172173      this.showStatisticsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
    173174      this.showStatisticsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties;
    174       this.showStatisticsCheckBox.Location = new System.Drawing.Point(6, 245);
     175      this.showStatisticsCheckBox.Location = new System.Drawing.Point(3, 339);
    175176      this.showStatisticsCheckBox.Name = "showStatisticsCheckBox";
    176177      this.showStatisticsCheckBox.Size = new System.Drawing.Size(24, 24);
     
    182183      // statisticsGroupBox
    183184      //
    184       this.statisticsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    185                   | System.Windows.Forms.AnchorStyles.Left)
    186                   | System.Windows.Forms.AnchorStyles.Right)));
     185      this.statisticsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     186            | System.Windows.Forms.AnchorStyles.Left)
     187            | System.Windows.Forms.AnchorStyles.Right)));
    187188      this.statisticsGroupBox.Controls.Add(this.statisticsMatrixView);
    188189      this.statisticsGroupBox.Location = new System.Drawing.Point(3, 3);
    189190      this.statisticsGroupBox.Name = "statisticsGroupBox";
    190       this.statisticsGroupBox.Size = new System.Drawing.Size(534, 129);
     191      this.statisticsGroupBox.Size = new System.Drawing.Size(981, 174);
    191192      this.statisticsGroupBox.TabIndex = 1;
    192193      this.statisticsGroupBox.TabStop = false;
     
    203204      this.statisticsMatrixView.ShowRowsAndColumnsTextBox = false;
    204205      this.statisticsMatrixView.ShowStatisticalInformation = false;
    205       this.statisticsMatrixView.Size = new System.Drawing.Size(528, 110);
     206      this.statisticsMatrixView.Size = new System.Drawing.Size(975, 155);
    206207      this.statisticsMatrixView.TabIndex = 0;
    207208      //
    208209      // RunCollectionBoxPlotView
    209210      //
    210       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    211211      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    212212      this.BackColor = System.Drawing.SystemColors.Window;
     
    214214      this.Controls.Add(this.splitContainer);
    215215      this.Name = "RunCollectionBoxPlotView";
    216       this.Size = new System.Drawing.Size(543, 416);
     216      this.Size = new System.Drawing.Size(987, 550);
    217217      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
    218218      this.splitContainer.Panel1.ResumeLayout(false);
    219219      this.splitContainer.Panel1.PerformLayout();
    220220      this.splitContainer.Panel2.ResumeLayout(false);
     221      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
    221222      this.splitContainer.ResumeLayout(false);
    222223      this.statisticsGroupBox.ResumeLayout(false);
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs

    r9421 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    328328      if (!this.categoricalMapping.ContainsKey(dimension)) {
    329329        this.categoricalMapping[dimension] = new Dictionary<object, double>();
    330         var orderedCategories = Content.Where(r=> r.Visible).Select(r => Content.GetValue(r, dimension).ToString())
    331                                 .Distinct()
    332                                 .OrderBy(x => x, new NaturalStringComparer());
     330        var orderedCategories = Content.Where(r => r.Visible && Content.GetValue(r, dimension) != null).Select(r => Content.GetValue(r, dimension).ToString())
     331                                       .Distinct().OrderBy(x => x, new NaturalStringComparer());
    333332        int count = 1;
    334333        foreach (var category in orderedCategories) {
     
    389388      axis.CustomLabels.Clear();
    390389      if (categoricalMapping.ContainsKey(dimension)) {
    391         foreach (var pair in categoricalMapping[dimension]) {
     390        int position = 1;
     391        foreach (var pair in categoricalMapping[dimension].Where(x => seriesCache.ContainsKey(x.Value))) {
    392392          string labelText = pair.Key.ToString();
    393393          CustomLabel label = new CustomLabel();
     
    397397          label.Text = labelText;
    398398          label.GridTicks = GridTickTypes.TickMark;
    399           label.FromPosition = pair.Value - 0.5;
    400           label.ToPosition = pair.Value + 0.5;
     399          label.FromPosition = position - 0.5;
     400          label.ToPosition = position + 0.5;
    401401          axis.CustomLabels.Add(label);
     402          position++;
    402403        }
    403404      } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) {
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs

    r9421 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    6161      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
    6262      this.openBoxPlotViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    63       this.hideRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     63      this.hideRunsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    6464      this.zoomButton = new System.Windows.Forms.RadioButton();
    6565      this.selectButton = new System.Windows.Forms.RadioButton();
    6666      this.radioButtonGroup = new System.Windows.Forms.GroupBox();
    67       this.colorDialogButton = new System.Windows.Forms.Button();
     67      this.colorRunsButton = new System.Windows.Forms.Button();
    6868      this.colorDialog = new System.Windows.Forms.ColorDialog();
    6969      this.tooltip = new System.Windows.Forms.ToolTip(this.components);
    7070      this.colorXAxisButton = new System.Windows.Forms.Button();
    7171      this.colorYAxisButton = new System.Windows.Forms.Button();
     72      this.transparencyTrackBar = new System.Windows.Forms.TrackBar();
     73      this.hideRunsButton = new System.Windows.Forms.Button();
     74      this.colorDialogButton = new System.Windows.Forms.Button();
    7275      this.noRunsLabel = new System.Windows.Forms.Label();
    7376      this.sizeTrackBar = new System.Windows.Forms.TrackBar();
    7477      this.getDataAsMatrixToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    75       this.transparencyTrackBar = new System.Windows.Forms.TrackBar();
    7678      this.transparencyLabel = new System.Windows.Forms.Label();
    77       this.colorRunsButton = new System.Windows.Forms.Button();
    78       this.hideRunsButton = new System.Windows.Forms.Button();
     79      this.unhideAllRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     80      this.colorResetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    7981      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit();
    8082      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit();
    8183      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
    8284      this.radioButtonGroup.SuspendLayout();
     85      ((System.ComponentModel.ISupportInitialize)(this.transparencyTrackBar)).BeginInit();
    8386      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).BeginInit();
    84       ((System.ComponentModel.ISupportInitialize)(this.transparencyTrackBar)).BeginInit();
    8587      this.SuspendLayout();
    8688      //
     
    8890      //
    8991      this.yJitterLabel.AutoSize = true;
    90       this.yJitterLabel.Location = new System.Drawing.Point(278, 6);
     92      this.yJitterLabel.Location = new System.Drawing.Point(457, 6);
    9193      this.yJitterLabel.Name = "yJitterLabel";
    9294      this.yJitterLabel.Size = new System.Drawing.Size(32, 13);
     
    98100      this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    99101      this.xJitterlabel.AutoSize = true;
    100       this.xJitterlabel.Location = new System.Drawing.Point(749, 472);
     102      this.xJitterlabel.Location = new System.Drawing.Point(893, 719);
    101103      this.xJitterlabel.Name = "xJitterlabel";
    102104      this.xJitterlabel.Size = new System.Drawing.Size(32, 13);
     
    108110      this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    109111      this.xTrackBar.Enabled = false;
    110       this.xTrackBar.Location = new System.Drawing.Point(787, 469);
     112      this.xTrackBar.Location = new System.Drawing.Point(919, 715);
    111113      this.xTrackBar.Maximum = 100;
    112114      this.xTrackBar.Name = "xTrackBar";
     
    120122      this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    121123      this.xAxisLabel.AutoSize = true;
    122       this.xAxisLabel.Location = new System.Drawing.Point(471, 472);
     124      this.xAxisLabel.Location = new System.Drawing.Point(439, 719);
    123125      this.xAxisLabel.Name = "xAxisLabel";
    124126      this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
     
    131133      this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
    132134      this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     135      this.xAxisComboBox.DropDownWidth = 500;
    133136      this.xAxisComboBox.FormattingEnabled = true;
    134       this.xAxisComboBox.Location = new System.Drawing.Point(492, 469);
     137      this.xAxisComboBox.Location = new System.Drawing.Point(460, 715);
    135138      this.xAxisComboBox.Name = "xAxisComboBox";
    136       this.xAxisComboBox.Size = new System.Drawing.Size(221, 21);
     139      this.xAxisComboBox.Size = new System.Drawing.Size(400, 21);
    137140      this.xAxisComboBox.TabIndex = 7;
    138141      this.xAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
     
    151154      this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
    152155      this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     156      this.yAxisComboBox.DropDownWidth = 800;
    153157      this.yAxisComboBox.FormattingEnabled = true;
    154158      this.yAxisComboBox.Location = new System.Drawing.Point(24, 3);
    155159      this.yAxisComboBox.Name = "yAxisComboBox";
    156       this.yAxisComboBox.Size = new System.Drawing.Size(221, 21);
     160      this.yAxisComboBox.Size = new System.Drawing.Size(400, 21);
    157161      this.yAxisComboBox.TabIndex = 5;
    158162      this.yAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
     
    161165      //
    162166      this.yTrackBar.Enabled = false;
    163       this.yTrackBar.Location = new System.Drawing.Point(312, 3);
     167      this.yTrackBar.Location = new System.Drawing.Point(483, 3);
    164168      this.yTrackBar.Maximum = 100;
    165169      this.yTrackBar.Name = "yTrackBar";
     
    174178      this.sizeComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
    175179      this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     180      this.sizeComboBox.DropDownWidth = 400;
    176181      this.sizeComboBox.FormattingEnabled = true;
    177       this.sizeComboBox.Location = new System.Drawing.Point(560, 4);
     182      this.sizeComboBox.Location = new System.Drawing.Point(613, 3);
    178183      this.sizeComboBox.Name = "sizeComboBox";
    179       this.sizeComboBox.Size = new System.Drawing.Size(221, 21);
     184      this.sizeComboBox.Size = new System.Drawing.Size(300, 21);
    180185      this.sizeComboBox.TabIndex = 14;
    181186      this.sizeComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
     
    185190      this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    186191      this.sizeLabel.AutoSize = true;
    187       this.sizeLabel.Location = new System.Drawing.Point(489, 7);
     192      this.sizeLabel.Location = new System.Drawing.Point(541, 6);
    188193      this.sizeLabel.Name = "sizeLabel";
    189194      this.sizeLabel.Size = new System.Drawing.Size(66, 13);
     
    193198      // chart
    194199      //
    195       this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    196             | System.Windows.Forms.AnchorStyles.Left)
     200      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     201            | System.Windows.Forms.AnchorStyles.Left) 
    197202            | System.Windows.Forms.AnchorStyles.Right)));
    198203      chartArea1.Name = "ChartArea1";
    199204      this.chart.ChartAreas.Add(chartArea1);
    200       this.chart.Location = new System.Drawing.Point(6, 30);
     205      this.chart.Location = new System.Drawing.Point(-1, 30);
    201206      this.chart.Name = "chart";
    202207      series1.ChartArea = "ChartArea1";
     
    207212      series1.YValuesPerPoint = 2;
    208213      this.chart.Series.Add(series1);
    209       this.chart.Size = new System.Drawing.Size(843, 425);
     214      this.chart.Size = new System.Drawing.Size(988, 681);
    210215      this.chart.TabIndex = 16;
    211216      this.chart.Text = "chart";
     
    222227      this.openBoxPlotViewToolStripMenuItem.Click += new System.EventHandler(this.openBoxPlotViewToolStripMenuItem_Click);
    223228      //
    224       // hideRunToolStripMenuItem
    225       //
    226       this.hideRunToolStripMenuItem.Name = "hideRunToolStripMenuItem";
    227       this.hideRunToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
    228       this.hideRunToolStripMenuItem.Text = "Hide Run";
    229       this.hideRunToolStripMenuItem.Click += new System.EventHandler(this.hideRunToolStripMenuItem_Click);
     229      // hideRunsToolStripMenuItem
     230      //
     231      this.hideRunsToolStripMenuItem.Name = "hideRunsToolStripMenuItem";
     232      this.hideRunsToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
     233      this.hideRunsToolStripMenuItem.Text = "Hide selected Runs";
     234      this.hideRunsToolStripMenuItem.Click += new System.EventHandler(this.hideRunsToolStripMenuItem_Click);
    230235      //
    231236      // zoomButton
     
    234239      this.zoomButton.AutoSize = true;
    235240      this.zoomButton.Checked = true;
    236       this.zoomButton.Location = new System.Drawing.Point(6, 10);
     241      this.zoomButton.Location = new System.Drawing.Point(6, 11);
    237242      this.zoomButton.Name = "zoomButton";
    238243      this.zoomButton.Size = new System.Drawing.Size(52, 17);
     
    247252      this.selectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    248253      this.selectButton.AutoSize = true;
    249       this.selectButton.Location = new System.Drawing.Point(64, 9);
     254      this.selectButton.Location = new System.Drawing.Point(61, 11);
    250255      this.selectButton.Name = "selectButton";
    251256      this.selectButton.Size = new System.Drawing.Size(55, 17);
     
    259264      this.radioButtonGroup.Controls.Add(this.zoomButton);
    260265      this.radioButtonGroup.Controls.Add(this.selectButton);
    261       this.radioButtonGroup.Location = new System.Drawing.Point(2, 461);
     266      this.radioButtonGroup.Location = new System.Drawing.Point(3, 704);
    262267      this.radioButtonGroup.Name = "radioButtonGroup";
    263268      this.radioButtonGroup.Size = new System.Drawing.Size(122, 32);
     
    265270      this.radioButtonGroup.TabStop = false;
    266271      //
    267       // colorDialogButton
    268       //
    269       this.colorDialogButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    270       this.colorDialogButton.Enabled = false;
    271       this.colorDialogButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    272       this.colorDialogButton.Location = new System.Drawing.Point(130, 469);
    273       this.colorDialogButton.Name = "colorDialogButton";
    274       this.colorDialogButton.Size = new System.Drawing.Size(21, 21);
    275       this.colorDialogButton.TabIndex = 20;
    276       this.colorDialogButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    277       this.tooltip.SetToolTip(this.colorDialogButton, "Choose color");
    278       this.colorDialogButton.UseVisualStyleBackColor = true;
    279       this.colorDialogButton.Click += new System.EventHandler(this.colorDialogButton_Click);
     272      // colorRunsButton
     273      //
     274      this.colorRunsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     275      this.colorRunsButton.Enabled = false;
     276      this.colorRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     277      this.colorRunsButton.Location = new System.Drawing.Point(131, 713);
     278      this.colorRunsButton.Name = "colorRunsButton";
     279      this.colorRunsButton.Size = new System.Drawing.Size(21, 21);
     280      this.colorRunsButton.TabIndex = 20;
     281      this.tooltip.SetToolTip(this.colorRunsButton, "Color all selected runs");
     282      this.colorRunsButton.UseVisualStyleBackColor = true;
     283      this.colorRunsButton.Click += new System.EventHandler(this.colorRunsButton_Click);
    280284      //
    281285      // colorDialog
     
    289293      this.colorXAxisButton.Enabled = false;
    290294      this.colorXAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColorVertical;
    291       this.colorXAxisButton.Location = new System.Drawing.Point(719, 469);
     295      this.colorXAxisButton.Location = new System.Drawing.Point(866, 715);
    292296      this.colorXAxisButton.Name = "colorXAxisButton";
    293297      this.colorXAxisButton.Size = new System.Drawing.Size(21, 21);
     
    301305      this.colorYAxisButton.Enabled = false;
    302306      this.colorYAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColor;
    303       this.colorYAxisButton.Location = new System.Drawing.Point(251, 3);
     307      this.colorYAxisButton.Location = new System.Drawing.Point(430, 3);
    304308      this.colorYAxisButton.Name = "colorYAxisButton";
    305309      this.colorYAxisButton.Size = new System.Drawing.Size(21, 21);
     
    309313      this.colorYAxisButton.Click += new System.EventHandler(this.colorYAxisButton_Click);
    310314      //
     315      // transparencyTrackBar
     316      //
     317      this.transparencyTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     318      this.transparencyTrackBar.LargeChange = 16;
     319      this.transparencyTrackBar.Location = new System.Drawing.Point(302, 715);
     320      this.transparencyTrackBar.Maximum = 254;
     321      this.transparencyTrackBar.Name = "transparencyTrackBar";
     322      this.transparencyTrackBar.Size = new System.Drawing.Size(64, 45);
     323      this.transparencyTrackBar.TabIndex = 24;
     324      this.transparencyTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
     325      this.tooltip.SetToolTip(this.transparencyTrackBar, "Sets the transparency of the colors");
     326      this.transparencyTrackBar.ValueChanged += new System.EventHandler(this.transparencyTrackBar_ValueChanged);
     327      //
     328      // hideRunsButton
     329      //
     330      this.hideRunsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     331      this.hideRunsButton.Enabled = false;
     332      this.hideRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     333      this.hideRunsButton.Location = new System.Drawing.Point(172, 713);
     334      this.hideRunsButton.Name = "hideRunsButton";
     335      this.hideRunsButton.Size = new System.Drawing.Size(43, 21);
     336      this.hideRunsButton.TabIndex = 26;
     337      this.hideRunsButton.Text = "Hide";
     338      this.tooltip.SetToolTip(this.hideRunsButton, "Hides all selected runs");
     339      this.hideRunsButton.UseVisualStyleBackColor = true;
     340      this.hideRunsButton.Click += new System.EventHandler(this.hideRunsButton_Click);
     341      //
     342      // colorDialogButton
     343      //
     344      this.colorDialogButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     345      this.colorDialogButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     346      this.colorDialogButton.Enabled = false;
     347      this.colorDialogButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     348      this.colorDialogButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     349      this.colorDialogButton.Location = new System.Drawing.Point(152, 713);
     350      this.colorDialogButton.Name = "colorDialogButton";
     351      this.colorDialogButton.Size = new System.Drawing.Size(14, 21);
     352      this.colorDialogButton.TabIndex = 25;
     353      this.colorDialogButton.Text = "v";
     354      this.tooltip.SetToolTip(this.colorDialogButton, "Choose color");
     355      this.colorDialogButton.UseVisualStyleBackColor = true;
     356      this.colorDialogButton.Click += new System.EventHandler(this.colorDialogButton_Click);
     357      //
    311358      // noRunsLabel
    312359      //
    313360      this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
    314361      this.noRunsLabel.AutoSize = true;
    315       this.noRunsLabel.Location = new System.Drawing.Point(366, 228);
     362      this.noRunsLabel.Location = new System.Drawing.Point(432, 350);
    316363      this.noRunsLabel.Name = "noRunsLabel";
    317364      this.noRunsLabel.Size = new System.Drawing.Size(138, 13);
     
    322369      //
    323370      this.sizeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    324       this.sizeTrackBar.Location = new System.Drawing.Point(787, 3);
     371      this.sizeTrackBar.Location = new System.Drawing.Point(919, 3);
    325372      this.sizeTrackBar.Maximum = 20;
    326373      this.sizeTrackBar.Minimum = -20;
     
    339386      this.getDataAsMatrixToolStripMenuItem.Click += new System.EventHandler(this.getDataAsMatrixToolStripMenuItem_Click);
    340387      //
    341       // transparencyTrackBar
    342       //
    343       this.transparencyTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    344       this.transparencyTrackBar.LargeChange = 16;
    345       this.transparencyTrackBar.Location = new System.Drawing.Point(359, 470);
    346       this.transparencyTrackBar.Maximum = 254;
    347       this.transparencyTrackBar.Name = "transparencyTrackBar";
    348       this.transparencyTrackBar.Size = new System.Drawing.Size(64, 45);
    349       this.transparencyTrackBar.TabIndex = 24;
    350       this.transparencyTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
    351       this.tooltip.SetToolTip(this.transparencyTrackBar, "Sets the transparency of the colors");
    352       this.transparencyTrackBar.ValueChanged += new System.EventHandler(this.transparencyTrackBar_ValueChanged);
    353       //
    354388      // transparencyLabel
    355389      //
    356390      this.transparencyLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    357391      this.transparencyLabel.AutoSize = true;
    358       this.transparencyLabel.Location = new System.Drawing.Point(278, 475);
     392      this.transparencyLabel.Location = new System.Drawing.Point(233, 717);
    359393      this.transparencyLabel.Name = "transparencyLabel";
    360394      this.transparencyLabel.Size = new System.Drawing.Size(75, 13);
     
    362396      this.transparencyLabel.Text = "Transparency:";
    363397      //
    364       // colorRunsButton
    365       //
    366       this.colorRunsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    367       this.colorRunsButton.Enabled = false;
    368       this.colorRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    369       this.colorRunsButton.Location = new System.Drawing.Point(151, 469);
    370       this.colorRunsButton.Name = "colorRunsButton";
    371       this.colorRunsButton.Size = new System.Drawing.Size(43, 21);
    372       this.colorRunsButton.TabIndex = 25;
    373       this.colorRunsButton.Text = "Color";
    374       this.colorRunsButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    375       this.tooltip.SetToolTip(this.colorRunsButton, "Color all selected runs");
    376       this.colorRunsButton.UseVisualStyleBackColor = true;
    377       this.colorRunsButton.Click += new System.EventHandler(this.colorRunsButton_Click);
    378       //
    379       // hideRunsButton
    380       //
    381       this.hideRunsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    382       this.hideRunsButton.Enabled = false;
    383       this.hideRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
    384       this.hideRunsButton.Location = new System.Drawing.Point(194, 469);
    385       this.hideRunsButton.Name = "hideRunsButton";
    386       this.hideRunsButton.Size = new System.Drawing.Size(43, 21);
    387       this.hideRunsButton.TabIndex = 26;
    388       this.hideRunsButton.Text = "Hide";
    389       this.hideRunsButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    390       this.tooltip.SetToolTip(this.hideRunsButton, "Hides all selected runs");
    391       this.hideRunsButton.UseVisualStyleBackColor = true;
    392       this.hideRunsButton.Click += new System.EventHandler(this.hideRunsButton_Click);
     398      // unhideAllRunToolStripMenuItem
     399      //
     400      this.unhideAllRunToolStripMenuItem.Name = "unhideAllRunToolStripMenuItem";
     401      this.unhideAllRunToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
     402      this.unhideAllRunToolStripMenuItem.Text = "Unhide all";
     403      this.unhideAllRunToolStripMenuItem.Click += new System.EventHandler(this.unhideAllRunToolStripMenuItem_Click);
     404      //
     405      // colorResetToolStripMenuItem
     406      //
     407      this.colorResetToolStripMenuItem.Name = "colorResetToolStripMenuItem";
     408      this.colorResetToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
     409      this.colorResetToolStripMenuItem.Text = "Color reset";
     410      this.colorResetToolStripMenuItem.Click += new System.EventHandler(this.colorResetToolStripMenuItem_Click);
    393411      //
    394412      // RunCollectionBubbleChartView
     
    398416      this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
    399417      this.Controls.Add(this.hideRunsButton);
    400       this.Controls.Add(this.colorRunsButton);
    401       this.Controls.Add(this.transparencyTrackBar);
    402418      this.Controls.Add(this.sizeTrackBar);
    403419      this.Controls.Add(this.colorYAxisButton);
    404420      this.Controls.Add(this.colorXAxisButton);
    405421      this.Controls.Add(this.noRunsLabel);
    406       this.Controls.Add(this.colorDialogButton);
     422      this.Controls.Add(this.colorRunsButton);
    407423      this.Controls.Add(this.radioButtonGroup);
    408       this.Controls.Add(this.chart);
    409       this.Controls.Add(this.sizeLabel);
    410       this.Controls.Add(this.sizeComboBox);
    411424      this.Controls.Add(this.yJitterLabel);
    412425      this.Controls.Add(this.transparencyLabel);
     
    418431      this.Controls.Add(this.yAxisComboBox);
    419432      this.Controls.Add(this.yTrackBar);
     433      this.Controls.Add(this.colorDialogButton);
     434      this.Controls.Add(this.chart);
     435      this.Controls.Add(this.transparencyTrackBar);
     436      this.Controls.Add(this.sizeLabel);
     437      this.Controls.Add(this.sizeComboBox);
    420438      this.Name = "RunCollectionBubbleChartView";
    421       this.Size = new System.Drawing.Size(854, 496);
     439      this.Size = new System.Drawing.Size(986, 741);
    422440      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit();
    423441      ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit();
     
    425443      this.radioButtonGroup.ResumeLayout(false);
    426444      this.radioButtonGroup.PerformLayout();
     445      ((System.ComponentModel.ISupportInitialize)(this.transparencyTrackBar)).EndInit();
    427446      ((System.ComponentModel.ISupportInitialize)(this.sizeTrackBar)).EndInit();
    428       ((System.ComponentModel.ISupportInitialize)(this.transparencyTrackBar)).EndInit();
    429447      this.ResumeLayout(false);
    430448      this.PerformLayout();
     
    447465    private System.Windows.Forms.RadioButton selectButton;
    448466    private System.Windows.Forms.GroupBox radioButtonGroup;
    449     private System.Windows.Forms.Button colorDialogButton;
     467    private System.Windows.Forms.Button colorRunsButton;
    450468    private System.Windows.Forms.ColorDialog colorDialog;
    451469    private System.Windows.Forms.ToolTip tooltip;
    452470    private System.Windows.Forms.Label noRunsLabel;
    453471    private System.Windows.Forms.ToolStripMenuItem openBoxPlotViewToolStripMenuItem;
    454     private System.Windows.Forms.ToolStripMenuItem hideRunToolStripMenuItem;
     472    private System.Windows.Forms.ToolStripMenuItem hideRunsToolStripMenuItem;
    455473    private System.Windows.Forms.Button colorXAxisButton;
    456474    private System.Windows.Forms.Button colorYAxisButton;
     
    459477    private System.Windows.Forms.TrackBar transparencyTrackBar;
    460478    private System.Windows.Forms.Label transparencyLabel;
    461     private System.Windows.Forms.Button colorRunsButton;
    462479    private System.Windows.Forms.Button hideRunsButton;
     480    private System.Windows.Forms.ToolStripMenuItem unhideAllRunToolStripMenuItem;
     481    private System.Windows.Forms.ToolStripMenuItem colorResetToolStripMenuItem;
     482    private System.Windows.Forms.Button colorDialogButton;
    463483  }
    464484}
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs

    r9421 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    5656    private bool suppressUpdates = false;
    5757
     58    private RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };
    5859
    5960    public RunCollectionBubbleChartView() {
    6061      InitializeComponent();
    6162
    62       chart.ContextMenuStrip.Items.Insert(0, hideRunToolStripMenuItem);
    63       chart.ContextMenuStrip.Items.Insert(1, openBoxPlotViewToolStripMenuItem);
    64       chart.ContextMenuStrip.Items.Add(getDataAsMatrixToolStripMenuItem);
     63      chart.ContextMenuStrip.Items.Insert(0, openBoxPlotViewToolStripMenuItem);
     64      chart.ContextMenuStrip.Items.Insert(1, getDataAsMatrixToolStripMenuItem);
     65      chart.ContextMenuStrip.Items.Insert(2, new ToolStripSeparator());
     66      chart.ContextMenuStrip.Items.Insert(3, hideRunsToolStripMenuItem);
     67      chart.ContextMenuStrip.Items.Insert(4, unhideAllRunToolStripMenuItem);
     68      chart.ContextMenuStrip.Items.Insert(5, colorResetToolStripMenuItem);
     69      chart.ContextMenuStrip.Items.Insert(6, new ToolStripSeparator());
    6570      chart.ContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(ContextMenuStrip_Opening);
    6671
    67       colorDialog.Color = Color.Black;
    68       colorDialogButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
     72      colorDialog.Color = Color.Orange;
     73      colorRunsButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
    6974      isSelecting = false;
    7075
     
    167172            point.MarkerStyle = MarkerStyle.Cross;
    168173          } else {
    169             point.Color = Color.FromArgb(255 - transparencyTrackBar.Value, ((IRun)point.Tag).Color);
     174            point.Color = Color.FromArgb(255 - LogTransform(transparencyTrackBar.Value), ((IRun)point.Tag).Color);
    170175            point.MarkerStyle = MarkerStyle.Circle;
    171176          }
     
    310315      double sizeRange = maxSizeValue - minSizeValue;
    311316
    312       const int smallestBubbleSize = 5;
     317      const int smallestBubbleSize = 7;
    313318
    314319      foreach (DataPoint point in series.Points) {
     
    331336      var yAxis = this.chart.ChartAreas[0].AxisY;
    332337
    333       SetAutomaticUpdateOfAxis(xAxis, false);
    334       SetAutomaticUpdateOfAxis(yAxis, false);
    335 
    336338      double xAxisRange = xAxis.Maximum - xAxis.Minimum;
    337339      double yAxisRange = yAxis.Maximum - yAxis.Minimum;
     
    351353      }
    352354
     355      if (xJitterFactor.IsAlmost(0.0) && yJitterFactor.IsAlmost(0.0)) {
     356        SetAutomaticUpdateOfAxis(xAxis, true);
     357        SetAutomaticUpdateOfAxis(yAxis, true);
     358        chart.ChartAreas[0].RecalculateAxesScale();
     359      } else {
     360        SetAutomaticUpdateOfAxis(xAxis, false);
     361        SetAutomaticUpdateOfAxis(yAxis, false);
     362      }
    353363    }
    354364
     
    431441      if (!this.categoricalMapping.ContainsKey(dimension)) {
    432442        this.categoricalMapping[dimension] = new Dictionary<object, double>();
    433         var orderedCategories = Content.Where(r => r.Visible).Select(r => Content.GetValue(r, dimension).ToString())
    434                                     .Distinct()
    435                                     .OrderBy(x => x, new NaturalStringComparer());
     443        var orderedCategories = Content.Where(r => r.Visible && Content.GetValue(r, dimension) != null).Select(r => Content.GetValue(r, dimension).ToString())
     444                                    .Distinct().OrderBy(x => x, new NaturalStringComparer());
    436445        int count = 1;
    437446        foreach (var category in orderedCategories) {
     
    535544      double maxY = Math.Max(yCursor.SelectionStart, yCursor.SelectionEnd);
    536545
     546      if (Control.ModifierKeys != Keys.Control) {
     547        ClearSelectedRuns();
     548      }
     549
    537550      //check for click to select a single model
    538551      if (minX == maxX && minY == maxY) {
     
    542555          var point = chart.Series[0].Points[pointIndex];
    543556          IRun run = (IRun)point.Tag;
    544           point.Color = Color.Red;
    545           point.MarkerStyle = MarkerStyle.Cross;
    546           selectedRuns.Add(run);
    547 
    548         } else ClearSelectedRuns();
     557          if (selectedRuns.Contains(run)) {
     558            point.MarkerStyle = MarkerStyle.Circle;
     559            point.Color = Color.FromArgb(255 - LogTransform(transparencyTrackBar.Value), run.Color);
     560            selectedRuns.Remove(run);
     561          } else {
     562            point.Color = Color.Red;
     563            point.MarkerStyle = MarkerStyle.Cross;
     564            selectedRuns.Add(run);
     565          }
     566        }
    549567      } else {
    550568        foreach (DataPoint point in this.chart.Series[0].Points) {
    551           if (point.XValue < minX || point.XValue >= maxX) continue;
    552           if (point.YValues[0] < minY || point.YValues[0] >= maxY) continue;
     569          if (point.XValue < minX || point.XValue > maxX) continue;
     570          if (point.YValues[0] < minY || point.YValues[0] > maxY) continue;
    553571          point.MarkerStyle = MarkerStyle.Cross;
    554572          point.Color = Color.Red;
     
    688706    private void zoomButton_CheckedChanged(object sender, EventArgs e) {
    689707      this.isSelecting = selectButton.Checked;
     708      this.colorRunsButton.Enabled = this.isSelecting;
    690709      this.colorDialogButton.Enabled = this.isSelecting;
    691       this.colorRunsButton.Enabled = this.isSelecting;
    692710      this.hideRunsButton.Enabled = this.isSelecting;
    693711      this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !isSelecting;
     
    696714    }
    697715
    698     private IRun runToHide = null;
    699716    private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
    700       var pos = Control.MousePosition;
    701       var chartPos = chart.PointToClient(pos);
    702 
    703       HitTestResult h = this.chart.HitTest(chartPos.X, chartPos.Y);
    704       if (h.ChartElementType == ChartElementType.DataPoint) {
    705         runToHide = (IRun)((DataPoint)h.Object).Tag;
    706         hideRunToolStripMenuItem.Visible = true;
    707       } else {
    708         runToHide = null;
    709         hideRunToolStripMenuItem.Visible = false;
    710       }
    711 
    712     }
    713     private void hideRunToolStripMenuItem_Click(object sender, EventArgs e) {
    714       var constraint = Content.Constraints.OfType<RunCollectionContentConstraint>().FirstOrDefault(c => c.Active);
    715       if (constraint == null) {
    716         constraint = new RunCollectionContentConstraint();
    717         Content.Constraints.Add(constraint);
    718         constraint.Active = true;
    719       }
    720       constraint.ConstraintData.Add(runToHide);
     717      hideRunsToolStripMenuItem.Visible = selectedRuns.Any();
     718    }
     719
     720    private void unhideAllRunToolStripMenuItem_Click(object sender, EventArgs e) {
     721      visibilityConstraint.ConstraintData.Clear();
     722      if (Content.Constraints.Contains(visibilityConstraint)) Content.Constraints.Remove(visibilityConstraint);
     723    }
     724    private void hideRunsToolStripMenuItem_Click(object sender, EventArgs e) {
     725      HideRuns(selectedRuns);
     726      //could not use ClearSelectedRuns as the runs are not visible anymore
     727      selectedRuns.Clear();
    721728    }
    722729    private void hideRunsButton_Click(object sender, EventArgs e) {
    723       if (!selectedRuns.Any()) return;
    724       var constraint = new RunCollectionContentConstraint();
    725       constraint.ConstraintData = new ItemSet<IRun>(selectedRuns);
    726       Content.Constraints.Add(constraint);
    727       ClearSelectedRuns();
    728       constraint.Active = true;
     730      HideRuns(selectedRuns);
     731      //could not use ClearSelectedRuns as the runs are not visible anymore
     732      selectedRuns.Clear();
     733    }
     734
     735    private void HideRuns(IEnumerable<IRun> runs) {
     736      visibilityConstraint.Active = false;
     737      if (!Content.Constraints.Contains(visibilityConstraint)) Content.Constraints.Add(visibilityConstraint);
     738      foreach (var run in runs) {
     739        visibilityConstraint.ConstraintData.Add(run);
     740      }
     741      visibilityConstraint.Active = true;
    729742    }
    730743
     
    744757      double max = transparencyTrackBar.Maximum;
    745758      double r = (x - min) / (max - min);  // r \in [0..1]
    746       double l = Math.Log(r + 1) / Math.Log(2.0); // l \in [0..1]
     759      double l = Math.Max(Math.Min((1.0 - Math.Pow(0.05, r)) / 0.95, 1), 0); // l \in [0..1]
    747760      return (int)Math.Round(255.0 * l);
    748761    }
     
    800813
    801814    #region coloring
     815    private void colorResetToolStripMenuItem_Click(object sender, EventArgs e) {
     816      Content.UpdateOfRunsInProgress = true;
     817
     818      IEnumerable<IRun> runs;
     819      if (selectedRuns.Any()) runs = selectedRuns;
     820      else runs = Content;
     821
     822      foreach (var run in runs)
     823        run.Color = Color.Black;
     824      ClearSelectedRuns();
     825
     826      Content.UpdateOfRunsInProgress = false;
     827    }
    802828    private void colorDialogButton_Click(object sender, EventArgs e) {
    803829      if (colorDialog.ShowDialog(this) == DialogResult.OK) {
    804         this.colorDialogButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
     830        this.colorRunsButton.Image = this.GenerateImage(16, 16, this.colorDialog.Color);
     831        colorRunsButton_Click(sender, e);
    805832      }
    806833    }
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionDataTableView.Designer.cs

    r9240 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionDataTableView.cs

    r9240 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.Designer.cs

    r7469 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionTabularView.cs

    r8962 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    101101    }
    102102    private void run_Changed(object sender, EventArgs e) {
     103      if (suppressUpdates) return;
    103104      if (InvokeRequired)
    104105        this.Invoke(new EventHandler(run_Changed), sender, e);
     
    199200        runIndex++;
    200201      }
     202      rowsTextBox.Text = dataGridView.Rows.GetRowCount(DataGridViewElementStates.Visible).ToString();
    201203      UpdateRowHeaders();
    202204    }
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.Designer.cs

    r7469 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs

    r7469 r9835  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    255255      if (e.KeyCode == Keys.Delete) {
    256256        if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) {
    257           foreach (ListViewItem item in itemsListView.SelectedItems)
    258             Content.Remove((IRun)item.Tag);
     257          if (RunCollection != null) {
     258            RunCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(i => (IRun)i.Tag));
     259          } else {
     260            foreach (ListViewItem item in itemsListView.SelectedItems)
     261              Content.Remove((IRun)item.Tag);
     262          }
    259263        }
    260264      }
     
    350354    private void removeButton_Click(object sender, EventArgs e) {
    351355      if (itemsListView.SelectedItems.Count > 0) {
    352         foreach (ListViewItem item in itemsListView.SelectedItems)
    353           Content.Remove((IRun)item.Tag);
     356        if (RunCollection != null) {
     357          RunCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(i => (IRun)i.Tag));
     358        } else {
     359          foreach (ListViewItem item in itemsListView.SelectedItems)
     360            Content.Remove((IRun)item.Tag);
     361        }
    354362        itemsListView.SelectedItems.Clear();
    355363      }
     
    377385      try {
    378386        RunCollection.Modify();
    379       } finally {
     387      }
     388      finally {
    380389        ReadOnly = false;
    381390      }
Note: See TracChangeset for help on using the changeset viewer.