Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/28/13 10:41:57 (12 years ago)
Author:
ascheibe
Message:

#2030 merged trunk into branch

Location:
branches/HivePerformance/sources
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources

  • branches/HivePerformance/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs

    r9539 r9663  
    2323using System.ComponentModel;
    2424using System.Drawing;
     25using System.Linq;
    2526using System.Text;
    2627using System.Windows.Forms;
     
    5354
    5455    protected override void DeregisterContentEvents() {
     56      Content.ElementNamesChanged -= new EventHandler(Content_ElementNamesChanged);
    5557      Content.ItemChanged -= new EventHandler<EventArgs<int>>(Content_ItemChanged);
    5658      Content.Reset -= new EventHandler(Content_Reset);
     
    6264      Content.ItemChanged += new EventHandler<EventArgs<int>>(Content_ItemChanged);
    6365      Content.Reset += new EventHandler(Content_Reset);
     66      Content.ElementNamesChanged += new EventHandler(Content_ElementNamesChanged);
    6467    }
    6568
     
    9699        dataGridView.Columns[0].Width = dataGridView.Columns[0].GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true);
    97100      }
     101      UpdateRowHeaders();
     102      dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders);
    98103      dataGridView.Enabled = true;
     104    }
     105
     106    protected virtual void UpdateRowHeaders() {
     107      for (int i = 0; i < dataGridView.RowCount; i++) {
     108        if (i < Content.ElementNames.Count())
     109          dataGridView.Rows[i].HeaderCell.Value = Content.ElementNames.ElementAt(i);
     110        else
     111          dataGridView.Rows[i].HeaderCell.Value = string.Empty;
     112      }
     113    }
     114
     115    private void Content_ElementNamesChanged(object sender, EventArgs e) {
     116      if (InvokeRequired)
     117        Invoke(new EventHandler(Content_ElementNamesChanged), sender, e);
     118      else
     119        UpdateRowHeaders();
    99120    }
    100121
  • branches/HivePerformance/sources/HeuristicLab.Data/3.3/Interfaces/IStringConvertibleArray.cs

    r9539 r9663  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using HeuristicLab.Common;
    2425
     
    2627  public interface IStringConvertibleArray : IContent {
    2728    int Length { get; set; }
     29    IEnumerable<string> ElementNames { get; set; }
    2830
    2931    bool ReadOnly { get; }
     
    3335    bool SetValue(string value, int index);
    3436
     37    event EventHandler ElementNamesChanged;
    3538    event EventHandler<EventArgs<int>> ItemChanged;
    3639    event EventHandler Reset;
  • branches/HivePerformance/sources/HeuristicLab.Data/3.3/StringArray.cs

    r9539 r9663  
    4343    protected string[] array;
    4444
     45    [Storable]
     46    protected List<string> elementNames;
     47    public virtual IEnumerable<string> ElementNames {
     48      get { return this.elementNames; }
     49      set {
     50        if (ReadOnly) throw new NotSupportedException("ElementNames cannot be set. ValueTypeArray is read-only.");
     51        if (value == null || !value.Any())
     52          elementNames = new List<string>();
     53        else if (value.Count() != Length)
     54          throw new ArgumentException("An element name must be specified for each element.");
     55        else
     56          elementNames = new List<string>(value);
     57        OnElementNamesChanged();
     58      }
     59    }
     60
    4561    public virtual int Length {
    4662      get { return array.Length; }
     
    4965        if (value != Length) {
    5066          Array.Resize<string>(ref array, value);
     67          while (elementNames.Count > value)
     68            elementNames.RemoveAt(elementNames.Count - 1);
     69          while (elementNames.Count < value)
     70            elementNames.Add("Element " + elementNames.Count);
     71          OnElementNamesChanged();
    5172          OnReset();
    5273        }
     
    7293    }
    7394
     95    [StorableHook(HookType.AfterDeserialization)]
     96    private void AfterDeserialization() {
     97      if (elementNames == null) { elementNames = new List<string>(); }
     98    }
     99
    74100    [StorableConstructor]
    75101    protected StringArray(bool deserializing) : base(deserializing) { }
     
    78104      this.array = (string[])original.array.Clone();
    79105      this.readOnly = original.readOnly;
     106      this.elementNames = new List<string>(original.elementNames);
    80107    }
    81108    public StringArray() {
    82109      array = new string[0];
    83110      readOnly = false;
     111      elementNames = new List<string>();
    84112    }
    85113    public StringArray(int length) {
     
    88116        array[i] = string.Empty;
    89117      readOnly = false;
     118      elementNames = new List<string>();
    90119    }
    91120    public StringArray(string[] elements) {
     
    95124        array[i] = elements[i] == null ? string.Empty : elements[i];
    96125      readOnly = false;
     126      elementNames = new List<string>();
    97127    }
    98128
     
    153183    }
    154184
     185    public event EventHandler ElementNamesChanged;
     186    protected virtual void OnElementNamesChanged() {
     187      EventHandler handler = ElementNamesChanged;
     188      if (handler != null)
     189        handler(this, EventArgs.Empty);
     190    }
     191
    155192    public event EventHandler<EventArgs<int>> ItemChanged;
    156193    protected virtual void OnItemChanged(int index) {
  • branches/HivePerformance/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs

    r9539 r9663  
    4343    protected T[] array;
    4444
     45    [Storable]
     46    protected List<string> elementNames;
     47    public virtual IEnumerable<string> ElementNames {
     48      get { return this.elementNames; }
     49      set {
     50        if (ReadOnly) throw new NotSupportedException("ElementNames cannot be set. ValueTypeArray is read-only.");
     51        if (value == null || !value.Any())
     52          elementNames = new List<string>();
     53        else if (value.Count() != Length)
     54          throw new ArgumentException("An element name must be specified for each element.");
     55        else
     56          elementNames = new List<string>(value);
     57        OnElementNamesChanged();
     58      }
     59    }
     60
    4561    public virtual int Length {
    4662      get { return array.Length; }
     
    5167        if (value != Length) {
    5268          Array.Resize<T>(ref array, value);
     69          while (elementNames.Count > value)
     70            elementNames.RemoveAt(elementNames.Count - 1);
     71          while (elementNames.Count < value)
     72            elementNames.Add("Element " + elementNames.Count);
     73          OnElementNamesChanged();
    5374          OnReset();
    5475        }
     
    7394    }
    7495
     96    [StorableHook(HookType.AfterDeserialization)]
     97    private void AfterDeserialization() {
     98      if (elementNames == null) { elementNames = new List<string>(); }
     99    }
     100
    75101    [StorableConstructor]
    76102    protected ValueTypeArray(bool deserializing) : base(deserializing) { }
     
    79105      this.array = (T[])original.array.Clone();
    80106      this.readOnly = original.readOnly;
     107      this.elementNames = new List<string>(original.elementNames);
    81108    }
    82109    protected ValueTypeArray() {
    83110      array = new T[0];
    84111      readOnly = false;
     112      elementNames = new List<string>();
    85113    }
    86114    protected ValueTypeArray(int length) {
    87115      array = new T[length];
    88116      readOnly = false;
     117      elementNames = new List<string>();
    89118    }
    90119    protected ValueTypeArray(T[] elements) {
     
    92121      array = (T[])elements.Clone();
    93122      readOnly = false;
     123      elementNames = new List<string>();
    94124    }
    95125
     
    125155    }
    126156
     157    public event EventHandler ElementNamesChanged;
     158    protected virtual void OnElementNamesChanged() {
     159      EventHandler handler = ElementNamesChanged;
     160      if (handler != null)
     161        handler(this, EventArgs.Empty);
     162    }
     163
    127164    public event EventHandler<EventArgs<int>> ItemChanged;
    128165    protected virtual void OnItemChanged(int index) {
  • branches/HivePerformance/sources/HeuristicLab.ExtLibs

  • branches/HivePerformance/sources/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/EPPlus-3.1.3/EPPlus-3.1.3.csproj

    r9587 r9663  
    4848    <DebugType>full</DebugType>
    4949    <Optimize>false</Optimize>
    50     <OutputPath>..\..\..\..\..\..\trunk\sources\bin\</OutputPath>
     50    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    5151    <DefineConstants>DEBUG;TRACE</DefineConstants>
    5252    <ErrorReport>prompt</ErrorReport>
     
    5959    <DebugType>pdbonly</DebugType>
    6060    <Optimize>true</Optimize>
    61     <OutputPath>..\..\..\..\..\..\trunk\sources\bin\</OutputPath>
     61    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    6262    <DefineConstants>TRACE</DefineConstants>
    6363    <ErrorReport>prompt</ErrorReport>
     
    7070  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    7171    <DebugSymbols>true</DebugSymbols>
    72     <OutputPath>..\..\..\..\bin\</OutputPath>
     72    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    7373    <DefineConstants>DEBUG;TRACE</DefineConstants>
    7474    <DocumentationFile>
     
    8080  </PropertyGroup>
    8181  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    82     <OutputPath>..\..\..\..\bin\</OutputPath>
     82    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    8383    <DefineConstants>TRACE</DefineConstants>
    8484    <DocumentationFile>
     
    9292  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    9393    <DebugSymbols>true</DebugSymbols>
    94     <OutputPath>..\..\..\..\bin\</OutputPath>
     94    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    9595    <DefineConstants>DEBUG;TRACE</DefineConstants>
    9696    <DocumentationFile>
     
    102102  </PropertyGroup>
    103103  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    104     <OutputPath>..\..\..\..\bin\</OutputPath>
     104    <OutputPath>$(SolutionDir)\bin\</OutputPath>
    105105    <DefineConstants>TRACE</DefineConstants>
    106106    <DocumentationFile>
     
    167167    <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithStdDev.cs" />
    168168    <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithText.cs" />
    169     <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconDataBarValue.cs" />
     169    <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconDatabarValue.cs" />
    170170    <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingDataBar.cs" />
    171171    <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingFiveIconSet.cs" />
     
    321321    <Compile Include="VBA\ExcelVbaModule.cs" />
    322322    <Compile Include="VBA\ExcelVbaModuleAttribute.cs" />
    323     <Compile Include="VBA\ExcelVbaModuleCollection.cs" />
    324     <Compile Include="VBA\ExcelVbaProject.cs" />
     323    <Compile Include="VBA\ExcelVBAModuleCollection.cs" />
     324    <Compile Include="VBA\ExcelVBAProject.cs" />
    325325    <Compile Include="ExcelWorkbookView.cs" />
    326326    <Compile Include="ExcelWorksheetView.cs" />
     
    372372    <Compile Include="Utils\SqRefUtility.cs" />
    373373    <Compile Include="VBA\ExcelVbaProtection.cs" />
    374     <Compile Include="VBA\ExcelVbaReference.cs" />
    375     <Compile Include="VBA\ExcelVbaSignature.cs" />
     374    <Compile Include="VBA\ExcelVBAReference.cs" />
     375    <Compile Include="VBA\ExcelVBASignature.cs" />
    376376    <Compile Include="XmlHelper.cs" />
    377377    <Compile Include="XmlHelperFactory.cs" />
  • branches/HivePerformance/sources/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/HeuristicLab.EPPlus-3.1.3/HeuristicLab.EPPlus-3.1.3.csproj

    r9590 r9663  
    106106  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    107107  <PropertyGroup>
    108     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     108    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    109109set ProjectDir=$(ProjectDir)
    110110set SolutionDir=$(SolutionDir)
    111111set Outdir=$(Outdir)
    112112
    113 call PreBuildEvent.cmd</PreBuildEvent>
     113call PreBuildEvent.cmd
     114</PreBuildEvent>
     115    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     116export ProjectDir=$(ProjectDir)
     117export SolutionDir=$(SolutionDir)
     118
     119$SolutionDir/PreBuildEvent.sh
     120</PreBuildEvent>
    114121  </PropertyGroup>
    115122  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/HivePerformance/sources/HeuristicLab.ParallelEngine.Views/3.3/HeuristicLab.ParallelEngine.Views.csproj

    r9323 r9663  
    146146  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    147147  <PropertyGroup>
    148     <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     148    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    149149set ProjectDir=$(ProjectDir)
    150150set SolutionDir=$(SolutionDir)
     
    152152
    153153call PreBuildEvent.cmd
     154</PreBuildEvent>
     155    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     156export ProjectDir=$(ProjectDir)
     157export SolutionDir=$(SolutionDir)
     158
     159$SolutionDir/PreBuildEvent.sh
    154160</PreBuildEvent>
    155161  </PropertyGroup>
Note: See TracChangeset for help on using the changeset viewer.