Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/10/14 10:31:41 (10 years ago)
Author:
pfleck
Message:

#2269 Merged trunk. Updated .net version of ALPS plugin.

Location:
branches/ALPS
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/ALPS

  • branches/ALPS/HeuristicLab.Core.Views/3.3/Clipboard.cs

    r11171 r11677  
    2424using System.Collections.Generic;
    2525using System.IO;
     26using System.IO.Compression;
    2627using System.Linq;
    2728using System.Threading;
     
    198199          i++;
    199200          SetEnabledStateOfContentViews(item, false);
    200           XmlGenerator.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl", 9);
     201          XmlGenerator.Serialize(item, ItemsPath + Path.DirectorySeparatorChar + i.ToString("00000000") + ".hl", CompressionLevel.Optimal);
    201202          OnItemSaved(item, progressBar.Maximum / listView.Items.Count);
    202203        }
  • branches/ALPS/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj

    r8600 r11677  
    1111    <RootNamespace>HeuristicLab.Core.Views</RootNamespace>
    1212    <AssemblyName>HeuristicLab.Core.Views-3.3</AssemblyName>
    13     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1414    <TargetFrameworkProfile>
    1515    </TargetFrameworkProfile>
     
    4646    <WarningLevel>4</WarningLevel>
    4747    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     48    <Prefer32Bit>false</Prefer32Bit>
    4849  </PropertyGroup>
    4950  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    5758    </DocumentationFile>
    5859    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     60    <Prefer32Bit>false</Prefer32Bit>
    5961  </PropertyGroup>
    6062  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     
    6668    <ErrorReport>prompt</ErrorReport>
    6769    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     70    <Prefer32Bit>false</Prefer32Bit>
    6871  </PropertyGroup>
    6972  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
     
    7780    <ErrorReport>prompt</ErrorReport>
    7881    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     82    <Prefer32Bit>false</Prefer32Bit>
    7983  </PropertyGroup>
    8084  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     
    8690    <ErrorReport>prompt</ErrorReport>
    8791    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     92    <Prefer32Bit>false</Prefer32Bit>
    8893  </PropertyGroup>
    8994  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
     
    97102    <ErrorReport>prompt</ErrorReport>
    98103    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     104    <Prefer32Bit>false</Prefer32Bit>
    99105  </PropertyGroup>
    100106  <ItemGroup>
     
    146152    <Compile Include="LogView.Designer.cs">
    147153      <DependentUpon>LogView.cs</DependentUpon>
     154    </Compile>
     155    <Compile Include="NestingLevelErrorControl.cs">
     156      <SubType>UserControl</SubType>
     157    </Compile>
     158    <Compile Include="NestingLevelErrorControl.Designer.cs">
     159      <DependentUpon>NestingLevelErrorControl.cs</DependentUpon>
    148160    </Compile>
    149161    <Compile Include="Plugin.cs" />
     
    378390  -->
    379391  <PropertyGroup>
    380    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     392    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    381393set ProjectDir=$(ProjectDir)
    382394set SolutionDir=$(SolutionDir)
     
    385397call PreBuildEvent.cmd
    386398</PreBuildEvent>
    387 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     399    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    388400export ProjectDir=$(ProjectDir)
    389401export SolutionDir=$(SolutionDir)
  • branches/ALPS/HeuristicLab.Core.Views/3.3/ItemView.cs

    r11171 r11677  
    2020#endregion
    2121
     22using System;
     23using System.Windows.Forms;
    2224using HeuristicLab.MainForm.WindowsForms;
    2325
     
    2729  /// </summary>
    2830  public partial class ItemView : AsynchronousContentView {
     31    public const int MaximumNestingLevel = 32;
     32
    2933    public new IItem Content {
    3034      get { return (IItem)base.Content; }
     
    3842      InitializeComponent();
    3943    }
     44
     45    protected override void OnInitialized(EventArgs e) {
     46      base.OnInitialized(e);
     47
     48      if (CountParentControls() > MaximumNestingLevel) {
     49        //capture content, needed because it is set at a later time
     50        NestingLevelErrorControl errorControl = new NestingLevelErrorControl(() => Content, this.GetType());
     51        errorControl.Dock = DockStyle.Fill;
     52
     53        Controls.Clear();
     54        Controls.Add(errorControl);
     55      }
     56    }
     57
     58    private int CountParentControls() {
     59      int cnt = 0;
     60      Control parent = Parent;
     61      while (parent != null) {
     62        parent = parent.Parent;
     63        cnt++;
     64      }
     65      return cnt;
     66    }
    4067  }
    4168}
Note: See TracChangeset for help on using the changeset viewer.