Free cookie consent management tool by TermsFeed Policy Generator

source: branches/Benchmark Generator/HeuristicLab.BenchmarkGenerator/3.3/Plugin.cs @ 11290

Last change on this file since 11290 was 10088, checked in by bburlacu, 11 years ago

#2083: Removed old project and rewritten the Benchmark Generator as a HeuristicLab plugin. Added new functions and visualization capability.

File size: 2.4 KB
Line 
1using System;
2using System.Windows.Forms;
3using HeuristicLab.MainForm;
4using HeuristicLab.PluginInfrastructure;
5
6#region License Information
7/* HeuristicLab
8 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
9 *
10 * This file is part of HeuristicLab.
11 *
12 * HeuristicLab is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * HeuristicLab is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
24 */
25#endregion
26
27namespace HeuristicLab.BenchmarkGenerator {
28  [Plugin("HeuristicLab.BenchmarkGenerator", "1.0.0")]
29  [PluginFile("HeuristicLab.BenchmarkGenerator.dll", PluginFileType.Assembly)]
30  [PluginDependency("HeuristicLab.Analysis", "3.3")]
31  [PluginDependency("HeuristicLab.Analysis.Views", "3.3")]
32  [PluginDependency("HeuristicLab.Collections", "3.3")]
33  [PluginDependency("HeuristicLab.Common", "3.3")]
34  [PluginDependency("HeuristicLab.Core", "3.3")]
35  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
36  [PluginDependency("HeuristicLab.Random", "3.3")]
37  [PluginDependency("HeuristicLab.Persistence", "3.3")]
38  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
39  public class BenchmarkGeneratorPlugin : PluginBase {
40  }
41
42  [Application("Benchmark Generator", "HeuristicLab BenchmarkGenerator 1.0.0.9999")]
43  internal class HeuristicLabBenchmarkGeneratorApplication : ApplicationBase {
44    private BenchmarkGenerator generator;
45
46    public override void Run(ICommandLineArgument[] args) {
47      generator = new BenchmarkGenerator();
48      var form = new BenchmarkGeneratorForm(typeof(IUserInterfaceItem));
49      form.GenerateButtonClicked += Generate;
50      Application.Run(form);
51    }
52
53    private void Generate(object sender, EventArgs e) {
54      var form = (BenchmarkGeneratorForm)sender;
55      var table = generator.GenerateDataset(form.FormulaText, form.Samples);
56      form.ViewHost.Content = table;
57      //      form.Dataset = table;
58    }
59  }
60}
Note: See TracBrowser for help on using the repository browser.