Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7665


Ignore:
Timestamp:
03/27/12 13:31:44 (12 years ago)
Author:
sforsten
Message:

#1784:

  • minor bug fixes in several views
Location:
branches/ProblemInstancesRegressionAndClassification
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification

    • Property svn:ignore
      •  

        old new  
        33protoc.exe
        44ProtoGen.exe
         5bin
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab 3.3.sln

    r7664 r7665  
    2020Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Optimization.Views-3.3", "HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj", "{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}"
    2121EndProject
    22 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.Views-3.4", "HeuristicLab.Problems.Instances.Views\3.4\HeuristicLab.Problems.Instances.Views-3.4.csproj", "{1BFDCC58-E228-46DE-A36E-8503194B434D}"
     22Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.Views-3.4", "HeuristicLab.Problems.Instances.Views\3.4\HeuristicLab.Problems.Instances.Views-3.4.csproj", "{B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}"
    2323EndProject
    2424Global
     
    122122    {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x86.ActiveCfg = Release|x86
    123123    {662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}.Release|x86.Build.0 = Release|x86
    124     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|Any CPU.ActiveCfg = Debug|x86
    125     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
    126     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|Mixed Platforms.Build.0 = Debug|x86
    127     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|x64.ActiveCfg = Debug|x86
    128     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|x86.ActiveCfg = Debug|x86
    129     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Debug|x86.Build.0 = Debug|x86
    130     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|Any CPU.ActiveCfg = Release|Any CPU
    131     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|Any CPU.Build.0 = Release|Any CPU
    132     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|Mixed Platforms.ActiveCfg = Release|x86
    133     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|Mixed Platforms.Build.0 = Release|x86
    134     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|x64.ActiveCfg = Release|x86
    135     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|x86.ActiveCfg = Release|x86
    136     {1BFDCC58-E228-46DE-A36E-8503194B434D}.Release|x86.Build.0 = Release|x86
     124    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     125    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
     126    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     127    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
     128    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|x64.ActiveCfg = Debug|Any CPU
     129    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Debug|x86.ActiveCfg = Debug|Any CPU
     130    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
     131    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|Any CPU.Build.0 = Release|Any CPU
     132    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     133    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
     134    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|x64.ActiveCfg = Release|Any CPU
     135    {B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}.Release|x86.ActiveCfg = Release|Any CPU
    137136  EndGlobalSection
    138137  GlobalSection(SolutionProperties) = preSolution
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj

    r7664 r7665  
    325325  <ItemGroup>
    326326    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.Views\3.4\HeuristicLab.Problems.Instances.Views-3.4.csproj">
    327       <Project>{1BFDCC58-E228-46DE-A36E-8503194B434D}</Project>
     327      <Project>{B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}</Project>
    328328      <Name>HeuristicLab.Problems.Instances.Views-3.4</Name>
    329329    </ProjectReference>
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.cs

    r7664 r7665  
    3232namespace HeuristicLab.Optimization.Views {
    3333  [View("ProblemInstanceProviderView")]
    34   [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = true)]
     34  [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = false)]
    3535  public partial class ProblemInstanceProviderView<T> : AsynchronousContentView {
    3636
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemView.Designer.cs

    r7664 r7665  
    7676      // problemInstanceSplitContainer
    7777      //
    78       this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    79                   | System.Windows.Forms.AnchorStyles.Left)
    80                   | System.Windows.Forms.AnchorStyles.Right)));
     78      this.problemInstanceSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     79            | System.Windows.Forms.AnchorStyles.Left)
     80            | System.Windows.Forms.AnchorStyles.Right)));
    8181      this.problemInstanceSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
    8282      this.problemInstanceSplitContainer.IsSplitterFixed = true;
     
    102102      // problemInstanceConsumerView
    103103      //
    104       this.problemInstanceConsumerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    105                   | System.Windows.Forms.AnchorStyles.Left)
    106                   | System.Windows.Forms.AnchorStyles.Right)));
     104      this.problemInstanceConsumerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
     105            | System.Windows.Forms.AnchorStyles.Left)
     106            | System.Windows.Forms.AnchorStyles.Right)));
    107107      this.problemInstanceConsumerView.Caption = "ProblemInstanceProviderView";
    108108      this.problemInstanceConsumerView.Content = null;
    109       this.problemInstanceConsumerView.Location = new System.Drawing.Point(0, 0);
     109      this.problemInstanceConsumerView.Location = new System.Drawing.Point(0, 1);
    110110      this.problemInstanceConsumerView.Name = "problemInstanceConsumerView";
    111111      this.problemInstanceConsumerView.ReadOnly = false;
    112       this.problemInstanceConsumerView.Size = new System.Drawing.Size(511, 25);
     112      this.problemInstanceConsumerView.Size = new System.Drawing.Size(511, 23);
    113113      this.problemInstanceConsumerView.TabIndex = 0;
    114114      //
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/ProblemView.cs

    r7664 r7665  
    2020#endregion
    2121
     22using System.Linq;
    2223using System.Windows.Forms;
    2324using HeuristicLab.Core.Views;
     
    4647    protected override void OnContentChanged() {
    4748      base.OnContentChanged();
    48       //Check if IProblem implements IProblemInstancesConsumer interface
    49       problemInstanceConsumerView.Content = (IProblemInstanceConsumer)Content;
    50       problemInstanceSplitContainer.Panel1Collapsed = !problemInstanceConsumerView.ContainsProviders();
     49      if (Content != null && CheckForIProblemInstanceConsumer(Content)) {
     50        problemInstanceConsumerView.Content = (IProblemInstanceConsumer)Content;
     51        problemInstanceSplitContainer.Panel1Collapsed = !problemInstanceConsumerView.ContainsProviders();
     52      } else {
     53        problemInstanceSplitContainer.Panel1Collapsed = true;
     54      }
    5155      SetEnabledStateOfControls();
    5256    }
    5357
    54     protected override void SetEnabledStateOfControls() {
    55       base.SetEnabledStateOfControls();
     58    protected bool CheckForIProblemInstanceConsumer(IProblem Content) {
     59      return Content.GetType().GetInterfaces().Any(x => x.IsInterface && x.Equals(typeof(IProblemInstanceConsumer)));
    5660    }
    5761  }
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Views/3.4

    • Property svn:ignore
      •  

        old new  
        55*.vs10x
        66Plugin.cs
         7Service References
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4/HeuristicLab.Problems.Instances.Regression.Views-3.4.csproj

    r7664 r7665  
    7676  </ItemGroup>
    7777  <ItemGroup>
    78     <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
    79       <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
    80       <Name>HeuristicLab.Optimization.Views-3.3</Name>
    81     </ProjectReference>
    8278    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.Regression\3.4\HeuristicLab.Problems.Instances.Regression-3.4.csproj">
    8379      <Project>{26BF13E1-C8B2-4ACE-862D-EBFD360116B3}</Project>
    8480      <Name>HeuristicLab.Problems.Instances.Regression-3.4</Name>
     81    </ProjectReference>
     82    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances.Views\3.4\HeuristicLab.Problems.Instances.Views-3.4.csproj">
     83      <Project>{B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}</Project>
     84      <Name>HeuristicLab.Problems.Instances.Views-3.4</Name>
    8585    </ProjectReference>
    8686    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4/Properties/AssemblyInfo.cs

    r7664 r7665  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.4.0.0")]
    57 [assembly: AssemblyFileVersion("3.4.0.7610")]
     57[assembly: AssemblyFileVersion("3.4.0.7664")]
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression.Views/3.4/RegressionInstanceProviderView.cs

    r7603 r7665  
    2222using System.Windows.Forms;
    2323using HeuristicLab.MainForm;
    24 using HeuristicLab.Optimization.Views;
     24using HeuristicLab.Problems.Instances.Views;
    2525
    2626namespace HeuristicLab.Problems.Instances.Regression.Views {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Properties/AssemblyInfo.cs

    r7664 r7665  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.4.0.0")]
    57 [assembly: AssemblyFileVersion("3.4.0.7610")]
     57[assembly: AssemblyFileVersion("3.4.0.7664")]
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4

    • Property svn:ignore set to
      bin
      HeuristicLab.Problems.Instances.Views-3.4.csproj.user
      obj
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/HeuristicLab.Problems.Instances.Views-3.4.csproj

    r7664 r7665  
    33  <PropertyGroup>
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    5     <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
     5    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    66    <ProductVersion>8.0.30703</ProductVersion>
    77    <SchemaVersion>2.0</SchemaVersion>
    8     <ProjectGuid>{1BFDCC58-E228-46DE-A36E-8503194B434D}</ProjectGuid>
     8    <ProjectGuid>{B1BA398F-953F-4C3A-B07B-1E5E17A27DD9}</ProjectGuid>
    99    <OutputType>Library</OutputType>
    1010    <AppDesignerFolder>Properties</AppDesignerFolder>
     
    1212    <AssemblyName>HeuristicLab.Problems.Instances.Views-3.4</AssemblyName>
    1313    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    14     <TargetFrameworkProfile>
    15     </TargetFrameworkProfile>
    1614    <FileAlignment>512</FileAlignment>
    1715  </PropertyGroup>
    18   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    19     <PlatformTarget>x86</PlatformTarget>
     16  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    2017    <DebugSymbols>true</DebugSymbols>
    2118    <DebugType>full</DebugType>
     
    2623    <WarningLevel>4</WarningLevel>
    2724  </PropertyGroup>
    28   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    29     <PlatformTarget>x86</PlatformTarget>
     25  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    3026    <DebugType>pdbonly</DebugType>
    3127    <Optimize>true</Optimize>
     
    4137    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
    4238  </PropertyGroup>
    43   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    44     <PlatformTarget>AnyCPU</PlatformTarget>
    45     <OutputPath>bin\Debug\</OutputPath>
    46   </PropertyGroup>
    47   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    48     <PlatformTarget>AnyCPU</PlatformTarget>
    49     <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    50   </PropertyGroup>
    51   <PropertyGroup>
    52     <StartupObject />
    53   </PropertyGroup>
    5439  <ItemGroup>
    5540    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    56     <Reference Include="HeuristicLab.Common.Resources-3.3">
    57       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
    58     </Reference>
    59     <Reference Include="HeuristicLab.MainForm-3.3">
    60       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
    61     </Reference>
    62     <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
    63       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
    64     </Reference>
    65     <Reference Include="HeuristicLab.Optimization-3.3">
    66       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
    67     </Reference>
    68     <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    69       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    70     </Reference>
     41    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     42    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     43    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     44    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    7145    <Reference Include="System" />
    7246    <Reference Include="System.Core" />
     47    <Reference Include="System.Drawing" />
     48    <Reference Include="System.Windows.Forms" />
    7349    <Reference Include="System.Xml.Linq" />
    7450    <Reference Include="System.Data.DataSetExtensions" />
    7551    <Reference Include="Microsoft.CSharp" />
    7652    <Reference Include="System.Data" />
    77     <Reference Include="System.Drawing" />
    78     <Reference Include="System.Windows.Forms" />
    7953    <Reference Include="System.Xml" />
    8054  </ItemGroup>
    8155  <ItemGroup>
     56    <Compile Include="Plugin.cs" />
    8257    <Compile Include="ProblemInstanceConsumerView.cs">
    8358      <SubType>UserControl</SubType>
     
    9368    </Compile>
    9469    <Compile Include="Properties\AssemblyInfo.cs" />
     70  </ItemGroup>
     71  <ItemGroup>
    9572    <None Include="HeuristicLab.snk" />
    9673    <None Include="Plugin.cs.frame" />
    97     <None Include="Properties\AssemblyInfo.cs.frame" />
    9874  </ItemGroup>
    9975  <ItemGroup>
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Plugin.cs.frame

    r7664 r7665  
    2626  [PluginFile("HeuristicLab.Problems.Instances.Views-3.4.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Common", "3.3")]
     28  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    2829  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    2930  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    30   [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3131  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    32   [PluginDependency("HeuristicLab.Problems.Instances.Regression", "3.4")]
    3332  public class HeuristicLabProblemsInstancesPlugin : PluginBase {
    3433  }
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.Designer.cs

    r7664 r7665  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.components = new System.ComponentModel.Container();
    4847      this.problemInstanceProviderComboBox = new System.Windows.Forms.ComboBox();
    4948      this.libraryInfoButton = new System.Windows.Forms.Button();
     
    5655      this.problemInstanceProviderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    5756      this.problemInstanceProviderComboBox.FormattingEnabled = true;
    58       this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(49, 0);
     57      this.problemInstanceProviderComboBox.Location = new System.Drawing.Point(50, 0);
    5958      this.problemInstanceProviderComboBox.Name = "problemInstanceProviderComboBox";
    6059      this.problemInstanceProviderComboBox.Size = new System.Drawing.Size(171, 21);
     
    7675      //
    7776      this.libraryLabel.AutoSize = true;
    78       this.libraryLabel.Location = new System.Drawing.Point(5, 4);
     77      this.libraryLabel.Location = new System.Drawing.Point(3, 3);
    7978      this.libraryLabel.Name = "libraryLabel";
    8079      this.libraryLabel.Size = new System.Drawing.Size(41, 13);
     
    8483      // problemInstanceProviderViewHost
    8584      //
    86       this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    87                   | System.Windows.Forms.AnchorStyles.Right)));
     85      this.problemInstanceProviderViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     86            | System.Windows.Forms.AnchorStyles.Right)));
    8887      this.problemInstanceProviderViewHost.Caption = "View";
    8988      this.problemInstanceProviderViewHost.Content = null;
    9089      this.problemInstanceProviderViewHost.Enabled = false;
    91       this.problemInstanceProviderViewHost.Location = new System.Drawing.Point(0, 0);
     90      this.problemInstanceProviderViewHost.Location = new System.Drawing.Point(258, 0);
    9291      this.problemInstanceProviderViewHost.Name = "problemInstanceProviderViewHost";
    9392      this.problemInstanceProviderViewHost.ReadOnly = false;
    94       this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(251, 22);
     93      this.problemInstanceProviderViewHost.Size = new System.Drawing.Size(433, 22);
    9594      this.problemInstanceProviderViewHost.TabIndex = 15;
    9695      this.problemInstanceProviderViewHost.ViewsLabelVisible = false;
    9796      this.problemInstanceProviderViewHost.ViewType = null;
    9897      //
    99       // ProblemInstanceConsumableView
     98      // ProblemInstanceConsumerView
    10099      //
    101100      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    102101      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     102      this.Controls.Add(this.problemInstanceProviderViewHost);
    103103      this.Controls.Add(this.problemInstanceProviderComboBox);
    104104      this.Controls.Add(this.libraryInfoButton);
    105105      this.Controls.Add(this.libraryLabel);
    106       this.Name = "ProblemInstanceConsumableView";
     106      this.Name = "ProblemInstanceConsumerView";
    107107      this.Size = new System.Drawing.Size(694, 21);
    108108      this.ResumeLayout(false);
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceConsumerView.cs

    r7664 r7665  
    7373    private void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
    7474      if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
    75         //dynamic provider = SelectedProvider;
    76         //dynamic consumer = Content;
    77         //provider.Consumer = consumer;
    7875        problemInstanceProviderViewHost.Content = SelectedProvider;
    7976        dynamic view = problemInstanceProviderViewHost.ActiveView;
    80         view.Consumer = Content;
    81         //Check if IProblemInstanceExporterView is implemented
    82         view.Exporter = Content;
     77        dynamic content = Content;
     78        view.Consumer = content;
     79        if (CheckForIProblemInstanceExporter(Content))
     80          view.Exporter = content;
    8381        //SetTooltip();
    8482      }
    8583      SetEnabledStateOfControls();
     84    }
     85
     86    private bool CheckForIProblemInstanceExporter(IProblemInstanceConsumer content) {
     87      // no check if IProblemInstanceConsumer<T> and IProblemInstanceExporter<T> have the same generic type T
     88      return Content.GetType().GetInterfaces()
     89                    .Any(x => x.IsGenericType && x.GetGenericTypeDefinition().Equals(typeof(IProblemInstanceExporter<>)));
    8690    }
    8791
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderView.Designer.cs

    r7664 r7665  
    5454      this.exportButton = new System.Windows.Forms.Button();
    5555      this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
     56      this.problemInstanceProviderSplitContainer = new System.Windows.Forms.SplitContainer();
     57      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceProviderSplitContainer)).BeginInit();
     58      this.problemInstanceProviderSplitContainer.Panel1.SuspendLayout();
     59      this.problemInstanceProviderSplitContainer.Panel2.SuspendLayout();
     60      this.problemInstanceProviderSplitContainer.SuspendLayout();
    5661      this.SuspendLayout();
    5762      //
     
    5964      //
    6065      this.loadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    61       this.loadButton.Location = new System.Drawing.Point(601, -1);
     66      this.loadButton.Location = new System.Drawing.Point(604, 0);
    6267      this.loadButton.Name = "loadButton";
    6368      this.loadButton.Size = new System.Drawing.Size(26, 23);
     
    7075      //
    7176      this.instanceLabel.AutoSize = true;
    72       this.instanceLabel.Location = new System.Drawing.Point(-3, 3);
     77      this.instanceLabel.Location = new System.Drawing.Point(3, 4);
    7378      this.instanceLabel.Name = "instanceLabel";
    7479      this.instanceLabel.Size = new System.Drawing.Size(51, 13);
     
    7883      // instancesComboBox
    7984      //
    80       this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     85      this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    8186            | System.Windows.Forms.AnchorStyles.Right)));
    8287      this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    8388      this.instancesComboBox.FormattingEnabled = true;
    84       this.instancesComboBox.Location = new System.Drawing.Point(54, 0);
     89      this.instancesComboBox.Location = new System.Drawing.Point(60, 1);
    8590      this.instancesComboBox.Name = "instancesComboBox";
    86       this.instancesComboBox.Size = new System.Drawing.Size(541, 21);
     91      this.instancesComboBox.Size = new System.Drawing.Size(538, 21);
    8792      this.instancesComboBox.TabIndex = 7;
    8893      this.instancesComboBox.DataSourceChanged += new System.EventHandler(this.comboBox_DataSourceChanged);
     
    9196      //
    9297      this.importButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    93       this.importButton.Location = new System.Drawing.Point(633, -1);
     98      this.importButton.Location = new System.Drawing.Point(636, 0);
    9499      this.importButton.Name = "importButton";
    95100      this.importButton.Size = new System.Drawing.Size(26, 23);
     
    107112      //
    108113      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    109       this.exportButton.Location = new System.Drawing.Point(665, -1);
     114      this.exportButton.Location = new System.Drawing.Point(-1, 0);
    110115      this.exportButton.Name = "exportButton";
    111116      this.exportButton.Size = new System.Drawing.Size(26, 23);
     
    121126      this.saveFileDialog.Title = "Save RegressionInstance...";
    122127      //
     128      // problemInstanceProviderSplitContainer
     129      //
     130      this.problemInstanceProviderSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     131            | System.Windows.Forms.AnchorStyles.Left)
     132            | System.Windows.Forms.AnchorStyles.Right)));
     133      this.problemInstanceProviderSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
     134      this.problemInstanceProviderSplitContainer.IsSplitterFixed = true;
     135      this.problemInstanceProviderSplitContainer.Location = new System.Drawing.Point(0, -1);
     136      this.problemInstanceProviderSplitContainer.Name = "problemInstanceProviderSplitContainer";
     137      //
     138      // problemInstanceProviderSplitContainer.Panel1
     139      //
     140      this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.instanceLabel);
     141      this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.instancesComboBox);
     142      this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.importButton);
     143      this.problemInstanceProviderSplitContainer.Panel1.Controls.Add(this.loadButton);
     144      //
     145      // problemInstanceProviderSplitContainer.Panel2
     146      //
     147      this.problemInstanceProviderSplitContainer.Panel2.Controls.Add(this.exportButton);
     148      this.problemInstanceProviderSplitContainer.Size = new System.Drawing.Size(694, 22);
     149      this.problemInstanceProviderSplitContainer.SplitterDistance = 665;
     150      this.problemInstanceProviderSplitContainer.TabIndex = 9;
     151      //
    123152      // ProblemInstanceProviderView
    124153      //
    125154      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    126155      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    127       this.Controls.Add(this.exportButton);
    128       this.Controls.Add(this.instancesComboBox);
    129       this.Controls.Add(this.importButton);
    130       this.Controls.Add(this.loadButton);
    131       this.Controls.Add(this.instanceLabel);
     156      this.Controls.Add(this.problemInstanceProviderSplitContainer);
    132157      this.Name = "ProblemInstanceProviderView";
    133158      this.Size = new System.Drawing.Size(694, 21);
     159      this.problemInstanceProviderSplitContainer.Panel1.ResumeLayout(false);
     160      this.problemInstanceProviderSplitContainer.Panel1.PerformLayout();
     161      this.problemInstanceProviderSplitContainer.Panel2.ResumeLayout(false);
     162      ((System.ComponentModel.ISupportInitialize)(this.problemInstanceProviderSplitContainer)).EndInit();
     163      this.problemInstanceProviderSplitContainer.ResumeLayout(false);
    134164      this.ResumeLayout(false);
    135       this.PerformLayout();
    136165
    137166    }
     
    147176    protected System.Windows.Forms.Button exportButton;
    148177    private System.Windows.Forms.SaveFileDialog saveFileDialog;
     178    private System.Windows.Forms.SplitContainer problemInstanceProviderSplitContainer;
    149179
    150180  }
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderView.cs

    r7664 r7665  
    6868    protected override void SetEnabledStateOfControls() {
    6969      base.SetEnabledStateOfControls();
    70       instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && Content.Consumer != null;
    71       loadButton.Enabled = !ReadOnly && !Locked && Content != null && Content.Consumer != null;
     70      instancesComboBox.Enabled = !ReadOnly && !Locked && Content != null && Consumer != null;
     71      loadButton.Enabled = !ReadOnly && !Locked && Content != null && Consumer != null;
     72      exportButton.Enabled = !ReadOnly && !Locked && Content != null && Exporter != null;
     73      problemInstanceProviderSplitContainer.Panel2Collapsed = !exportButton.Enabled;
    7274    }
    7375
     
    7678      var instance = Content.LoadData(descriptor);
    7779      try {
    78         Content.Consumer.Load(instance);
     80        Consumer.Load(instance);
    7981      }
    8082      catch (Exception ex) {
     
    9597        }
    9698        try {
    97           Content.Consumer.Load(instance);
     99          Consumer.Load(instance);
    98100        }
    99101        catch (Exception ex) {
     
    106108      if (saveFileDialog.ShowDialog(this) == DialogResult.OK) {
    107109        try {
    108           var descriptor = (IDataDescriptor)instancesComboBox.SelectedItem;
    109           var instance = Content.LoadData(descriptor);
    110           Content.SaveData(instance, saveFileDialog.FileName);
     110          Content.SaveData(Exporter.Export(), saveFileDialog.FileName);
    111111        }
    112112        catch (Exception ex) {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Properties/AssemblyInfo.cs

    r7664 r7665  
    1 using System.Reflection;
    2 using System.Runtime.CompilerServices;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System.Reflection;
    323using System.Runtime.InteropServices;
    424
     
    626// set of attributes. Change these attribute values to modify the information
    727// associated with an assembly.
    8 [assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Views-3.4")]
    9 [assembly: AssemblyDescription("")]
     28[assembly: AssemblyTitle("HeuristicLab.Problems.Instances.Views")]
     29[assembly: AssemblyDescription("Provides views for Problem Instances.")]
    1030[assembly: AssemblyConfiguration("")]
    1131[assembly: AssemblyCompany("")]
    12 [assembly: AssemblyProduct("HeuristicLab.Problems.Instances.Views-3.4")]
    13 [assembly: AssemblyCopyright("Copyright ©  2012")]
     32[assembly: AssemblyProduct("HeuristicLab")]
     33[assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
    1434[assembly: AssemblyTrademark("")]
    1535[assembly: AssemblyCulture("")]
     
    3050//      Revision
    3151//
    32 // You can specify all the values or you can default the Build and Revision Numbers
     52// You can specify all the values or you can default the Revision and Build Numbers
    3353// by using the '*' as shown below:
    34 // [assembly: AssemblyVersion("1.0.*")]
    35 [assembly: AssemblyVersion("1.0.0.0")]
    36 [assembly: AssemblyFileVersion("1.0.0.0")]
     54[assembly: AssemblyVersion("3.4.0.0")]
     55[assembly: AssemblyFileVersion("3.4.2.7664")]
Note: See TracChangeset for help on using the changeset viewer.