Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/08/11 13:18:49 (13 years ago)
Author:
sforsten
Message:

#1669: First version which can automatically generate data for some problems from http://www.vanillamodeling.com/

Location:
branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.Designer.cs

    r5832 r6968  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.ImportButton = new System.Windows.Forms.Button();
     47      this.importButton = new System.Windows.Forms.Button();
    4848      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
     49      this.benchmarkComboBox = new System.Windows.Forms.ComboBox();
     50      this.loadButton = new System.Windows.Forms.Button();
    4951      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5052      this.SuspendLayout();
     
    6668      this.infoLabel.Location = new System.Drawing.Point(474, 3);
    6769      //
    68       // ImportButton
     70      // importButton
    6971      //
    70       this.ImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    71                   | System.Windows.Forms.AnchorStyles.Right)));
    72       this.ImportButton.Location = new System.Drawing.Point(0, 26);
    73       this.ImportButton.Name = "ImportButton";
    74       this.ImportButton.Size = new System.Drawing.Size(493, 23);
    75       this.ImportButton.TabIndex = 3;
    76       this.ImportButton.Text = "Import from CSV file";
    77       this.ImportButton.UseVisualStyleBackColor = true;
    78       this.ImportButton.Click += new System.EventHandler(this.ImportButton_Click);
     72      this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     73            | System.Windows.Forms.AnchorStyles.Right)));
     74      this.importButton.Location = new System.Drawing.Point(3, 24);
     75      this.importButton.Name = "importButton";
     76      this.importButton.Size = new System.Drawing.Size(243, 23);
     77      this.importButton.TabIndex = 3;
     78      this.importButton.Text = "Import from CSV file";
     79      this.importButton.UseVisualStyleBackColor = true;
     80      this.importButton.Click += new System.EventHandler(this.ImportButton_Click);
    7981      //
    8082      // openFileDialog
     
    8284      this.openFileDialog.FileName = "openFileDialog";
    8385      //
     86      // benchmarkComboBox
     87      //
     88      this.benchmarkComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     89      this.benchmarkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     90      this.benchmarkComboBox.FormattingEnabled = true;
     91      this.benchmarkComboBox.Location = new System.Drawing.Point(252, 25);
     92      this.benchmarkComboBox.Name = "benchmarkComboBox";
     93      this.benchmarkComboBox.Size = new System.Drawing.Size(183, 21);
     94      this.benchmarkComboBox.TabIndex = 5;
     95      //
     96      // loadButton
     97      //
     98      this.loadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     99      this.loadButton.Location = new System.Drawing.Point(439, 24);
     100      this.loadButton.Name = "loadButton";
     101      this.loadButton.Size = new System.Drawing.Size(50, 23);
     102      this.loadButton.TabIndex = 6;
     103      this.loadButton.Text = "Load";
     104      this.loadButton.UseVisualStyleBackColor = true;
     105      this.loadButton.Click += new System.EventHandler(this.loadButton_Click);
     106      //
    84107      // DataAnalysisProblemView
    85108      //
    86109      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    87110      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    88       this.Controls.Add(this.ImportButton);
     111      this.Controls.Add(this.loadButton);
     112      this.Controls.Add(this.importButton);
     113      this.Controls.Add(this.benchmarkComboBox);
    89114      this.Name = "DataAnalysisProblemView";
    90115      this.Size = new System.Drawing.Size(493, 334);
    91       this.Controls.SetChildIndex(this.ImportButton, 0);
     116      this.Controls.SetChildIndex(this.benchmarkComboBox, 0);
     117      this.Controls.SetChildIndex(this.importButton, 0);
     118      this.Controls.SetChildIndex(this.loadButton, 0);
    92119      this.Controls.SetChildIndex(this.infoLabel, 0);
    93120      this.Controls.SetChildIndex(this.nameTextBox, 0);
     
    102129    #endregion
    103130
    104     private System.Windows.Forms.Button ImportButton;
     131    private System.Windows.Forms.Button importButton;
    105132    private System.Windows.Forms.OpenFileDialog openFileDialog;
     133    private System.Windows.Forms.ComboBox benchmarkComboBox;
     134    private System.Windows.Forms.Button loadButton;
    106135  }
    107136}
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/DataAnalysisProblemView.cs

    r5834 r6968  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Windows.Forms;
    2425using HeuristicLab.MainForm;
     
    4142    protected override void SetEnabledStateOfControls() {
    4243      base.SetEnabledStateOfControls();
    43       ImportButton.Enabled = !Locked && !ReadOnly && Content != null;
     44      importButton.Enabled = !Locked && !ReadOnly && Content != null;
    4445    }
    4546
     
    5455      }
    5556    }
     57
     58    private void loadButton_Click(object sender, EventArgs e) {
     59      if (benchmarkComboBox.SelectedItem != null)
     60        Content.CreateProblemDataFromBenchmark((IDataAnalysisBenchmarkProblemDataGenerator)benchmarkComboBox.SelectedItem);
     61    }
     62
     63    protected override void OnContentChanged() {
     64      base.OnContentChanged();
     65      benchmarkComboBox.Items.Clear();
     66      benchmarkComboBox.Items.AddRange(Content.GetBenchmarkProblemDataGenerators().OrderBy(b => b.ItemName).ToArray());
     67      if (benchmarkComboBox.Items.Count > 0)
     68        benchmarkComboBox.SelectedIndex = 0;
     69    }
    5670  }
    5771}
  • branches/RegressionBenchmarks/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r6866 r6968  
    9393  </PropertyGroup>
    9494  <ItemGroup>
     95    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    9596    <Reference Include="System" />
    9697    <Reference Include="System.Core">
     
    328329      <Private>False</Private>
    329330    </ProjectReference>
     331    <ProjectReference Include="..\..\HeuristicLab.DebugEngine\3.3\HeuristicLab.DebugEngine-3.3.csproj">
     332      <Project>{49F28045-7B5F-411B-8D59-16C846FA26E0}</Project>
     333      <Name>HeuristicLab.DebugEngine-3.3</Name>
     334    </ProjectReference>
    330335    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
    331336      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
     
    396401    </BootstrapperPackage>
    397402  </ItemGroup>
     403  <ItemGroup>
     404    <EmbeddedResource Include="DataAnalysisProblemView.resx">
     405      <DependentUpon>DataAnalysisProblemView.cs</DependentUpon>
     406    </EmbeddedResource>
     407  </ItemGroup>
    398408  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    399409  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset for help on using the changeset viewer.