Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11661


Ignore:
Timestamp:
12/05/14 08:36:01 (10 years ago)
Author:
ascheibe
Message:

#1696 adapted FLA to changes of #2247

Location:
branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/BoxChart/BoxChartCreator.cs

    r8172 r11661  
    44using System.Drawing.Imaging;
    55using System.IO;
     6using System.IO.Compression;
    67using System.Linq;
    78using HeuristicLab.Collections;
     
    1213using HeuristicLab.Parameters;
    1314using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    14 using ICSharpCode.SharpZipLib.Zip;
    1515
    1616namespace HeuristicLab.Analysis.FitnessLandscape.BoxCharts {
     
    155155        filename = string.Format("{0}.zip", filename);
    156156      using (var stream = File.Create(filename)) {
    157         using (var zipStream = new ZipOutputStream(stream)) {
     157        using (var zipArchive = new ZipArchive(stream, ZipArchiveMode.Create)) {
    158158          foreach (var bitmap in bitmaps) {
    159             zipStream.PutNextEntry(new ZipEntry(bitmap.Key) { DateTime = DateTime.Now });
    160             using (var s = new MemoryStream()) {
     159            var entry = zipArchive.CreateEntry(bitmap.Key);
     160            using (var s = entry.Open()) {
    161161              bitmap.Value.Save(s, ImageFormat.Png);
    162               zipStream.Write(s.ToArray(), 0, (int)s.Length);
    163162            }
    164163          }
     
    166165      }
    167166    }
    168 
    169167    #endregion
    170 
    171168  }
    172169}
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape/HeuristicLab.Analysis.FitnessLandscape.csproj

    r11626 r11661  
    152152      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
    153153    </Reference>
    154     <Reference Include="ICSharpCode.SharpZipLib, Version=0.85.4.369, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
    155       <SpecificVersion>False</SpecificVersion>
    156       <HintPath>..\..\..\trunk\sources\bin\ICSharpCode.SharpZipLib.dll</HintPath>
    157     </Reference>
    158154    <Reference Include="System" />
    159155    <Reference Include="System.Core">
     
    161157    </Reference>
    162158    <Reference Include="System.Drawing" />
     159    <Reference Include="System.IO.Compression" />
    163160    <Reference Include="System.Windows.Forms" />
    164161    <Reference Include="System.Windows.Forms.DataVisualization" />
Note: See TracChangeset for help on using the changeset viewer.