Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4715


Ignore:
Timestamp:
11/03/10 04:31:46 (14 years ago)
Author:
swagner
Message:

Worked on population diversity analysis (#1188)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/HeatMap.cs

    r4703 r4715  
    5353      return clone;
    5454    }
     55
     56    public override string ToString() {
     57      return ItemName;
     58    }
    5559  }
    5660}
  • trunk/sources/HeuristicLab.Analysis/3.3/PopulationDiversityAnalyzer.cs

    r4703 r4715  
    9696        double[,] similarities = CalculateSimilarities(sortedSolutions);
    9797
    98         // calculate maximum similarities, average maximum similarity and average similarity
     98        // calculate minimum, average and maximum similarities
    9999        double similarity;
    100100        int count = sortedSolutions.Length;
     101        double[] minSimilarities = new double[sortedSolutions.Length];
     102        double[] avgSimilarities = new double[sortedSolutions.Length];
    101103        double[] maxSimilarities = new double[sortedSolutions.Length];
    102         double avgMaxSimilarity;
    103104        double avgSimilarity = 0;
    104         maxSimilarities.Initialize();
    105105        for (int i = 0; i < count; i++) {
    106           for (int j = i + 1; j < count; j++) {
    107             similarity = similarities[i, j];
    108             avgSimilarity += similarity;
    109             if (maxSimilarities[i] < similarity) maxSimilarities[i] = similarity;
    110             if (maxSimilarities[j] < similarity) maxSimilarities[j] = similarity;
     106          minSimilarities[i] = 1;
     107          avgSimilarities[i] = 0;
     108          maxSimilarities[i] = 0;
     109          for (int j = 0; j < count; j++) {
     110            if (i != j) {
     111              similarity = similarities[i, j];
     112              avgSimilarity += similarity;
     113              if (minSimilarities[i] > similarity) minSimilarities[i] = similarity;
     114              avgSimilarities[i] += similarity;
     115              if (maxSimilarities[i] < similarity) maxSimilarities[i] = similarity;
     116            }
    111117          }
    112         }
    113         avgMaxSimilarity = maxSimilarities.Average();
    114         avgSimilarity = avgSimilarity / ((count - 1) * count / 2);
     118          avgSimilarities[i] = avgSimilarities[i] / (count - 1);
     119        }
     120        double avgMinSimilarity = minSimilarities.Average();
     121        double avgAvgSimilarity = avgSimilarities.Average();
     122        double avgMaxSimilarity = maxSimilarities.Average();
     123        avgSimilarity = avgSimilarity / (count * count - count);
    115124
    116125        // fetch results collection
     
    147156          ((DoubleValue)results["Average Population Similarity"].Value).Value = avgSimilarity;
    148157
    149         // store average maximum similarity
     158        // store average minimum, average and maximum similarity
     159        if (!results.ContainsKey("Average Minimum Solution Similarity"))
     160          results.Add(new Result("Average Minimum Solution Similarity", new DoubleValue(avgMinSimilarity)));
     161        else
     162          ((DoubleValue)results["Average Minimum Solution Similarity"].Value).Value = avgMinSimilarity;
     163
     164        if (!results.ContainsKey("Average Average Solution Similarity"))
     165          results.Add(new Result("Average Average Solution Similarity", new DoubleValue(avgAvgSimilarity)));
     166        else
     167          ((DoubleValue)results["Average Average Solution Similarity"].Value).Value = avgAvgSimilarity;
     168
    150169        if (!results.ContainsKey("Average Maximum Solution Similarity"))
    151170          results.Add(new Result("Average Maximum Solution Similarity", new DoubleValue(avgMaxSimilarity)));
     
    155174        // store population similarity data table
    156175        DataTable similarityDataTable;
    157         if (!results.ContainsKey("Population Similarity")) {
    158           similarityDataTable = new DataTable("Population Similarity");
    159           results.Add(new Result("Population Similarity", similarityDataTable));
     176        if (!results.ContainsKey("Average Solution Similarity")) {
     177          similarityDataTable = new DataTable("Average Solution Similarity");
     178          results.Add(new Result("Average Solution Similarity", similarityDataTable));
    160179          DataRowVisualProperties visualProperties = new DataRowVisualProperties();
    161180          visualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Line;
    162181          visualProperties.StartIndexZero = true;
    163182          similarityDataTable.Rows.Add(new DataRow("Average Population Similarity", null, visualProperties));
     183          similarityDataTable.Rows.Add(new DataRow("Average Minimum Solution Similarity", null, visualProperties));
     184          similarityDataTable.Rows.Add(new DataRow("Average Average Solution Similarity", null, visualProperties));
    164185          similarityDataTable.Rows.Add(new DataRow("Average Maximum Solution Similarity", null, visualProperties));
    165186        } else {
    166           similarityDataTable = (DataTable)results["Population Similarity"].Value;
     187          similarityDataTable = (DataTable)results["Average Solution Similarity"].Value;
    167188        }
    168189        similarityDataTable.Rows["Average Population Similarity"].Values.Add(avgSimilarity);
     190        similarityDataTable.Rows["Average Minimum Solution Similarity"].Values.Add(avgMinSimilarity);
     191        similarityDataTable.Rows["Average Average Solution Similarity"].Values.Add(avgAvgSimilarity);
    169192        similarityDataTable.Rows["Average Maximum Solution Similarity"].Values.Add(avgMaxSimilarity);
    170193
    171194        // store maximum similarities
    172         DataTable maxSimilaritiesDataTable = new DataTable("Maximum Solution Similarities");
    173         maxSimilaritiesDataTable.Rows.Add(new DataRow("Maximum Solution Similarity"));
    174         maxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Columns;
    175         maxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].Values.AddRange(maxSimilarities);
    176         if (!results.ContainsKey("Maximum Solution Similarities")) {
    177           results.Add(new Result("Maximum Solution Similarities", maxSimilaritiesDataTable));
     195        DataTable minAvgMaxSimilaritiesDataTable = new DataTable("Minimum/Average/Maximum Solution Similarities");
     196        minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Minimum Solution Similarity"));
     197        minAvgMaxSimilaritiesDataTable.Rows["Minimum Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Columns;
     198        minAvgMaxSimilaritiesDataTable.Rows["Minimum Solution Similarity"].Values.AddRange(minSimilarities);
     199        minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Average Solution Similarity"));
     200        minAvgMaxSimilaritiesDataTable.Rows["Average Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Columns;
     201        minAvgMaxSimilaritiesDataTable.Rows["Average Solution Similarity"].Values.AddRange(avgSimilarities);
     202        minAvgMaxSimilaritiesDataTable.Rows.Add(new DataRow("Maximum Solution Similarity"));
     203        minAvgMaxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Columns;
     204        minAvgMaxSimilaritiesDataTable.Rows["Maximum Solution Similarity"].Values.AddRange(maxSimilarities);
     205        if (!results.ContainsKey("Minimum/Average/Maximum Solution Similarities")) {
     206          results.Add(new Result("Minimum/Average/Maximum Solution Similarities", minAvgMaxSimilaritiesDataTable));
    178207        } else {
    179           results["Maximum Solution Similarities"].Value = maxSimilaritiesDataTable;
     208          results["Minimum/Average/Maximum Solution Similarities"].Value = minAvgMaxSimilaritiesDataTable;
    180209        }
    181210
    182211        // store maximum similarities history
    183212        if (storeHistory) {
    184           if (!results.ContainsKey("Maximum Solution Similarities History")) {
     213          if (!results.ContainsKey("Minimum/Average/Maximum Solution Similarities History")) {
    185214            DataTableHistory history = new DataTableHistory();
    186             history.Add(maxSimilaritiesDataTable);
    187             results.Add(new Result("Maximum Solution Similarities History", history));
     215            history.Add(minAvgMaxSimilaritiesDataTable);
     216            results.Add(new Result("Minimum/Average/Maximum Solution Similarities History", history));
    188217          } else {
    189             ((DataTableHistory)results["Maximum Solution Similarities History"].Value).Add(maxSimilaritiesDataTable);
     218            ((DataTableHistory)results["Minimum/Average/Maximum Solution Similarities History"].Value).Add(minAvgMaxSimilaritiesDataTable);
    190219          }
    191220        }
  • trunk/sources/HeuristicLab.Core.Views/3.3/MovieView.Designer.cs

    r4641 r4715  
    4949      this.components = new System.ComponentModel.Container();
    5050      this.itemsGroupBox = new System.Windows.Forms.GroupBox();
     51      this.indexLabel = new System.Windows.Forms.Label();
     52      this.delayComboBox = new System.Windows.Forms.ComboBox();
    5153      this.stopButton = new System.Windows.Forms.Button();
     54      this.nextButton = new System.Windows.Forms.Button();
    5255      this.lastButton = new System.Windows.Forms.Button();
    5356      this.playButton = new System.Windows.Forms.Button();
     57      this.previousButton = new System.Windows.Forms.Button();
    5458      this.firstButton = new System.Windows.Forms.Button();
    5559      this.maximumLabel = new System.Windows.Forms.Label();
    56       this.indexLabel = new System.Windows.Forms.Label();
    5760      this.minimumLabel = new System.Windows.Forms.Label();
    5861      this.trackBar = new System.Windows.Forms.TrackBar();
     
    6972                  | System.Windows.Forms.AnchorStyles.Left)
    7073                  | System.Windows.Forms.AnchorStyles.Right)));
     74      this.itemsGroupBox.Controls.Add(this.indexLabel);
     75      this.itemsGroupBox.Controls.Add(this.delayComboBox);
    7176      this.itemsGroupBox.Controls.Add(this.stopButton);
     77      this.itemsGroupBox.Controls.Add(this.nextButton);
    7278      this.itemsGroupBox.Controls.Add(this.lastButton);
    7379      this.itemsGroupBox.Controls.Add(this.playButton);
     80      this.itemsGroupBox.Controls.Add(this.previousButton);
    7481      this.itemsGroupBox.Controls.Add(this.firstButton);
    7582      this.itemsGroupBox.Controls.Add(this.maximumLabel);
    76       this.itemsGroupBox.Controls.Add(this.indexLabel);
    7783      this.itemsGroupBox.Controls.Add(this.minimumLabel);
    7884      this.itemsGroupBox.Controls.Add(this.trackBar);
     
    8591      this.itemsGroupBox.Text = "Items";
    8692      //
     93      // indexLabel
     94      //
     95      this.indexLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     96                  | System.Windows.Forms.AnchorStyles.Right)));
     97      this.indexLabel.Location = new System.Drawing.Point(173, 364);
     98      this.indexLabel.Name = "indexLabel";
     99      this.indexLabel.Size = new System.Drawing.Size(186, 13);
     100      this.indexLabel.TabIndex = 9;
     101      this.indexLabel.Text = "0";
     102      this.indexLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     103      //
     104      // delayComboBox
     105      //
     106      this.delayComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     107      this.delayComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     108      this.delayComboBox.FormattingEnabled = true;
     109      this.delayComboBox.Location = new System.Drawing.Point(472, 355);
     110      this.delayComboBox.Name = "delayComboBox";
     111      this.delayComboBox.Size = new System.Drawing.Size(54, 21);
     112      this.delayComboBox.TabIndex = 11;
     113      this.toolTip.SetToolTip(this.delayComboBox, "Visualization Delay");
     114      this.delayComboBox.SelectedIndexChanged += new System.EventHandler(this.delayComboBox_SelectedIndexChanged);
     115      //
    87116      // stopButton
    88117      //
    89       this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     118      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    90119      this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop;
    91       this.stopButton.Location = new System.Drawing.Point(502, 355);
     120      this.stopButton.Location = new System.Drawing.Point(36, 355);
    92121      this.stopButton.Name = "stopButton";
    93122      this.stopButton.Size = new System.Drawing.Size(24, 24);
    94       this.stopButton.TabIndex = 5;
     123      this.stopButton.TabIndex = 7;
    95124      this.toolTip.SetToolTip(this.stopButton, "Stop");
    96125      this.stopButton.UseVisualStyleBackColor = true;
    97126      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
     127      //
     128      // nextButton
     129      //
     130      this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     131      this.nextButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.MoveNext;
     132      this.nextButton.Location = new System.Drawing.Point(472, 325);
     133      this.nextButton.Name = "nextButton";
     134      this.nextButton.Size = new System.Drawing.Size(24, 24);
     135      this.nextButton.TabIndex = 4;
     136      this.nextButton.UseVisualStyleBackColor = true;
     137      this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
    98138      //
    99139      // lastButton
     
    104144      this.lastButton.Name = "lastButton";
    105145      this.lastButton.Size = new System.Drawing.Size(24, 24);
    106       this.lastButton.TabIndex = 3;
     146      this.lastButton.TabIndex = 5;
    107147      this.toolTip.SetToolTip(this.lastButton, "Move to Last");
    108148      this.lastButton.UseVisualStyleBackColor = true;
     
    116156      this.playButton.Name = "playButton";
    117157      this.playButton.Size = new System.Drawing.Size(24, 24);
    118       this.playButton.TabIndex = 4;
     158      this.playButton.TabIndex = 6;
    119159      this.toolTip.SetToolTip(this.playButton, "Play");
    120160      this.playButton.UseVisualStyleBackColor = true;
    121161      this.playButton.Click += new System.EventHandler(this.playButton_Click);
     162      //
     163      // previousButton
     164      //
     165      this.previousButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     166      this.previousButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.MovePrevious;
     167      this.previousButton.Location = new System.Drawing.Point(36, 325);
     168      this.previousButton.Name = "previousButton";
     169      this.previousButton.Size = new System.Drawing.Size(24, 24);
     170      this.previousButton.TabIndex = 2;
     171      this.previousButton.UseVisualStyleBackColor = true;
     172      this.previousButton.Click += new System.EventHandler(this.previousButton_Click);
    122173      //
    123174      // firstButton
     
    136187      //
    137188      this.maximumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    138       this.maximumLabel.Location = new System.Drawing.Point(388, 364);
     189      this.maximumLabel.Location = new System.Drawing.Point(351, 364);
    139190      this.maximumLabel.Name = "maximumLabel";
    140191      this.maximumLabel.Size = new System.Drawing.Size(108, 13);
    141       this.maximumLabel.TabIndex = 8;
     192      this.maximumLabel.TabIndex = 10;
    142193      this.maximumLabel.Text = "10";
    143194      this.maximumLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
    144195      //
    145       // indexLabel
    146       //
    147       this.indexLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
    148                   | System.Windows.Forms.AnchorStyles.Right)));
    149       this.indexLabel.Location = new System.Drawing.Point(173, 364);
    150       this.indexLabel.Name = "indexLabel";
    151       this.indexLabel.Size = new System.Drawing.Size(186, 13);
    152       this.indexLabel.TabIndex = 7;
    153       this.indexLabel.Text = "0";
    154       this.indexLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    155       //
    156196      // minimumLabel
    157197      //
    158198      this.minimumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
    159       this.minimumLabel.Location = new System.Drawing.Point(36, 364);
     199      this.minimumLabel.Location = new System.Drawing.Point(73, 364);
    160200      this.minimumLabel.Name = "minimumLabel";
    161201      this.minimumLabel.Size = new System.Drawing.Size(38, 13);
    162       this.minimumLabel.TabIndex = 6;
     202      this.minimumLabel.TabIndex = 8;
    163203      this.minimumLabel.Text = "0";
    164204      this.minimumLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     
    169209                  | System.Windows.Forms.AnchorStyles.Right)));
    170210      this.trackBar.LargeChange = 1;
    171       this.trackBar.Location = new System.Drawing.Point(36, 316);
     211      this.trackBar.Location = new System.Drawing.Point(66, 316);
    172212      this.trackBar.Name = "trackBar";
    173       this.trackBar.Size = new System.Drawing.Size(460, 45);
    174       this.trackBar.TabIndex = 2;
     213      this.trackBar.Size = new System.Drawing.Size(400, 45);
     214      this.trackBar.TabIndex = 3;
    175215      this.trackBar.TickStyle = System.Windows.Forms.TickStyle.Both;
    176216      this.trackBar.ValueChanged += new System.EventHandler(this.trackBar_ValueChanged);
     
    224264    protected Label minimumLabel;
    225265    protected System.ComponentModel.BackgroundWorker backgroundWorker;
     266    protected Button nextButton;
     267    protected Button previousButton;
     268    protected ComboBox delayComboBox;
    226269  }
    227270}
  • trunk/sources/HeuristicLab.Core.Views/3.3/MovieView.cs

    r4641 r4715  
    3131  [View("Movie View")]
    3232  public partial class MovieView<T> : ItemView where T : class, IItem {
     33    #region Delay
     34    protected class Delay {
     35      public string Text { get; private set; }
     36      public int Milliseconds { get; private set; }
     37
     38      public Delay(string text, int milliseconds) {
     39        Text = text;
     40        Milliseconds = milliseconds;
     41      }
     42
     43      public override string ToString() {
     44        return Text;
     45      }
     46    }
     47    #endregion
     48
     49    protected int delay;
     50
    3351    public new IItemCollection<T> Content {
    3452      get { return (IItemCollection<T>)base.Content; }
     
    3856    public MovieView() {
    3957      InitializeComponent();
     58
     59      delayComboBox.Items.Add(new Delay("5s", 5000));
     60      delayComboBox.Items.Add(new Delay("2s", 2000));
     61      delayComboBox.Items.Add(new Delay("1s", 1000));
     62      delayComboBox.Items.Add(new Delay("0.5s", 500));
     63      delayComboBox.Items.Add(new Delay("0.1s", 100));
     64      delayComboBox.Items.Add(new Delay("0.05s", 50));
     65      delayComboBox.Items.Add(new Delay("0.01s", 10));
     66      delayComboBox.SelectedIndex = 4;
     67      delay = 100;
    4068    }
    4169
     
    7098    protected override void SetEnabledStateOfControls() {
    7199      base.SetEnabledStateOfControls();
    72       firstButton.Enabled = (Content != null) && (Content.Count > 0) && (!backgroundWorker.IsBusy);
     100      firstButton.Enabled = (Content != null) && (Content.Count > 0) && (trackBar.Value != trackBar.Minimum) && (!backgroundWorker.IsBusy);
     101      previousButton.Enabled = (Content != null) && (Content.Count > 0) && (trackBar.Value != trackBar.Minimum) && (!backgroundWorker.IsBusy);
    73102      trackBar.Enabled = (Content != null) && (Content.Count > 0) && (!backgroundWorker.IsBusy);
    74       lastButton.Enabled = (Content != null) && (Content.Count > 0) && (!backgroundWorker.IsBusy);
     103      nextButton.Enabled = (Content != null) && (Content.Count > 0) && (trackBar.Value != trackBar.Maximum) && (!backgroundWorker.IsBusy);
     104      lastButton.Enabled = (Content != null) && (Content.Count > 0) && (trackBar.Value != trackBar.Maximum) && (!backgroundWorker.IsBusy);
    75105      playButton.Enabled = (Content != null) && (Content.Count > 0) && (!backgroundWorker.IsBusy);
    76106      stopButton.Enabled = (Content != null) && (backgroundWorker.IsBusy);
     107      delayComboBox.Enabled = (Content != null) && (Content.Count > 0);
    77108    }
    78109
     
    89120        trackBar.Maximum = Content.Count - 1;
    90121        maximumLabel.Text = trackBar.Maximum.ToString();
    91         if (viewHost.Content == null) {
    92           viewHost.Content = Content.FirstOrDefault();
    93           SetEnabledStateOfControls();
    94         }
     122        if (viewHost.Content == null) viewHost.Content = Content.FirstOrDefault();
     123        SetEnabledStateOfControls();
    95124      }
    96125    }
     
    105134          viewHost.Content = Content.FirstOrDefault();
    106135          UpdateLables();
    107           SetEnabledStateOfControls();
    108136        }
     137        SetEnabledStateOfControls();
    109138      }
    110139    }
     
    124153    #region Control Events
    125154    protected virtual void trackBar_ValueChanged(object sender, EventArgs e) {
     155      viewHost.Content = Content == null ? null : Content.ElementAtOrDefault(trackBar.Value);
    126156      indexLabel.Text = trackBar.Value.ToString();
    127       viewHost.Content = Content == null ? null : Content.ElementAtOrDefault(trackBar.Value);
     157      SetEnabledStateOfControls();
    128158    }
    129159    protected virtual void firstButton_Click(object sender, EventArgs e) {
    130       trackBar.Value = trackBar.Minimum;
     160      if (trackBar.Value != trackBar.Minimum) trackBar.Value = trackBar.Minimum;
     161    }
     162    protected virtual void previousButton_Click(object sender, EventArgs e) {
     163      if (trackBar.Value != trackBar.Minimum) trackBar.Value--;
     164    }
     165    protected virtual void nextButton_Click(object sender, EventArgs e) {
     166      if (trackBar.Value != trackBar.Maximum) trackBar.Value++;
    131167    }
    132168    protected virtual void lastButton_Click(object sender, EventArgs e) {
    133       trackBar.Value = trackBar.Maximum;
     169      if (trackBar.Value != trackBar.Maximum) trackBar.Value = trackBar.Maximum;
    134170    }
    135171    protected virtual void playButton_Click(object sender, EventArgs e) {
    136172      firstButton.Enabled = false;
     173      previousButton.Enabled = false;
    137174      trackBar.Enabled = false;
     175      nextButton.Enabled = false;
    138176      lastButton.Enabled = false;
    139177      playButton.Enabled = false;
     
    142180    }
    143181    protected virtual void stopButton_Click(object sender, EventArgs e) {
     182      stopButton.Enabled = false;
    144183      backgroundWorker.CancelAsync();
     184    }
     185    protected virtual void delayComboBox_SelectedIndexChanged(object sender, EventArgs e) {
     186      Delay selected = delayComboBox.SelectedItem as Delay;
     187      if (selected != null) delay = selected.Milliseconds;
    145188    }
    146189    #endregion
     
    154197          terminate = trackBar.Value == trackBar.Maximum;
    155198        });
    156         Thread.Sleep(100);
     199        Thread.Sleep(delay);
    157200      }
    158201    }
    159202    protected virtual void backgroundWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e) {
    160203      firstButton.Enabled = true;
     204      previousButton.Enabled = true;
    161205      trackBar.Enabled = true;
     206      nextButton.Enabled = true;
    162207      lastButton.Enabled = true;
    163208      playButton.Enabled = true;
  • trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.cs

    r3775 r4715  
    7575    protected override ListViewItem CreateListViewItem(T item) {
    7676      ListViewItem listViewItem = base.CreateListViewItem(item);
    77       listViewItem.ToolTipText = item.ItemName + ": " + item.Description;
     77      listViewItem.ToolTipText = string.IsNullOrEmpty(item.Description) ? item.ItemName : item.ItemName + ": " + item.Description;
    7878      return listViewItem;
    7979    }
Note: See TracChangeset for help on using the changeset viewer.