using System; using System.Windows.Forms; using HeuristicLab.MainForm; using HeuristicLab.PluginInfrastructure; #region License Information /* HeuristicLab * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion namespace HeuristicLab.BenchmarkGenerator { [Plugin("HeuristicLab.BenchmarkGenerator", "1.0.0")] [PluginFile("HeuristicLab.BenchmarkGenerator.dll", PluginFileType.Assembly)] [PluginDependency("HeuristicLab.Analysis", "3.3")] [PluginDependency("HeuristicLab.Analysis.Views", "3.3")] [PluginDependency("HeuristicLab.Collections", "3.3")] [PluginDependency("HeuristicLab.Common", "3.3")] [PluginDependency("HeuristicLab.Core", "3.3")] [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] [PluginDependency("HeuristicLab.Random", "3.3")] [PluginDependency("HeuristicLab.Persistence", "3.3")] [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")] public class BenchmarkGeneratorPlugin : PluginBase { } [Application("Benchmark Generator", "HeuristicLab BenchmarkGenerator 1.0.0.9999")] internal class HeuristicLabBenchmarkGeneratorApplication : ApplicationBase { private BenchmarkGenerator generator; public override void Run(ICommandLineArgument[] args) { generator = new BenchmarkGenerator(); var form = new BenchmarkGeneratorForm(typeof(IUserInterfaceItem)); form.GenerateButtonClicked += Generate; Application.Run(form); } private void Generate(object sender, EventArgs e) { var form = (BenchmarkGeneratorForm)sender; var table = generator.GenerateDataset(form.FormulaText, form.Samples); form.ViewHost.Content = table; // form.Dataset = table; } } }