[gbrainy] Include sample extensions in the Mono develop project



commit 7ff0d7f71a45b70c07d6b7c2788eac369849a1d7
Author: Jordi Mas <jmas softcatala org>
Date:   Sat Mar 5 10:55:30 2011 +0100

    Include sample extensions in the Mono develop project

 RELEASE-PROCESS                                    |    2 +-
 gbrainy.sln                                        |   36 +++++++++++++
 sample_extensions/Calculation/CalculationSample.cs |    3 +-
 sample_extensions/Logic/PuzzleSample.cs            |    3 +-
 sample_extensions/Memory/MemorySample.cs           |    4 +-
 sample_extensions/README                           |    2 +-
 sample_extensions/calculation_extension.csproj     |   53 +++++++++++++++++++
 sample_extensions/logic_extension.csproj           |   55 ++++++++++++++++++++
 sample_extensions/memory_extension.csproj          |   55 ++++++++++++++++++++
 src/Clients/WebForms/WebForms.csproj               |    2 +-
 src/Core/Services/MemoryConfiguration.cs           |    2 +-
 11 files changed, 207 insertions(+), 10 deletions(-)
---
diff --git a/RELEASE-PROCESS b/RELEASE-PROCESS
index cb53548..296d260 100644
--- a/RELEASE-PROCESS
+++ b/RELEASE-PROCESS
@@ -22,5 +22,5 @@ See tests/README
 
 10) Update gbrainy releases page
 
-
+11) Review developer's documentation http://live.gnome.org/gbrainy/Extending
 
diff --git a/gbrainy.sln b/gbrainy.sln
index 76fc3c1..60b47e4 100644
--- a/gbrainy.sln
+++ b/gbrainy.sln
@@ -9,6 +9,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Games", "src\Games\Games.cs
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebForms", "src\Clients\WebForms\WebForms.csproj", "{6F788C5C-17C2-47BC-82C8-2D318D91CB76}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Extensions", "Extensions", "{229D47C2-80E9-4171-AB6B-95A034BA9186}"
+	ProjectSection(SolutionItems) = preProject
+		sample_extensions\README = sample_extensions\README
+	EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "memory_extension", "sample_extensions\memory_extension.csproj", "{DC13845E-1990-4713-90CD-AC154D9B4D10}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "logic_extension", "sample_extensions\logic_extension.csproj", "{DC13845E-1990-4713-90CD-DC154D9B4C12}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "calculation_extension", "sample_extensions\calculation_extension.csproj", "{DC13845E-1990-4713-90CD-DE154D924D12}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -31,6 +42,31 @@ Global
 		{A5DF4079-EF3D-43F8-A36E-EB47058631A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A5DF4079-EF3D-43F8-A36E-EB47058631A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A5DF4079-EF3D-43F8-A36E-EB47058631A7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC13845E-1990-4713-90CD-AC154D9B4D10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-AC154D9B4D10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-AC154D9B4D10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC13845E-1990-4713-90CD-AC154D9B4D10}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DE154D924D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DE154D924D12}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DE154D924D12}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DE154D924D12}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.Build.0 = Release|Any CPU
+		{DC13845E-1990-4713-90CD-DC154D9B4C12}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{DC13845E-1990-4713-90CD-AC154D9B4D10} = {229D47C2-80E9-4171-AB6B-95A034BA9186}
+		{DC13845E-1990-4713-90CD-DC154D9B4C12} = {229D47C2-80E9-4171-AB6B-95A034BA9186}
+		{DC13845E-1990-4713-90CD-DE154D924D12} = {229D47C2-80E9-4171-AB6B-95A034BA9186}
 	EndGlobalSection
 	GlobalSection(MonoDevelopProperties) = preSolution
 		StartupItem = src\Clients\WebForms\WebForms.csproj
diff --git a/sample_extensions/Calculation/CalculationSample.cs b/sample_extensions/Calculation/CalculationSample.cs
index 0adfa59..68e2515 100644
--- a/sample_extensions/Calculation/CalculationSample.cs
+++ b/sample_extensions/Calculation/CalculationSample.cs
@@ -20,7 +20,6 @@
 using System;
 using Cairo;
 using System.Text;
-using Mono.Unix;
 
 using gbrainy.Core.Main;
 using gbrainy.Core.Libraries;
@@ -62,7 +61,7 @@ public class CalculationSample : Game
 		op1 = number_a + number_b;
 		op2 = number_a * number_b;
 
-		right_answer = String.Format ("{0} and {1}", number_a, number_b);
+		Answer.Correct = String.Format ("{0} and {1}", number_a, number_b);
 	}
 
 	public override void Draw (CairoContextEx gr, int area_width, int area_height, bool rtl)
diff --git a/sample_extensions/Logic/PuzzleSample.cs b/sample_extensions/Logic/PuzzleSample.cs
index 31a4261..7e8b589 100644
--- a/sample_extensions/Logic/PuzzleSample.cs
+++ b/sample_extensions/Logic/PuzzleSample.cs
@@ -18,7 +18,6 @@
  */
 
 using Cairo;
-using Mono.Unix;
 using System;
 
 using gbrainy.Core.Main;
@@ -36,7 +35,7 @@ public class PuzzleSample : Game
 
 	protected override void Initialize ()
 	{
-		right_answer = "8";
+		Answer.Correct = "8";
 	}
 
 	public override void Draw (CairoContextEx gr, int area_width, int area_height, bool rtl)
diff --git a/sample_extensions/Memory/MemorySample.cs b/sample_extensions/Memory/MemorySample.cs
index 14ab459..314e998 100644
--- a/sample_extensions/Memory/MemorySample.cs
+++ b/sample_extensions/Memory/MemorySample.cs
@@ -19,7 +19,7 @@
 
 using System;
 using Cairo;
-using Mono.Unix;
+
 using System.Timers;
 using System.Collections.Generic;
 
@@ -73,7 +73,7 @@ public class MemorySample : Memory
 		animals_order.Initialize ();
 		answer = random.Next (showed);
 		tmp = animals_order [answer];
-		right_answer = animals [tmp];
+		Answer.Correct = animals [tmp];
 		base.Initialize ();
 	}
 
diff --git a/sample_extensions/README b/sample_extensions/README
index f8628ae..59c63a6 100644
--- a/sample_extensions/README
+++ b/sample_extensions/README
@@ -2,4 +2,4 @@ gbrainy sample extensions
 
 Just type 'make' to build the samples
 
-See http://live.gnome.org/gbrainy/Extensions for more details
+See http://live.gnome.org/gbrainy/Extending for more details
diff --git a/sample_extensions/calculation_extension.csproj b/sample_extensions/calculation_extension.csproj
new file mode 100644
index 0000000..18ebaa8
--- /dev/null
+++ b/sample_extensions/calculation_extension.csproj
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DC13845E-1990-4713-90CD-DE154D924D12}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>sample_extensions</RootNamespace>
+    <AssemblyName>gbrainy.calculation_sample_extension</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties InternalTargetFrameworkVersion="3.5" />
+    </MonoDevelop>
+  </ProjectExtensions>
+  <ItemGroup>
+    <ProjectReference Include="..\src\Core\Core.csproj">
+      <Project>{9F2F1F0C-DF7E-4054-B6BA-94F3DD9FF3D9}</Project>
+      <Name>Core</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Calculation\CalculationSample.addin.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Calculation\CalculationSample.cs" />
+  </ItemGroup>
+</Project>
diff --git a/sample_extensions/logic_extension.csproj b/sample_extensions/logic_extension.csproj
new file mode 100644
index 0000000..73dcbed
--- /dev/null
+++ b/sample_extensions/logic_extension.csproj
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DC13845E-1990-4713-90CD-DC154D9B4C12}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>sample_extensions</RootNamespace>
+    <AssemblyName>gbrainy.logic_sample_extension</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Logic\PuzzleSample.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties InternalTargetFrameworkVersion="3.5" />
+    </MonoDevelop>
+  </ProjectExtensions>
+  <ItemGroup>
+    <ProjectReference Include="..\src\Core\Core.csproj">
+      <Project>{9F2F1F0C-DF7E-4054-B6BA-94F3DD9FF3D9}</Project>
+      <Name>Core</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Logic\PuzzleSample.addin.xml">
+      <LogicalName>Logic.PuzzleSample.addin.xml</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/sample_extensions/memory_extension.csproj b/sample_extensions/memory_extension.csproj
new file mode 100644
index 0000000..f567722
--- /dev/null
+++ b/sample_extensions/memory_extension.csproj
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DC13845E-1990-4713-90CD-AC154D9B4D10}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>sample_extensions</RootNamespace>
+    <AssemblyName>gbrainy.memory_sample_extension</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Mono.Cairo, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties InternalTargetFrameworkVersion="3.5" />
+    </MonoDevelop>
+  </ProjectExtensions>
+  <ItemGroup>
+    <ProjectReference Include="..\src\Core\Core.csproj">
+      <Project>{9F2F1F0C-DF7E-4054-B6BA-94F3DD9FF3D9}</Project>
+      <Name>Core</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Memory\MemorySample.addin.xml">
+      <LogicalName>Memory.MemorySample.addin.xml</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Memory\MemorySample.cs" />
+  </ItemGroup>
+</Project>
diff --git a/src/Clients/WebForms/WebForms.csproj b/src/Clients/WebForms/WebForms.csproj
index 156f30b..d09bcca 100644
--- a/src/Clients/WebForms/WebForms.csproj
+++ b/src/Clients/WebForms/WebForms.csproj
@@ -9,7 +9,7 @@
     <ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <OutputType>Library</OutputType>
     <RootNamespace>WebForms</RootNamespace>
-    <AssemblyName>gbrainyWeb</AssemblyName>
+    <AssemblyName>gbrainy.Web</AssemblyName>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
diff --git a/src/Core/Services/MemoryConfiguration.cs b/src/Core/Services/MemoryConfiguration.cs
index bbcb836..afe9b56 100644
--- a/src/Core/Services/MemoryConfiguration.cs
+++ b/src/Core/Services/MemoryConfiguration.cs
@@ -38,7 +38,7 @@ namespace gbrainy.Core.Services
 				return (T) keys [key];
 			}
 
-			catch (KeyNotFoundException e)
+			catch (KeyNotFoundException)
 			{
 				throw new KeyNotFoundException (String.Format ("MemoryConfiguration.Get. Key '{0}' not found", key));
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]