Changeset 9663 for branches/HivePerformance
- Timestamp:
- 06/28/13 10:41:57 (11 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 9657-9660
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs
r9539 r9663 23 23 using System.ComponentModel; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using System.Text; 26 27 using System.Windows.Forms; … … 53 54 54 55 protected override void DeregisterContentEvents() { 56 Content.ElementNamesChanged -= new EventHandler(Content_ElementNamesChanged); 55 57 Content.ItemChanged -= new EventHandler<EventArgs<int>>(Content_ItemChanged); 56 58 Content.Reset -= new EventHandler(Content_Reset); … … 62 64 Content.ItemChanged += new EventHandler<EventArgs<int>>(Content_ItemChanged); 63 65 Content.Reset += new EventHandler(Content_Reset); 66 Content.ElementNamesChanged += new EventHandler(Content_ElementNamesChanged); 64 67 } 65 68 … … 96 99 dataGridView.Columns[0].Width = dataGridView.Columns[0].GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true); 97 100 } 101 UpdateRowHeaders(); 102 dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders); 98 103 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(); 99 120 } 100 121 -
branches/HivePerformance/sources/HeuristicLab.Data/3.3/Interfaces/IStringConvertibleArray.cs
r9539 r9663 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; 24 25 … … 26 27 public interface IStringConvertibleArray : IContent { 27 28 int Length { get; set; } 29 IEnumerable<string> ElementNames { get; set; } 28 30 29 31 bool ReadOnly { get; } … … 33 35 bool SetValue(string value, int index); 34 36 37 event EventHandler ElementNamesChanged; 35 38 event EventHandler<EventArgs<int>> ItemChanged; 36 39 event EventHandler Reset; -
branches/HivePerformance/sources/HeuristicLab.Data/3.3/StringArray.cs
r9539 r9663 43 43 protected string[] array; 44 44 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 45 61 public virtual int Length { 46 62 get { return array.Length; } … … 49 65 if (value != Length) { 50 66 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(); 51 72 OnReset(); 52 73 } … … 72 93 } 73 94 95 [StorableHook(HookType.AfterDeserialization)] 96 private void AfterDeserialization() { 97 if (elementNames == null) { elementNames = new List<string>(); } 98 } 99 74 100 [StorableConstructor] 75 101 protected StringArray(bool deserializing) : base(deserializing) { } … … 78 104 this.array = (string[])original.array.Clone(); 79 105 this.readOnly = original.readOnly; 106 this.elementNames = new List<string>(original.elementNames); 80 107 } 81 108 public StringArray() { 82 109 array = new string[0]; 83 110 readOnly = false; 111 elementNames = new List<string>(); 84 112 } 85 113 public StringArray(int length) { … … 88 116 array[i] = string.Empty; 89 117 readOnly = false; 118 elementNames = new List<string>(); 90 119 } 91 120 public StringArray(string[] elements) { … … 95 124 array[i] = elements[i] == null ? string.Empty : elements[i]; 96 125 readOnly = false; 126 elementNames = new List<string>(); 97 127 } 98 128 … … 153 183 } 154 184 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 155 192 public event EventHandler<EventArgs<int>> ItemChanged; 156 193 protected virtual void OnItemChanged(int index) { -
branches/HivePerformance/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs
r9539 r9663 43 43 protected T[] array; 44 44 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 45 61 public virtual int Length { 46 62 get { return array.Length; } … … 51 67 if (value != Length) { 52 68 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(); 53 74 OnReset(); 54 75 } … … 73 94 } 74 95 96 [StorableHook(HookType.AfterDeserialization)] 97 private void AfterDeserialization() { 98 if (elementNames == null) { elementNames = new List<string>(); } 99 } 100 75 101 [StorableConstructor] 76 102 protected ValueTypeArray(bool deserializing) : base(deserializing) { } … … 79 105 this.array = (T[])original.array.Clone(); 80 106 this.readOnly = original.readOnly; 107 this.elementNames = new List<string>(original.elementNames); 81 108 } 82 109 protected ValueTypeArray() { 83 110 array = new T[0]; 84 111 readOnly = false; 112 elementNames = new List<string>(); 85 113 } 86 114 protected ValueTypeArray(int length) { 87 115 array = new T[length]; 88 116 readOnly = false; 117 elementNames = new List<string>(); 89 118 } 90 119 protected ValueTypeArray(T[] elements) { … … 92 121 array = (T[])elements.Clone(); 93 122 readOnly = false; 123 elementNames = new List<string>(); 94 124 } 95 125 … … 125 155 } 126 156 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 127 164 public event EventHandler<EventArgs<int>> ItemChanged; 128 165 protected virtual void OnItemChanged(int index) { -
branches/HivePerformance/sources/HeuristicLab.ExtLibs
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.ExtLibs merged: 9658-9659
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/EPPlus-3.1.3/EPPlus-3.1.3.csproj
r9587 r9663 48 48 <DebugType>full</DebugType> 49 49 <Optimize>false</Optimize> 50 <OutputPath> ..\..\..\..\..\..\trunk\sources\bin\</OutputPath>50 <OutputPath>$(SolutionDir)\bin\</OutputPath> 51 51 <DefineConstants>DEBUG;TRACE</DefineConstants> 52 52 <ErrorReport>prompt</ErrorReport> … … 59 59 <DebugType>pdbonly</DebugType> 60 60 <Optimize>true</Optimize> 61 <OutputPath> ..\..\..\..\..\..\trunk\sources\bin\</OutputPath>61 <OutputPath>$(SolutionDir)\bin\</OutputPath> 62 62 <DefineConstants>TRACE</DefineConstants> 63 63 <ErrorReport>prompt</ErrorReport> … … 70 70 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 71 71 <DebugSymbols>true</DebugSymbols> 72 <OutputPath> ..\..\..\..\bin\</OutputPath>72 <OutputPath>$(SolutionDir)\bin\</OutputPath> 73 73 <DefineConstants>DEBUG;TRACE</DefineConstants> 74 74 <DocumentationFile> … … 80 80 </PropertyGroup> 81 81 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 82 <OutputPath> ..\..\..\..\bin\</OutputPath>82 <OutputPath>$(SolutionDir)\bin\</OutputPath> 83 83 <DefineConstants>TRACE</DefineConstants> 84 84 <DocumentationFile> … … 92 92 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 93 93 <DebugSymbols>true</DebugSymbols> 94 <OutputPath> ..\..\..\..\bin\</OutputPath>94 <OutputPath>$(SolutionDir)\bin\</OutputPath> 95 95 <DefineConstants>DEBUG;TRACE</DefineConstants> 96 96 <DocumentationFile> … … 102 102 </PropertyGroup> 103 103 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 104 <OutputPath> ..\..\..\..\bin\</OutputPath>104 <OutputPath>$(SolutionDir)\bin\</OutputPath> 105 105 <DefineConstants>TRACE</DefineConstants> 106 106 <DocumentationFile> … … 167 167 <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithStdDev.cs" /> 168 168 <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithText.cs" /> 169 <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconData BarValue.cs" />169 <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconDatabarValue.cs" /> 170 170 <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingDataBar.cs" /> 171 171 <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingFiveIconSet.cs" /> … … 321 321 <Compile Include="VBA\ExcelVbaModule.cs" /> 322 322 <Compile Include="VBA\ExcelVbaModuleAttribute.cs" /> 323 <Compile Include="VBA\ExcelV baModuleCollection.cs" />324 <Compile Include="VBA\ExcelV baProject.cs" />323 <Compile Include="VBA\ExcelVBAModuleCollection.cs" /> 324 <Compile Include="VBA\ExcelVBAProject.cs" /> 325 325 <Compile Include="ExcelWorkbookView.cs" /> 326 326 <Compile Include="ExcelWorksheetView.cs" /> … … 372 372 <Compile Include="Utils\SqRefUtility.cs" /> 373 373 <Compile Include="VBA\ExcelVbaProtection.cs" /> 374 <Compile Include="VBA\ExcelV baReference.cs" />375 <Compile Include="VBA\ExcelV baSignature.cs" />374 <Compile Include="VBA\ExcelVBAReference.cs" /> 375 <Compile Include="VBA\ExcelVBASignature.cs" /> 376 376 <Compile Include="XmlHelper.cs" /> 377 377 <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 106 106 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 107 107 <PropertyGroup> 108 <PreBuildEvent >set Path=%25Path%25;$(ProjectDir);$(SolutionDir)108 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 109 109 set ProjectDir=$(ProjectDir) 110 110 set SolutionDir=$(SolutionDir) 111 111 set Outdir=$(Outdir) 112 112 113 call PreBuildEvent.cmd</PreBuildEvent> 113 call PreBuildEvent.cmd 114 </PreBuildEvent> 115 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 116 export ProjectDir=$(ProjectDir) 117 export SolutionDir=$(SolutionDir) 118 119 $SolutionDir/PreBuildEvent.sh 120 </PreBuildEvent> 114 121 </PropertyGroup> 115 122 <!-- 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 146 146 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 147 147 <PropertyGroup> 148 <PreBuildEvent >set Path=%25Path%25;$(ProjectDir);$(SolutionDir)148 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 149 149 set ProjectDir=$(ProjectDir) 150 150 set SolutionDir=$(SolutionDir) … … 152 152 153 153 call PreBuildEvent.cmd 154 </PreBuildEvent> 155 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 156 export ProjectDir=$(ProjectDir) 157 export SolutionDir=$(SolutionDir) 158 159 $SolutionDir/PreBuildEvent.sh 154 160 </PreBuildEvent> 155 161 </PropertyGroup>
Note: See TracChangeset
for help on using the changeset viewer.