Commits

Anonymous committed f02fcde

Adding NLog. Changing map generation.

Comments (1)

Files changed (5)

HamOntFire.Core/HamOntFire.Core.csproj

   <ItemGroup>
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <EmbeddedResource Include="Resources\map.png" />
+  </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Resources\image.jpg" />
   </ItemGroup>

HamOntFire.Core/MapGenerator.cs

             var events = td.GetEvents();
 
             // Create new memory bitmap
-            var bMap = new Bitmap(HeatMapWidth, HeatMapHeight);
+            //var bMap = new Bitmap(HeatMapWidth, HeatMapHeight);
+            Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream(@"HamOntFire.Core.Resources.map.png");
+            Bitmap bMap = (Bitmap)Bitmap.FromStream(s);
+
 
             // Lets loop through the events and create a point each iteration
             foreach (Event @event in events)
         {
             // Create new graphics surface from memory bitmap
             Graphics DrawSurface = Graphics.FromImage(bSurface);
-            // Set background color to white so that pixels can be correctly colorized
-            DrawSurface.Clear(Color.White);
+            //// Set background color to white so that pixels can be correctly colorized
+            //DrawSurface.Clear(Color.White);
 
             // Traverse heat point data and draw masks for each heat point
             foreach (HeatPoint DataPoint in aHeatPoints)

HamOntFire.Web/HamOntFire.Web.csproj

   <ItemGroup>
     <Content Include="App_Data\log4net.config" />
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="NLog.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 

HamOntFire.Web/NLog.config

+<nlog xmlns="http://www.nlog-project.org/schemas/NLog.netfx35.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <targets>
+    <target xsi:type="HttpEndpoint" Name="HttpEndpoint" />
+  </targets>
+  <rules>
+    <logger name="Raven.*" writeTo="HttpEndpoint"/>
+  </rules>
+</nlog>

HamOntFire.Web/Web.config

     <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
   </configSections>
   <connectionStrings>
-    <add name="RavenDB" connectionString="Url=http://localhost:8080" />
+    <!--<add name="RavenDB" connectionString="Url=http://localhost:8080" />-->
+    <add name="RavenDB" connectionString="Url=https://aeo.ravenhq.com/databases/AppHarbor_2b7ace49-9df2-4bae-bae2-777a6048808a;ApiKey=777b0fc3-6548-486b-b81d-8d4b4a2c8730" />
   </connectionStrings>
   <appSettings>
     <add key="webpages:Version" value="1.0.0.0" />