Ignore:
Timestamp:
09/13/13 13:49:03 (8 years ago)
Author:
mkommend
Message:

#2081: Merged path data types into stable.

Location:
stable
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Data/3.3

    • Property svn:mergeinfo set to (toggle deleted branches)
      /trunk/sources/HeuristicLab.Data/3.3mergedeligible
      /branches/Algorithms.GradientDescent/HeuristicLab.Data/3.35516-5520
      /branches/Benchmarking/sources/HeuristicLab.Data/3.36917-7005
      /branches/CloningRefactoring/HeuristicLab.Data/3.34656-4721
      /branches/DataAnalysis Refactoring/HeuristicLab.Data/3.35471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Data/3.35815-6180
      /branches/DataAnalysis/HeuristicLab.Data/3.34458-4459,​4462,​4464
      /branches/GP.Grammar.Editor/HeuristicLab.Data/3.36284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Data/3.35060
      /branches/HeuristicLab.Data Path DataTypes/HeuristicLab.Data/3.39668-9706
      /branches/NET40/sources/HeuristicLab.Data/3.35138-5162
      /branches/ParallelEngine/HeuristicLab.Data/3.35175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Data/3.37568-7810
      /branches/QAPAlgorithms/HeuristicLab.Data/3.36350-6627
      /branches/Restructure trunk solution/HeuristicLab.Data/3.36828
      /branches/RuntimeOptimizer/HeuristicLab.Data/3.38943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Data/3.37787-8333
      /branches/SlaveShutdown/HeuristicLab.Data/3.38944-8956
      /branches/SuccessProgressAnalysis/HeuristicLab.Data/3.35370-5682
      /branches/Trunk/HeuristicLab.Data/3.36829-6865
      /branches/UnloadJobs/HeuristicLab.Data/3.39168-9215
      /branches/VNS/HeuristicLab.Data/3.35594-5752
      /branches/histogram/HeuristicLab.Data/3.35959-6341
  • stable/HeuristicLab.Data/3.3/HeuristicLab.Data-3.3.csproj

    r8600 r9961  
    117117    <Compile Include="Comparison.cs" />
    118118    <Compile Include="ComparisonType.cs" />
     119    <Compile Include="Path Types\DirectoryValue.cs" />
     120    <Compile Include="Path Types\FileValue.cs" />
     121    <Compile Include="Path Types\PathValue.cs" />
     122    <Compile Include="Path Types\TextFileValue.cs" />
    119123    <Compile Include="PercentMatrix.cs" />
    120124    <Compile Include="PercentArray.cs" />
     
    212216  -->
    213217  <PropertyGroup>
    214    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     218    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    215219set ProjectDir=$(ProjectDir)
    216220set SolutionDir=$(SolutionDir)
     
    219223call PreBuildEvent.cmd
    220224</PreBuildEvent>
    221 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     225    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    222226export ProjectDir=$(ProjectDir)
    223227export SolutionDir=$(SolutionDir)
  • stable/HeuristicLab.Data/3.3/Path Types/DirectoryValue.cs

    r9680 r9961  
    3939
    4040    public override bool Exists() {
    41       return Directory.Exists(value);
     41      return Directory.Exists(Value);
    4242    }
    4343  }
  • stable/HeuristicLab.Data/3.3/Path Types/FileValue.cs

    r9680 r9961  
    2020#endregion
    2121
    22 using System;
    2322using System.IO;
    2423using HeuristicLab.Common;
     
    3736        if (fileDialogFilter != value) {
    3837          fileDialogFilter = value;
    39           OnFileOpenDialogFilterChanged();
    4038        }
    4139      }
     
    5856
    5957    public override bool Exists() {
    60       return File.Exists(value);
    61     }
    62 
    63     public event EventHandler FileOpenDialogFilterChanged;
    64     protected virtual void OnFileOpenDialogFilterChanged() {
    65       var handler = FileOpenDialogFilterChanged;
    66       if (handler != null)
    67         handler(this, EventArgs.Empty);
     58      return File.Exists(Value);
    6859    }
    6960  }
  • stable/HeuristicLab.Data/3.3/Path Types/PathValue.cs

    r9697 r9961  
    2020#endregion
    2121
    22 
    2322using System.IO;
    2423using HeuristicLab.Common;
     
    2928  [Item("PathValue", "Represents a path.")]
    3029  [StorableClass]
    31   public abstract class PathValue : StringValue {
    32     public override string Value {
    33       get { return base.Value; }
     30  public abstract class PathValue : Item {
     31
     32    [Storable]
     33    private readonly StringValue stringValue = new StringValue();
     34    public StringValue StringValue {
     35      get { return stringValue; }
     36    }
     37
     38    public string Value {
     39      get { return stringValue.Value; }
    3440      set {
    3541        if (value == null) value = string.Empty;
    3642        value = value.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
    37         base.Value = value;
     43        stringValue.Value = value;
    3844      }
    3945    }
     
    4147    [StorableConstructor]
    4248    protected PathValue(bool deserializing) : base(deserializing) { }
    43     protected PathValue(PathValue original, Cloner cloner) : base(original, cloner) { }
     49    protected PathValue(PathValue original, Cloner cloner)
     50      : base(original, cloner) {
     51      stringValue = cloner.Clone(original.stringValue);
     52    }
    4453
    45     protected PathValue()
    46       : base(string.Empty) { }
     54    protected PathValue() : base() { }
    4755
    4856    public abstract bool Exists();
Note: See TracChangeset for help on using the changeset viewer.