Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Properties/AssemblyInfo.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Properties/AssemblyInfo.cs	(revision 11829)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Properties/AssemblyInfo.cs	(revision 11829)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("example")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Scilab - DIGITEO")]
+[assembly: AssemblyProduct("example")]
+[assembly: AssemblyCopyright("Copyright © Scilab 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("17e29de2-0c66-420c-931c-662ab2883fb8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Util.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Util.cs	(revision 11829)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/Util.cs	(revision 11829)
@@ -0,0 +1,38 @@
+﻿using System;
+using Microsoft.Win32;
+
+namespace cs_example {
+  class Util {
+    private const string registryKey = @"SOFTWARE\Scilab";
+    private const string scilab_Install = @"LASTINSTALL";
+    private const string scilab_PATH = @"SCIPATH";
+
+    public static void AddScilabInstalltionPathToEnvironment() {
+      var currentPath = Environment.GetEnvironmentVariable("path");
+      if (currentPath == null) return;
+
+      var scilabPath = GetScilabInstallPath();
+      if (string.IsNullOrEmpty(scilabPath)) return;
+
+      Environment.SetEnvironmentVariable("path", scilabPath + ";" + currentPath);
+    }
+
+    private static string GetScilabInstallPath() {
+      using (var registryLocalMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default)) {
+        using (var registryScilab = registryLocalMachine.OpenSubKey(registryKey)) {
+          if (registryScilab == null) return string.Empty;
+          var scilabVersion = registryScilab.GetValue(scilab_Install);
+          if (scilabVersion == null) return string.Empty;
+          using (var registryScilabVersion = registryScilab.OpenSubKey(scilabVersion.ToString())) {
+            if (registryScilabVersion == null) return string.Empty;
+            var scilabPath = registryScilabVersion.GetValue(scilab_PATH);
+            if (scilabPath == null) return string.Empty;
+            string path = scilabPath.ToString();
+            path += @"\bin";
+            return path;
+          }
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.cs
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.cs	(revision 11829)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.cs	(revision 11829)
@@ -0,0 +1,270 @@
+﻿/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+//=============================================================================
+using System;
+using cs_example;
+using DotNetScilab;
+//=============================================================================
+namespace example {
+  class cs_example {
+    //=============================================================================
+    /*
+     * A small example to call scilab from C#
+     * read & write matrix of double, string, boolean, int(32)
+     */
+    static void example_readwriteMatrixOfDouble(Scilab _objScilab) {
+      //=============================================================================
+      // Send a command to scilab
+      // Here , we want to display SCI variable
+      _objScilab.SendScilabJob("disp(\'SCI = \');");
+      _objScilab.SendScilabJob("disp(SCI);");
+      //=============================================================================
+      double[] A = new double[] { 1, 2, 3, 4, 5, 6 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedMatrixOfDouble("A", mA, nA, A);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'A =\');");
+      _objScilab.SendScilabJob("disp(A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("A") == (int)DotNetScilab.ScilabType.sci_matrix) {
+        Console.WriteLine("A is a matrix of double");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("B = A + 1;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("B");
+
+      // get named matrix of double
+      double[] B = _objScilab.readNamedMatrixOfDouble("B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(B[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'B =\');");
+      _objScilab.SendScilabJob("disp(B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfString(Scilab _objScilab) {
+      //=============================================================================
+      string[] strA = new string[] { "Scilab", "The", "open",
+                                        "source", "for", "numerical",
+                                        "computation" , ":", ")"};
+      int mstrA = 3, nstrA = 3;
+
+      // Write a matrix of string named in scilab
+      _objScilab.createNamedMatrixOfString("string_A", mstrA, nstrA, strA);
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'string_A =\');");
+      _objScilab.SendScilabJob("disp(string_A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("string_A") == (int)DotNetScilab.ScilabType.sci_strings) {
+        Console.WriteLine("string_A is a matrix of strings");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("string_B = convstr(string_A,\'u\');");
+
+      // get dimensions of a named matrix of string
+      int[] DimstrB = _objScilab.getNamedVarDimension("string_B");
+
+      // get named matrix of string
+      string[] strB = _objScilab.readNamedMatrixOfString("string_B");
+
+      Console.WriteLine("");
+      Console.WriteLine("(C#) strB =");
+      for (int i = 0; i < DimstrB[0]; i++) {
+        for (int j = 0; j < DimstrB[1]; j++) {
+          Console.Write(strB[j * DimstrB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'string_B =\');");
+      _objScilab.SendScilabJob("disp(string_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfBoolean(Scilab _objScilab) {
+      //=============================================================================
+      Boolean[] bA = new Boolean[] { false, true, false,
+                                           true, false, true};
+      int mbA = 2, nbA = 3;
+
+      // Write a matrix of string named in scilab
+      _objScilab.createNamedMatrixOfBoolean("boolean_A", mbA, nbA, bA);
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'boolean_A =\');");
+      _objScilab.SendScilabJob("disp(boolean_A);");
+      //=============================================================================
+      // check if av
+      if (_objScilab.existNamedVariable("boolean_A") == true) {
+        Console.WriteLine("boolean_A exists in scilab");
+      }
+
+      if (_objScilab.existNamedVariable("boolean_B") == false) {
+        Console.WriteLine("boolean_B does not exist in scilab");
+      }
+      //=============================================================================
+      if (_objScilab.getNamedVarType("boolean_A") == (int)DotNetScilab.ScilabType.sci_boolean) {
+        Console.WriteLine("boolean_A is a matrix of boolean");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("boolean_B = ~boolean_A;");
+      // get dimensions of a named matrix of boolean
+      int[] DimbB = _objScilab.getNamedVarDimension("boolean_B");
+
+      // get named matrix of boolean
+      Boolean[] bB = _objScilab.getNamedMatrixOfBoolean("boolean_B");
+
+      Console.WriteLine("");
+      Console.WriteLine("(C#) bB =");
+      for (int i = 0; i < DimbB[0]; i++) {
+        for (int j = 0; j < DimbB[1]; j++) {
+          Console.Write(bB[j * DimbB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'boolean_B =\');");
+      _objScilab.SendScilabJob("disp(boolean_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_doplot3d(Scilab _objScilab) {
+      _objScilab.SendScilabJob("plot3d()");
+      while (_objScilab.HaveAGraph()) {
+        _objScilab.doEvent();
+      }
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfInt(Scilab _objScilab) {
+      //=============================================================================
+      int[] A = new int[] { 1, 2, 3, 4, 5, 6 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedMatrixOfInt32("int32_A", mA, nA, A);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'int32_A =\');");
+      _objScilab.SendScilabJob("disp(int32_A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("int32_A") == (int)DotNetScilab.ScilabType.sci_ints) {
+        Console.WriteLine("int32_A is a matrix of int(32)");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("int32_B = int32_A + 1;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("int32_B");
+
+      // get named matrix of double
+      int[] B = _objScilab.readNamedMatrixOfInt32("int32_B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) int32_B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(B[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'int32_B =\');");
+      _objScilab.SendScilabJob("disp(int32_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteComplexMatrixOfDouble(Scilab _objScilab) {
+      //=============================================================================
+      double[] realPartA = new double[] { 1, 2, 3, 4, 5, 6 };
+      double[] imagPartA = new double[] { 6, 5, 4, 3, 2, 1 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedComplexMatrixOfDouble("cplx_A", mA, nA, realPartA, imagPartA);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'cplx_A =\');");
+      _objScilab.SendScilabJob("disp(cplx_A);");
+      //=============================================================================
+      _objScilab.SendScilabJob("cplx_B = cplx_A * 2;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("cplx_B");
+
+      // get named matrix of double
+      double[] realPartB = _objScilab.readNamedComplexMatrixOfDoubleRealPart("cplx_B");
+      double[] imagPartB = _objScilab.readNamedComplexMatrixOfDoubleImgPart("cplx_B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) cplx_B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(realPartB[j * DimB[0] + i] + " + i *" + imagPartB[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'cplx_B =\');");
+      _objScilab.SendScilabJob("disp(cplx_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void Main(string[] args) {
+      Util.AddScilabInstalltionPathToEnvironment();
+      // start scilab engine with graphics
+      Scilab m_oSCilab = new Scilab(true);
+
+      example_readwriteMatrixOfDouble(m_oSCilab);
+
+      example_readwriteMatrixOfString(m_oSCilab);
+
+      example_readwriteMatrixOfBoolean(m_oSCilab);
+
+      example_readwriteMatrixOfInt(m_oSCilab);
+
+      example_readwriteComplexMatrixOfDouble(m_oSCilab);
+
+      //mkommend 11.11.2013: commented out as this functionality is not completely working
+      //chart is displayed, but hasFigures throws an exception
+      //example_doplot3d(m_oSCilab);
+    }
+    //=============================================================================
+  }
+}
+//=============================================================================
Index: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.csproj
===================================================================
--- trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.csproj	(revision 11829)
+++ trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0Example/cs_example.csproj	(revision 11829)
@@ -0,0 +1,107 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{10B5A5BF-3204-4B47-91C0-7FA614EFA94A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>cs_example</RootNamespace>
+    <AssemblyName>cs_example</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DotNetScilab-1.0">
+      <HintPath>..\..\..\..\bin\DotNetScilab-1.0.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="cs_example.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Util.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
