-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Samir L. Boulema
committed
Nov 13, 2015
1 parent
bbc1698
commit 0e2f9e3
Showing
43 changed files
with
746 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/src/AndroidPano/AndroidPano.xproj.csdat | ||
/src/AndroidPano/project.lock.json | ||
/.vs | ||
/artifacts | ||
/src/AndroidPano/*.user | ||
/src/AndroidPano/wwwroot/androidpano/48969534/tour.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.24627.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{20AA32C2-DE17-44B3-A9A8-180AAF5F7B90}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D0D10A03-B8C8-4A0A-B4EB-B5B7A481B950}" | ||
ProjectSection(SolutionItems) = preProject | ||
global.json = global.json | ||
NuGet.Config = NuGet.Config | ||
EndProjectSection | ||
EndProject | ||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "AndroidPano", "src\AndroidPano\AndroidPano.xproj", "{F19CD54D-B837-4679-B4D3-F359C702F49C}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{F19CD54D-B837-4679-B4D3-F359C702F49C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F19CD54D-B837-4679-B4D3-F359C702F49C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F19CD54D-B837-4679-B4D3-F359C702F49C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F19CD54D-B837-4679-B4D3-F359C702F49C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{F19CD54D-B837-4679-B4D3-F359C702F49C} = {20AA32C2-DE17-44B3-A9A8-180AAF5F7B90} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<packageSources> | ||
<!--To inherit the global NuGet package sources remove the <clear/> line below --> | ||
<clear /> | ||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"projects": [ "src", "test" ], | ||
"sdk": { | ||
"version": "1.0.0-beta8" | ||
} | ||
} |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>f19cd54d-b837-4679-b4d3-f359c702f49c</ProjectGuid> | ||
<RootNamespace>AndroidPano</RootNamespace> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<DevelopmentServerPort>15012</DevelopmentServerPort> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<DnxInvisibleContent Include="AndroidPano.xproj.csdat" /> | ||
</ItemGroup> | ||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Microsoft.AspNet.Mvc; | ||
using AndroidPano.Services; | ||
|
||
namespace AndroidPano.Controllers | ||
{ | ||
public class HomeController : Controller | ||
{ | ||
private readonly IPanoService panoService; | ||
|
||
public HomeController(IPanoService panoService) | ||
{ | ||
this.panoService = panoService; | ||
} | ||
|
||
public IActionResult Index() | ||
{ | ||
return View(); | ||
} | ||
|
||
[Route("{tinyId}")] | ||
public IActionResult Pano(string tinyId) | ||
{ | ||
panoService.LoadPano(tinyId); | ||
|
||
ViewData["Pano"] = $"androidpano/{tinyId}/tour.xml"; | ||
|
||
return View(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace AndroidPano.Models | ||
{ | ||
public class MediaItem | ||
{ | ||
public int Category; | ||
public string Url; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace AndroidPano.Models | ||
{ | ||
public class PanoModel | ||
{ | ||
private List<RootObject> Items { get; set; } | ||
|
||
public List<Pano> Panos { get; set; } | ||
public string GlobalId { get; set; } | ||
public string SoortAanbod { get; set; } | ||
|
||
public PanoModel(List<RootObject> items, string globalId, string soortAanbod) | ||
{ | ||
Items = items; | ||
GlobalId = globalId; | ||
SoortAanbod = soortAanbod; | ||
|
||
Panos = new List<Pano>(); | ||
foreach (var item in items) | ||
{ | ||
var pano = new Pano(); | ||
|
||
pano.Omschrijving = item.Omschrijving; | ||
if (Panos.Any(p => p.Omschrijving.Equals(item.Omschrijving))) | ||
{ | ||
pano.Omschrijving += item.IndexNumber; | ||
} | ||
|
||
pano.Id = item.Id; | ||
pano.Url = item.MediaItems.Where(mi => mi.Category == 23).Select(mi => mi.Url).FirstOrDefault(); | ||
Panos.Add(pano); | ||
} | ||
} | ||
|
||
public PanoModel(List<RootObject> items) | ||
{ | ||
Items = items; | ||
|
||
Panos = new List<Pano>(); | ||
foreach (var item in items) | ||
{ | ||
var pano = new Pano(); | ||
|
||
pano.Omschrijving = item.Omschrijving; | ||
pano.Url = "http://www.funda.nl"; | ||
Panos.Add(pano); | ||
} | ||
} | ||
|
||
public int GetIndex(Pano pano) | ||
{ | ||
for (int i = 0; i < Panos.Count; i++) | ||
{ | ||
if (Panos[i] == pano) return i; | ||
} | ||
return -1; | ||
} | ||
|
||
public string GetWebsite() | ||
{ | ||
switch (SoortAanbod.ToLower()) | ||
{ | ||
case "kantoor": | ||
case "bedrijfshal": | ||
case "winkel": | ||
case "horeca": | ||
case "bouwgrond": | ||
case "overig": | ||
return "fundainbusiness"; | ||
default: | ||
return "funda"; | ||
} | ||
} | ||
} | ||
|
||
public class Pano | ||
{ | ||
public string Omschrijving { get; set; } | ||
public string Url { get; set; } | ||
public string Id { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace AndroidPano.Models | ||
{ | ||
public class RootObject | ||
{ | ||
public string Id; | ||
public int IndexNumber; | ||
public List<MediaItem> MediaItems; | ||
public string Omschrijving; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace AndroidPano.Models | ||
{ | ||
public enum Sides | ||
{ | ||
l = 0, | ||
f = 1, | ||
r = 2, | ||
b = 3, | ||
u = 4, | ||
d = 5 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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("AndroidPano")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("AndroidPano")] | ||
[assembly: AssemblyCopyright("Copyright © 2015")] | ||
[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("f19cd54d-b837-4679-b4d3-f359c702f49c")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Microsoft.Framework.Configuration; | ||
using System; | ||
|
||
namespace AndroidPano.Services | ||
{ | ||
public class ConfigurationService : IConfigurationService | ||
{ | ||
private readonly IConfiguration configuration; | ||
|
||
public ConfigurationService(IConfiguration configuration) | ||
{ | ||
this.configuration = configuration; | ||
} | ||
|
||
public string Get(string key) | ||
{ | ||
string envValue = Environment.GetEnvironmentVariable(key); | ||
if (!string.IsNullOrEmpty(envValue)) | ||
{ | ||
return envValue; | ||
} | ||
return configuration[key]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace AndroidPano.Services | ||
{ | ||
public interface IConfigurationService | ||
{ | ||
string Get(string key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace AndroidPano.Services | ||
{ | ||
public interface IPanoService | ||
{ | ||
void LoadPano(string tinyId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using AndroidPano.Models; | ||
using System.Collections.Generic; | ||
using System.Xml.Linq; | ||
|
||
namespace AndroidPano.Services | ||
{ | ||
public interface IXMLService | ||
{ | ||
void Init(); | ||
void WriteToFile(string dir); | ||
void AddScene(Pano pano, IEnumerable<XElement> hotspots, string imageUrl); | ||
} | ||
} |
Oops, something went wrong.