Commits

Dougal Stanton committed 4799ecf

Path to image resources was wrong

Comments (0)

Files changed (2)

-<?xml version="1.0" encoding="utf-8"?>
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{5043134D-B4BB-42B2-8980-2C33AA697B1E}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <RootNamespace>Thud</RootNamespace>
    <AssemblyName>Thud</AssemblyName>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>..\..\Thud\Thud\bin\Debug\</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <RunWithWarnings>false</RunWithWarnings>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>none</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>..\..\Thud\Thud\bin\Release\</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <RunWithWarnings>false</RunWithWarnings>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="App.ico" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AssemblyInfo.cs" />
    <Compile Include="NetworkGameForm.cs" />
    <Compile Include="ThudBoard.cs" />
    <Compile Include="ThudButton.cs" />
    <Compile Include="ThudClient.cs" />
    <Compile Include="ThudForm.cs" />
    <Compile Include="ThudPiece.cs" />
    <Compile Include="ThudBoardTests.cs" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="DwarfPiece.jpg" />
    <EmbeddedResource Include="DwarfPieceLG.jpg" />
    <EmbeddedResource Include="DwarfPieceLSB.jpg" />
    <EmbeddedResource Include="NetworkGameForm.resx">
      <DependentUpon>NetworkGameForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="ThudForm.resx">
      <DependentUpon>ThudForm.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="TrollPiece.jpg" />
    <EmbeddedResource Include="TrollPieceLG.jpg" />
    <EmbeddedResource Include="TrollPieceLSB.jpg" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Runtime.Remoting" />
    <Reference Include="nunit.core, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Package>mono-nunit</Package>
    </Reference>
    <Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
      <Package>mono-nunit</Package>
    </Reference>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{5043134D-B4BB-42B2-8980-2C33AA697B1E}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>Thud</RootNamespace>
+    <AssemblyName>Thud</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\Thud\Thud\bin\Debug\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <RunWithWarnings>false</RunWithWarnings>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\Thud\Thud\bin\Release\</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <RunWithWarnings>false</RunWithWarnings>
+  </PropertyGroup>
+  <ItemGroup>
+    <Content Include="App.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs" />
+    <Compile Include="NetworkGameForm.cs" />
+    <Compile Include="ThudBoard.cs" />
+    <Compile Include="ThudButton.cs" />
+    <Compile Include="ThudClient.cs" />
+    <Compile Include="ThudForm.cs" />
+    <Compile Include="ThudPiece.cs" />
+    <Compile Include="ThudBoardTests.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="NetworkGameForm.resx">
+      <DependentUpon>NetworkGameForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ThudForm.resx">
+      <DependentUpon>ThudForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Images\DwarfPiece.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Images\TrollPiece.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Runtime.Remoting" />
+    <Reference Include="nunit.core, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+      <Package>mono-nunit</Package>
+    </Reference>
+    <Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+      <Package>mono-nunit</Package>
+    </Reference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>

Thud/ThudButton.cs

 		private static Color dwarf_selected = Color.LightGreen;
 		private static Color troll_selected = Color.LightSteelBlue;
 		
-		private static Image dwarfImage = new Bitmap(typeof(ThudButton), "DwarfPiece.png");
-		private static Image trollImage = new Bitmap(typeof(ThudButton), "TrollPiece.png");
+		private static Image dwarfImage = new Bitmap(typeof(ThudButton),
+		                                             "Images.DwarfPiece.png");
+		private static Image trollImage = new Bitmap(typeof(ThudButton),
+		                                             "Images.TrollPiece.png");
+		
 		
 		private int x, y;
 		private bool selected = false;