Merge branch 'develop' into feature/#173
Conflicts: CampusAppWP8/CampusAppWP8/Settings.StyleCop CampusAppWP8/CampusAppWP8/Utility/StringManager.cs
1
.gitignore
vendored
@@ -306,3 +306,4 @@ CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-native+javascript/ZXing.pr
|
||||
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/windows8-native+javascript/ZXing.winmd
|
||||
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/wp8/zxing.wp8.0.XML
|
||||
CampusAppWP8/packages/ZXing.Net.0.11.0.1/lib/wp8/zxing.wp8.0.dll
|
||||
work/.svn/
|
||||
|
||||
64
CampusAppWP8/CampusAppDLL/CampusAppDLL.csproj
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E4EC5B95-06FC-4304-97E2-9E3F9B980303}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CampusAppDLL</RootNamespace>
|
||||
<AssemblyName>CampusAppDLL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceService.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utility\Logger.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
|
||||
<Compile Include="Utility\StringManager.cs" />
|
||||
<Compile Include="Utility\XmlManager.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>
|
||||
45
CampusAppWP8/CampusAppDLL/Model/Campusmap/CBMainMapModel.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
using CampusAppDLL.Model.GeoDb;
|
||||
using CampusAppDLL.Utility;
|
||||
|
||||
namespace CampusAppDLL.Model.Campusmap
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MapModel of the mainCampus of cottbus
|
||||
/// </summary>
|
||||
public class CBMainMapModel : MapModel
|
||||
{
|
||||
/// <summary>Variable for the identify of the campus.</summary>
|
||||
private static readonly string Campus = "1";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
|
||||
/// </summary>
|
||||
public CBMainMapModel(string xmlFilePath) : base(xmlFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Loads the spatial./.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
protected override void LoadSpatials(string xmlFilePath)
|
||||
{
|
||||
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(xmlFilePath);
|
||||
|
||||
this.Spatial = new SpsModel();
|
||||
foreach (PlaceModel place in model.Places)
|
||||
{
|
||||
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
|
||||
{
|
||||
this.Spatial.Places.Add(place);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
48
CampusAppWP8/CampusAppDLL/Model/Campusmap/MapModel.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Model.Campusmap
|
||||
{
|
||||
using CampusAppDLL.Model.GeoDb;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a Map
|
||||
/// </summary>
|
||||
public class MapModel
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapModel" /> class.
|
||||
/// </summary>
|
||||
public MapModel(string xmlFilePath)
|
||||
{
|
||||
this.LoadSpatials(xmlFilePath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the spatial of the map.</summary>
|
||||
/// <value>The spatial.</value>
|
||||
public SpsModel Spatial { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>Loads the spatial./</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
protected virtual void LoadSpatials(string xmlFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
26
CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceInformation.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>19.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Model.GeoDb
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Information about the place.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
public class PlaceInformation
|
||||
{
|
||||
/// <summary>Gets or sets the name of the information.</summary>
|
||||
/// <value>The name of the information.</value>
|
||||
[XmlElement("placeInformationName")]
|
||||
public string InformationName { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the information value.</summary>
|
||||
/// <value>The information value.</value>
|
||||
[XmlText]
|
||||
public string InformationValue { get; set; }
|
||||
}
|
||||
}
|
||||
47
CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceModel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlaceModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppDLL.Model.GeoDb
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a place of the SPSService
|
||||
/// </summary>
|
||||
public class PlaceModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the placeId
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public string PlaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the "parent" of a place
|
||||
/// </summary>
|
||||
[XmlAttribute("parentId")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ReferencePoint of a place
|
||||
/// </summary>
|
||||
[XmlAttribute("refpoint")]
|
||||
public string RefPoint { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the information.</summary>
|
||||
/// <value>The information.</value>
|
||||
[XmlElement("placeInformation")]
|
||||
public ObservableCollection<PlaceInformation> Informations { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the services.</summary>
|
||||
/// <value>The services.</value>
|
||||
[XmlElement("placeService")]
|
||||
public ObservableCollection<PlaceService> Services { get; set; }
|
||||
}
|
||||
}
|
||||
32
CampusAppWP8/CampusAppDLL/Model/GeoDb/PlaceService.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="PlaceService.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>19.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppDLL.Model.GeoDb
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Place service.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
public class PlaceService
|
||||
{
|
||||
/// <summary>Gets or sets the name of the service.</summary>
|
||||
/// <value>The name of the service.</value>
|
||||
[XmlAttribute("placeServiceName")]
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the SAP of an service.</summary>
|
||||
/// <value>The sap.</value>
|
||||
[XmlElement("sap")]
|
||||
public string SAP { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the request for a place.</summary>
|
||||
/// <value>The request.</value>
|
||||
[XmlElement("request")]
|
||||
public string Request { get; set; }
|
||||
}
|
||||
}
|
||||
87
CampusAppWP8/CampusAppDLL/Model/GeoDb/SpsModel.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SpsModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppDLL.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a xml-response of the SPSService
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class SpsModel
|
||||
{
|
||||
/// <summary>Initializes a new instance of the SpsModel class.</summary>
|
||||
/// <remarks>Stubbfel, 20.08.2013.</remarks>
|
||||
public SpsModel()
|
||||
{
|
||||
this.Places = new ObservableCollection<PlaceModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of places
|
||||
/// </summary>
|
||||
[XmlElement("place")]
|
||||
public ObservableCollection<PlaceModel> Places { get; set; }
|
||||
|
||||
/// <summary>Gets places by information.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="query"> The query.</param>
|
||||
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
|
||||
/// <param name="informationName">(Optional) name of the information.</param>
|
||||
/// <returns>The places by information.</returns>
|
||||
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, string informationName = null)
|
||||
{
|
||||
string querryLow = string.Empty;
|
||||
IEnumerable<PlaceModel> resultplaces = null;
|
||||
|
||||
// select correct statement
|
||||
if (ignoreCases && informationName == null)
|
||||
{
|
||||
querryLow = query.ToLower();
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.ToLower().Contains(querryLow)
|
||||
select place;
|
||||
}
|
||||
else if (ignoreCases && informationName != null)
|
||||
{
|
||||
querryLow = query.ToLower();
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.ToLower().Contains(querryLow) && info.InformationName.Equals(informationName)
|
||||
select place;
|
||||
}
|
||||
else if (!ignoreCases && informationName == null)
|
||||
{
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.Contains(querryLow)
|
||||
select place;
|
||||
}
|
||||
else if (!ignoreCases && informationName != null)
|
||||
{
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.Contains(querryLow) && info.InformationName.Equals(informationName)
|
||||
select place;
|
||||
}
|
||||
|
||||
// null assert
|
||||
if (resultplaces == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return resultplaces.ToList<PlaceModel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
CampusAppWP8/CampusAppDLL/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die mit einer Assembly verknüpft sind.
|
||||
[assembly: AssemblyTitle("CampusAppDLL")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CampusAppDLL")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("883d352f-0864-47db-8a04-f5eee0800a6d")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
35
CampusAppWP8/CampusAppDLL/Utility/Logger.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
//--------------------------------------------------------------------
|
||||
// <copyright file="Logger.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility
|
||||
{
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// This Class creates logs for the app
|
||||
/// </summary>
|
||||
public class Logger
|
||||
{
|
||||
/// <summary>
|
||||
/// Method log a Exception
|
||||
/// </summary>
|
||||
/// <param name="exception">exception which has to log</param>
|
||||
public static void LogException(Exception exception)
|
||||
{
|
||||
// Console.WriteLine(exception);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log a message.
|
||||
/// </summary>
|
||||
/// <param name="msg">to be logged message</param>
|
||||
public static void LogMsg(string msg)
|
||||
{
|
||||
// Console.WriteLine(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
154
CampusAppWP8/CampusAppDLL/Utility/NDEF/NDEFMessage.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFMessage.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility.NDEF
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
/// <summary>Ndef message.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public class NDEFMessage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>The records.</summary>
|
||||
private List<NDEFRecord> records;
|
||||
|
||||
#endregion
|
||||
|
||||
#region constructors
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="tnf"> (Optional) the tnf.</param>
|
||||
public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT)
|
||||
{
|
||||
this.records = new List<NDEFRecord>();
|
||||
float recordsCount = (float)content.Length / NDEFRecord.MaxRecordPayLoad;
|
||||
NDEFRecord tmpRecord = null;
|
||||
string praefix = NDEFMessage.GetPraefix(type);
|
||||
|
||||
for (int i = 0; recordsCount > 0; i++)
|
||||
{
|
||||
tmpRecord = new NDEFShortRecord();
|
||||
tmpRecord.Type = type;
|
||||
tmpRecord.TNF = tnf;
|
||||
tmpRecord.PayloadPraefix = praefix;
|
||||
int recordsize = 255;
|
||||
if (content.Length < (i + 1) * recordsize)
|
||||
{
|
||||
recordsize = content.Length - (i * recordsize);
|
||||
}
|
||||
|
||||
tmpRecord.Payload = content.Substring(i * 255, recordsize);
|
||||
if (i == 0)
|
||||
{
|
||||
tmpRecord.MB = NDEFRecord.NDEFFlags.MBSET;
|
||||
}
|
||||
|
||||
this.records.Add(tmpRecord);
|
||||
recordsCount--;
|
||||
}
|
||||
|
||||
this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
public NDEFMessage(byte[] array)
|
||||
{
|
||||
this.records = new List<NDEFRecord>();
|
||||
|
||||
NDEFRecord tmpRecord = null;
|
||||
for (int i = 0; i < array.Length; i += tmpRecord.RecordSize)
|
||||
{
|
||||
tmpRecord = new NDEFShortRecord(array, i);
|
||||
|
||||
this.records.Add(tmpRecord);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enum
|
||||
|
||||
/// <summary>Values that represent TYPEVAL.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum TYPEVAL
|
||||
{
|
||||
/// <summary>An enum constant representing the empty option.</summary>
|
||||
EMPTY = 0x00,
|
||||
|
||||
/// <summary>An enum constant representing the URL option.</summary>
|
||||
URL = 0x55,
|
||||
|
||||
/// <summary>An enum constant representing the text option.</summary>
|
||||
TEXT = 0x54,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>Gets a praefix.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <returns>The praefix.</returns>
|
||||
public static string GetPraefix(TYPEVAL type)
|
||||
{
|
||||
string praefix = string.Empty;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case TYPEVAL.TEXT:
|
||||
praefix = "\x02" + "de";
|
||||
break;
|
||||
case TYPEVAL.URL:
|
||||
praefix = "\x01";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return praefix;
|
||||
}
|
||||
|
||||
/// <summary>Gets the content.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>The content.</returns>
|
||||
public string GetContent()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
foreach (NDEFRecord record in this.records)
|
||||
{
|
||||
result += record.Payload;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>Converts this object to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public byte[] ToByteArray()
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
foreach (NDEFRecord record in this.records)
|
||||
{
|
||||
ms.Write(record.ToByteArray(), 0, record.RecordSize);
|
||||
}
|
||||
|
||||
return ms.ToArray();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
188
CampusAppWP8/CampusAppDLL/Utility/NDEF/NDEFRecord.cs
Normal file
@@ -0,0 +1,188 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFRecord.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility.NDEF
|
||||
{
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>Ndef record of a NDEFMessage.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public abstract class NDEFRecord
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>The maximum record pay load.</summary>
|
||||
public const int MaxRecordPayLoad = 255;
|
||||
|
||||
/// <summary>Size of the type.</summary>
|
||||
protected const byte TypeSize = 0x01;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public NDEFRecord()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
/// <param name="index">(Optional) zero-based index of the.</param>
|
||||
public NDEFRecord(byte[] array, int index = 0)
|
||||
{
|
||||
this.FormatFlags = array[index];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enum
|
||||
|
||||
/// <summary>Values that represent NDEFFlags.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum NDEFFlags
|
||||
{
|
||||
/// <summary>An Enum constant representing the UNSET option.</summary>
|
||||
UNSET = 0x00,
|
||||
|
||||
/// <summary>An Enum constant representing the Message begin option.</summary>
|
||||
MBSET = 0x80,
|
||||
|
||||
/// <summary>An Enum constant representing the Message end option.</summary>
|
||||
MESET = 0x40,
|
||||
|
||||
/// <summary>An Enum constant representing the CHUNK FLAG option.</summary>
|
||||
CFSET = 0x20,
|
||||
|
||||
/// <summary>An Enum constant representing the Short Record set option.</summary>
|
||||
SRSET = 0x10,
|
||||
|
||||
/// <summary>An Enum constant representing the ID length option.</summary>
|
||||
ILSET = 0x08,
|
||||
|
||||
/// <summary>An enum constant representing the tnfset option.</summary>
|
||||
TNFSET = 0x03
|
||||
}
|
||||
|
||||
/// <summary>Values that represent TNFVAL.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum TNFVAL
|
||||
{
|
||||
/// <summary>An enum constant representing the empty option.</summary>
|
||||
EMPTY = 0x00,
|
||||
|
||||
/// <summary>An enum constant representing the Well-Know-Type option.</summary>
|
||||
WKT = 0x01,
|
||||
|
||||
/// <summary>An enum constant representing the MediaType option.</summary>
|
||||
MEDIATYPE = 0x02,
|
||||
|
||||
/// <summary>An enum constant representing the URI option.</summary>
|
||||
URI = 0x03,
|
||||
|
||||
/// <summary>An enum constant representing the NFCE option.</summary>
|
||||
NFCE = 0x04,
|
||||
|
||||
/// <summary>An enum constant representing the unknow option.</summary>
|
||||
unknow = 0x05,
|
||||
|
||||
/// <summary>An enum constant representing the unchanged option.</summary>
|
||||
UNCHANGED = 0x06,
|
||||
|
||||
/// <summary>An enum constant representing the reserved option.</summary>
|
||||
RESERVED = 0x07
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>Gets or sets the MBFlag.</summary>
|
||||
/// <value>The MBFlag.</value>
|
||||
public NDEFFlags MB { get; set; }
|
||||
|
||||
/// <summary>Gets or sets MEFlag.</summary>
|
||||
/// <value>The MEFlag .</value>
|
||||
public NDEFFlags ME { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the CFFlag.</summary>
|
||||
/// <value>The CFFlag.</value>
|
||||
public NDEFFlags CF { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the SRFlag.</summary>
|
||||
/// <value>The SRFlag.</value>
|
||||
public NDEFFlags SR { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the ILFlag.</summary>
|
||||
/// <value>The ILFlag.</value>
|
||||
public NDEFFlags IL { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the TNFField.</summary>
|
||||
/// <value>The TNFField.</value>
|
||||
public TNFVAL TNF { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the type.</summary>
|
||||
/// <value>The type.</value>
|
||||
public NDEFMessage.TYPEVAL Type { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the format flags.</summary>
|
||||
/// <value>The format flags.</value>
|
||||
public byte FormatFlags
|
||||
{
|
||||
get
|
||||
{
|
||||
return (byte)((byte)this.TNF | ((byte)this.MB) | ((byte)this.ME) | ((byte)this.CF) | ((byte)this.SR) | ((byte)this.IL));
|
||||
}
|
||||
|
||||
protected set
|
||||
{
|
||||
this.TNF = (TNFVAL)(value & (byte)NDEFFlags.TNFSET);
|
||||
this.MB = (NDEFFlags)(value & (byte)NDEFFlags.MBSET);
|
||||
this.ME = (NDEFFlags)(value & (byte)NDEFFlags.MESET);
|
||||
this.CF = (NDEFFlags)(value & (byte)NDEFFlags.CFSET);
|
||||
this.SR = (NDEFFlags)(value & (byte)NDEFFlags.SRSET);
|
||||
this.IL = (NDEFFlags)(value & (byte)NDEFFlags.ILSET);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the payload.</summary>
|
||||
/// <value>The payload.</value>
|
||||
public string Payload { get; set; }
|
||||
|
||||
/// <summary>Gets the size of the record.</summary>
|
||||
/// <value>The size of the record.</value>
|
||||
public int RecordSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.HeaderSize + this.Payload.Length + this.PayloadPraefix.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the payload praefix.</summary>
|
||||
/// <value>The payload praefix.</value>
|
||||
public string PayloadPraefix { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the size of the header.</summary>
|
||||
/// <value>The size of the header.</value>
|
||||
protected int HeaderSize { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>Converts the record to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public abstract byte[] ToByteArray();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
// End of Utility\NDEF\NDEFRecord.cs
|
||||
63
CampusAppWP8/CampusAppDLL/Utility/NDEF/NDEFShortRecord.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFShortRecord.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility.NDEF
|
||||
{
|
||||
using System.Text;
|
||||
|
||||
/// <summary>Ndef short record.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public class NDEFShortRecord : NDEFRecord
|
||||
{
|
||||
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public NDEFShortRecord()
|
||||
{
|
||||
this.HeaderSize = 4;
|
||||
this.SR = NDEFFlags.SRSET;
|
||||
this.IL = NDEFFlags.UNSET;
|
||||
this.CF = NDEFFlags.UNSET;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
/// <param name="index">(Optional) zero-based index of the.</param>
|
||||
public NDEFShortRecord(byte[] array, int index = 0)
|
||||
: base(array)
|
||||
{
|
||||
this.HeaderSize = 4;
|
||||
this.Type = (NDEFMessage.TYPEVAL)array[index + 3];
|
||||
this.PayloadPraefix = NDEFMessage.GetPraefix(this.Type);
|
||||
int payLoadSize = array[index + 2] - this.PayloadPraefix.Length;
|
||||
this.Payload = Encoding.UTF8.GetString(array, index + this.HeaderSize + this.PayloadPraefix.Length, payLoadSize);
|
||||
}
|
||||
|
||||
/// <summary>Converts this NDEFShortRecord to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public override byte[] ToByteArray()
|
||||
{
|
||||
byte[] payloadAr = Encoding.UTF8.GetBytes(this.PayloadPraefix + this.Payload);
|
||||
byte[] array = new byte[payloadAr.Length + this.HeaderSize];
|
||||
|
||||
array[0] = this.FormatFlags;
|
||||
array[1] = NDEFRecord.TypeSize;
|
||||
array[2] = (byte)(Payload.Length + this.PayloadPraefix.Length);
|
||||
array[3] = (byte)this.Type;
|
||||
|
||||
int i = this.HeaderSize;
|
||||
foreach (byte b in payloadAr)
|
||||
{
|
||||
array[i] = b;
|
||||
i++;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
}
|
||||
}
|
||||
59
CampusAppWP8/CampusAppDLL/Utility/StringManager.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StringManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility
|
||||
{
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some special StringMethods
|
||||
/// </summary>
|
||||
public static class StringManager
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Patter for Html-Tags
|
||||
/// </summary>
|
||||
private static readonly string HtmlTagPattern = "<.*?>";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method removes Html-Tag of a String
|
||||
/// </summary>
|
||||
/// <param name="inputString">String with Html-Tags</param>
|
||||
/// <returns>String without Html-Tags</returns>
|
||||
public static string StripHTML(string inputString)
|
||||
{
|
||||
return Regex.Replace(inputString, HtmlTagPattern, string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method add an Newline to a string
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>input string + newline</returns>
|
||||
public static string AddNewLine(string str)
|
||||
{
|
||||
return str.ToString() + "\n";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method remove(TrimEND!) an Newline to a string
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>input string - newline</returns
|
||||
public static string RemoveNewLine(string str)
|
||||
{
|
||||
return str.TrimEnd('\n');
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
88
CampusAppWP8/CampusAppDLL/Utility/XmlManager.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="XmlManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppDLL.Utility
|
||||
{
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some Xml-methods
|
||||
/// </summary>
|
||||
public class XmlManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Method deserialization a string to a Model
|
||||
/// </summary>
|
||||
/// <typeparam name="T">the model</typeparam>
|
||||
/// <param name="xmlString">the XmlString</param>
|
||||
/// <param name="validRootName">name of the RootTag</param>
|
||||
/// <returns>return the deserialization of the model</returns>
|
||||
public static T DeserializationToModel<T>(string xmlString, string validRootName)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
XDocument document = XDocument.Parse(xmlString);
|
||||
if (!document.Root.Name.ToString().Equals(validRootName))
|
||||
{
|
||||
XElement content = document.Root;
|
||||
document = new XDocument();
|
||||
document.Add(new XElement(validRootName, content));
|
||||
}
|
||||
|
||||
T model = (T)serializer.Deserialize(document.CreateReader());
|
||||
return model;
|
||||
}
|
||||
|
||||
/// <summary>Deserialization a xml file to a model.</summary>
|
||||
/// <remarks>Stubbfel, 20.08.2013.</remarks>
|
||||
/// <typeparam name="T">Generic type parameter.</typeparam>
|
||||
/// <param name="xmlFilePath">Path to the a XmlFile.</param>
|
||||
/// <returns>model of the XmlFile.</returns>
|
||||
public static T DeserializationFileToModel<T>(string xmlFilePath)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
XDocument document = XDocument.Load(xmlFilePath);
|
||||
T model = (T)serializer.Deserialize(document.CreateReader());
|
||||
return model;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method serializes a model to a string.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">type of the model</typeparam>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>serialized string</returns>
|
||||
public static string SerializationToString<T>(T model)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
|
||||
ns.Add(string.Empty, string.Empty);
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
TextWriter writer = new StringWriter();
|
||||
|
||||
serializer.Serialize(writer, model, ns);
|
||||
|
||||
retValue = writer.ToString();
|
||||
|
||||
if (retValue.StartsWith("<?xml") == true)
|
||||
{
|
||||
int endTag = retValue.IndexOf("?>");
|
||||
retValue = retValue.Substring(endTag + 2);
|
||||
|
||||
if (retValue.StartsWith("\r\n") == true)
|
||||
{
|
||||
retValue = retValue.Substring(2);
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
146
CampusAppWP8/CampusAppW8.sln
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWStore8", "CampussAppWStore8\CampusAppWStore8.csproj", "{E49420AA-3023-42EF-8255-67B1F5E52B43}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWPortalLib8", "CampusAppWPortalLib8\CampusAppWPortalLib8.csproj", "{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}"
|
||||
EndProject
|
||||
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "IconCreator", "IconCreator\IconCreator.pyproj", "{78E8DC22-F4E1-42D9-BA04-93EA031C630C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppDLL", "CampusAppDLL\CampusAppDLL.csproj", "{E4EC5B95-06FC-4304-97E2-9E3F9B980303}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.Build.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Win32.Deploy.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Mixed Platforms.Deploy.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.ActiveCfg = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.Build.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Win32.Deploy.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.ActiveCfg = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.Build.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|Win32.Deploy.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.Build.0 = Debug|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.Build.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.Build.0 = Release|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Mixed Platforms.Deploy.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.ActiveCfg = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.Build.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|Win32.Deploy.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.ActiveCfg = Release|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.Build.0 = Release|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x64.Deploy.0 = Release|x64
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.ActiveCfg = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.Build.0 = Release|x86
|
||||
{E49420AA-3023-42EF-8255-67B1F5E52B43}.Release|x86.Deploy.0 = Release|x86
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{78E8DC22-F4E1-42D9-BA04-93EA031C630C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E4EC5B95-06FC-4304-97E2-9E3F9B980303}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Build.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Build.0 = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.ActiveCfg = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Build.0 = Release|x86
|
||||
{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -2,6 +2,7 @@
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Net.NetworkInformation;
|
||||
using Microsoft.Phone.Shell;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
@@ -140,7 +141,27 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
private void LoadSettings()
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
Settings.AppSetting.DevMode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.AppSetting.DevMode = false;
|
||||
}
|
||||
|
||||
this.UserSettingsLoaded();
|
||||
|
||||
Settings.AppSetting.UniNetwork = Utilities.IsUniNetworkAvailable();
|
||||
if (!Settings.AppSetting.UniNetwork)
|
||||
{
|
||||
Settings.AppSetting.WifiEnable = Utilities.IsWifiAvailable();
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.AppSetting.WifiEnable = true;
|
||||
}
|
||||
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
{
|
||||
Thread thread = new Thread(new ThreadStart(Utilities.DetermineAndStoreCurrentPosition));
|
||||
|
||||
|
After Width: | Height: | Size: 8.1 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/exams_159.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/person_159.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/exams_159.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/person_159.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
@@ -100,16 +100,26 @@
|
||||
</Compile>
|
||||
<Compile Include="Feed\Departments\DepartmentFavoriteFeed.cs" />
|
||||
<Compile Include="Const.cs" />
|
||||
<Compile Include="Feed\Exams\ExamFeed.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeedSBFMain.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeedCBSouth.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeedCBNorth.cs" />
|
||||
<Compile Include="Feed\Mensa\MensaFeedCBMain.cs" />
|
||||
<Compile Include="File\Exams\ExamFile.cs" />
|
||||
<Compile Include="Model\BinaryModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\CurrentPositionPinModel.cs" />
|
||||
<Compile Include="Model\Campusmap\HiddenPinPlaceModel.cs" />
|
||||
<Compile Include="Model\Campusmap\SearchPlacePinModel.cs" />
|
||||
<Compile Include="Model\Exams\ExamListModel.cs" />
|
||||
<Compile Include="Model\Exams\ExamModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceService.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.cs" />
|
||||
<Compile Include="Model\Mensa\MealModel.cs" />
|
||||
<Compile Include="Model\Person\PersonFunctionModel.cs" />
|
||||
<Compile Include="Model\Person\PersonModel.cs" />
|
||||
<Compile Include="Model\Setting\AppSettings.cs" />
|
||||
<Compile Include="Model\Setting\UserProfilModel.cs" />
|
||||
<Compile Include="Model\TimeTable\AppointmentModel.cs" />
|
||||
@@ -173,6 +183,12 @@
|
||||
<Compile Include="Utility\ICSProperties\UniqueID.cs" />
|
||||
<Compile Include="Utility\ICSProperties\Url.cs" />
|
||||
<Compile Include="Utility\ICSProperties\Version.cs" />
|
||||
<Compile Include="Pages\Exams\Exams.xaml.cs">
|
||||
<DependentUpon>Exams.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Person\PersonPage.xaml.cs">
|
||||
<DependentUpon>PersonPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
|
||||
@@ -349,6 +365,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Exams\Exams.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\LecturePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -393,6 +413,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Person\PersonPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Setting\AppSettingPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -452,18 +476,24 @@
|
||||
<Content Include="Assets\Icons\DarkTheme\add_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\btulogo_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\campus_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\current_position_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\delete_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\exams_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\favorite_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\info_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\person_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\phone_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\search_place_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\update_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\add_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\btulogo_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\campus_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\departments_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\current_position_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\delete_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\homework_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\exams_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\favorite_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\homework_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\link_159.png" />
|
||||
@@ -478,11 +508,13 @@
|
||||
<Content Include="Assets\Icons\DarkTheme\openhours_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\openhours_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\schedule_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\person_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\phone_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\schedule_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\search_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\search_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\student_council_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\search_place_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\student_council_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\update_159.png" />
|
||||
@@ -541,10 +573,12 @@
|
||||
<HintPath>..\packages\ZXing.Net.0.11.0.1\lib\wp8\zxing.wp8.0.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Feed\Utility\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
59
CampusAppWP8/CampusAppWP8/Feed/Exams/ExamFeed.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Exams
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Exams;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Exam feed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
public class ExamFeed : XmlModel<ExamListModel>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the ExamFeed class.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
public ExamFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileExamApp_ExamFeed, Constants.UrlExamApp_ExamFeed)
|
||||
{
|
||||
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.ValidRootName = Constants.ExamXmlValidRootName;
|
||||
}
|
||||
|
||||
/// <summary>Check is model up to date.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
private bool CheckIsModelUpToDate(ExamListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Check is file up to date.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="model"> The model.</param>
|
||||
/// <param name="fileInfo">Information describing the file.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
private bool CheckIsFileUpToDate(ExamListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ namespace CampusAppWP8.Feed.Link
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists)
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CampusAppWP8.Feed.Link
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists)
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,14 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the title.</summary>
|
||||
/// <value>The title.</value>
|
||||
public string Title { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region public
|
||||
@@ -88,7 +96,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(MenuWeekModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists)
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBMain()
|
||||
: base(Constants.FileMensa_Shedule_CBMain, Constants.UrlMensa_Week_CBMain)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBNorth()
|
||||
: base(Constants.FileMensa_Shedule_CBNorth, Constants.UrlMensa_Week_CBNorth)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBNorth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedCBSouth()
|
||||
: base(Constants.FileMensa_Shedule_CBSouth, Constants.UrlMensa_Week_CBSouth)
|
||||
{
|
||||
this.Title = AppResources.Campus_CBSouth;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CampusAppWP8.Feed.Mensa
|
||||
public MensaFeedSBFMain()
|
||||
: base(Constants.FileMensa_Shedule_SBFMain, Constants.UrlMensa_Week_SBFMain)
|
||||
{
|
||||
this.Title = AppResources.Campus_SFBMain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CampusAppWP8.Feed.StudentCouncil
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(StudentCouncilListModel model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists)
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<placeInformation placeInformationName="name">Lehrgebäude Musikpädagogik</placeInformation>
|
||||
</place>
|
||||
<place id="127003463" parentId="1" refpoint="POINT(14.329434351923076 51.76722032307691)">
|
||||
<placeInformation placeInformationName="name">Informations, Kommunikations und Medienzentrum</placeInformation>
|
||||
<placeInformation placeInformationName="name">Informations, Kommunikations und Medienzentrum (IKMZ)</placeInformation>
|
||||
<placeInformation placeInformationName="typ">library</placeInformation>
|
||||
</place>
|
||||
<place id="127003745" parentId="1" refpoint="POINT(14.330883875 51.7678221)">
|
||||
@@ -81,7 +81,7 @@
|
||||
<placeInformation placeInformationName="name">Baustofflabor</placeInformation>
|
||||
</place>
|
||||
<place id="129258388" parentId="1" refpoint="POINT(14.322364300000002 51.76576072500001)">
|
||||
<placeInformation placeInformationName="name">Studentenwerk Frankfurt (Oder)</placeInformation>
|
||||
<placeInformation placeInformationName="name">Studentenwerk Frankfurt (Oder) (SW)</placeInformation>
|
||||
</place>
|
||||
<place id="129258396" parentId="1" refpoint="POINT(14.32840075 51.765809774999994)">
|
||||
<placeInformation placeInformationName="name">Zentralverwaltung Hubertstraße (ZVH)</placeInformation>
|
||||
@@ -167,7 +167,7 @@
|
||||
<placeInformation placeInformationName="name">Garagenkomplex</placeInformation>
|
||||
</place>
|
||||
<place id="145128365" parentId="1" refpoint="POINT(14.3245076125 51.7680148)">
|
||||
<placeInformation placeInformationName="name">Lehrgebäude 1C</placeInformation>
|
||||
<placeInformation placeInformationName="name">Lehrgebäude 1C (LG1C)</placeInformation>
|
||||
</place>
|
||||
<place id="145128368" parentId="1" refpoint="POINT(14.323577843750002 51.768762243750004)">
|
||||
<placeInformation placeInformationName="name">Lehrgebäude 3</placeInformation>
|
||||
@@ -210,7 +210,7 @@
|
||||
<placeInformation placeInformationName="typ">entrance</placeInformation>
|
||||
</place>
|
||||
<place id="145132460" parentId="1" refpoint="POINT(14.327332890909092 51.767140422727266)">
|
||||
<placeInformation placeInformationName="name">Hauptgebäude</placeInformation>
|
||||
<placeInformation placeInformationName="name">Hauptgebäude (HG)</placeInformation>
|
||||
</place>
|
||||
<place id="145132464" parentId="1" refpoint="POINT(14.327362925 51.76601645)">
|
||||
<placeInformation placeInformationName="name">Zentralverwaltung</placeInformation>
|
||||
|
||||
94
CampusAppWP8/CampusAppWP8/File/Exams/ExamFile.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamFile.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.File.Exams
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using Windows.Storage;
|
||||
|
||||
/// <summary>Exam file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
public class ExamFile : BinaryModel
|
||||
{
|
||||
/// <summary>The storage file.</summary>
|
||||
private StorageFile storageFile;
|
||||
|
||||
/// <summary>Initializes a new instance of the ExamFile class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="fileName">Filename of the file.</param>
|
||||
/// <param name="url"> URL of the document.</param>
|
||||
public ExamFile(string fileName, string url)
|
||||
: base(ModelType.FileAndFeed, fileName, url)
|
||||
{
|
||||
this.IsFileUpToDateOnLoad += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.IsModelUpToDateOnLoad += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
this.IsFileUpToDateOnSave += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
}
|
||||
|
||||
/// <summary>Executes the file operation.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
public async void LaunchFile()
|
||||
{
|
||||
if (this.storageFile == null)
|
||||
{
|
||||
this.storageFile = await this.file.AsStorageFile();
|
||||
}
|
||||
|
||||
if (this.storageFile != null)
|
||||
{
|
||||
var options = new Windows.System.LauncherOptions();
|
||||
Windows.System.Launcher.LaunchFileAsync(this.storageFile);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Saves the and launch file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
public void SaveAndLaunchFile()
|
||||
{
|
||||
if (this.file.Exist())
|
||||
{
|
||||
this.LaunchFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.OnSaved += new ExamFile.OnIO(this.LaunchFile);
|
||||
this.SaveData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Check is model up to date.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
private bool CheckIsModelUpToDate(byte[] model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Check is file up to date.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="model"> The model.</param>
|
||||
/// <param name="fileInfo">Information describing the file.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
private bool CheckIsFileUpToDate(byte[] model, FileInfo fileInfo)
|
||||
{
|
||||
if (fileInfo == null || !fileInfo.Exists || fileInfo.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
62
CampusAppWP8/CampusAppWP8/Model/BinaryModel.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="BinaryModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model
|
||||
{
|
||||
/// <summary>Binary model.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
public abstract class BinaryModel : MainModel<byte[]>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="modelType">Type of the model.</param>
|
||||
/// <param name="fileName"> Filename of the file.</param>
|
||||
/// <param name="url"> URL of the document.</param>
|
||||
public BinaryModel(ModelType modelType, string fileName, string url)
|
||||
: base(modelType, fileName, url)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the BinaryModel class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="modelType"> Type of the model.</param>
|
||||
/// <param name="sourceName">Name of the source.</param>
|
||||
public BinaryModel(ModelType modelType, string sourceName)
|
||||
: base(modelType, sourceName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Deserialize model.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="modelData">Information describing the model.</param>
|
||||
/// <returns>true if it succeeds, false if it fails.</returns>
|
||||
protected override bool DeserializeModel(byte[] modelData)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (modelData != null)
|
||||
{
|
||||
this.Model = modelData;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>Gets the serialize model.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <returns>an byte Array.</returns>
|
||||
protected override byte[] SerializeModel()
|
||||
{
|
||||
return this.Model;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CurrentPositionPinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Current position pin model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public class CurrentPositionPinModel : MapPinModel
|
||||
{
|
||||
/// <summary>Initializes a new instance of the CurrentPositionPinModel class.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public CurrentPositionPinModel()
|
||||
{
|
||||
this.ImageSource = Icons.CurrentPosition;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -34;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="HiddenPinPlaceModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
/// <summary>Hidden pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public class HiddenPinPlaceModel : MapPinModel
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -114,60 +114,73 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
return new Point(x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position
|
||||
/// </summary>
|
||||
/// <param name="x">the x- coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPin(double x, double y)
|
||||
/// <summary>Method create in image, which can show at a certain position.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="x"> the x- coordinate.</param>
|
||||
/// <param name="y"> the y-coordinate.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
public Image AddPin(double x, double y, MapPinModel.PinType type)
|
||||
{
|
||||
Point position = new Point(x, y);
|
||||
return this.AddPin(position);
|
||||
return this.AddPin(position, type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
|
||||
/// Method create in image, which can show at a certain position depend of the
|
||||
/// <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <param name="x">the x-coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPinFromRefPoint(double x, double y)
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="x"> the x-coordinate.</param>
|
||||
/// <param name="y"> the y-coordinate.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
public Image AddPinFromRefPoint(double x, double y, MapPinModel.PinType type)
|
||||
{
|
||||
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
return this.AddPin(position);
|
||||
return this.AddPin(position, type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position depend of the <see cref="RefPoint" />
|
||||
/// Method create in image, which can show at a certain position depend of the
|
||||
/// <see cref="RefPoint" />
|
||||
/// </summary>
|
||||
/// <param name="position">input point</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPinFromRefPoint(Point position)
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="position">input point.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
public Image AddPinFromRefPoint(Point position, MapPinModel.PinType type)
|
||||
{
|
||||
return this.AddPinFromRefPoint(position.X, position.Y);
|
||||
return this.AddPinFromRefPoint(position.X, position.Y, type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create in image, which can show at a certain position
|
||||
/// </summary>
|
||||
/// <param name="position">input point</param>
|
||||
/// <returns>image of the pin</returns>
|
||||
public Image AddPin(Point position)
|
||||
/// <summary>Method create in image, which can show at a certain position.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="position">input point.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <returns>image of the pin.</returns>
|
||||
public Image AddPin(Point position, MapPinModel.PinType type)
|
||||
{
|
||||
MapPinModel pin = new MapPinModel() { Position = position };
|
||||
Image pinImg = new Image() { Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative)), Width = pin.ImageWidth };
|
||||
MapPinModel pin = this.CreatePin(type);
|
||||
pin.Position = position;
|
||||
Image pinImg = new Image();
|
||||
if (pin.ImageSource != null)
|
||||
{
|
||||
pinImg.Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative));
|
||||
pinImg.Width = pin.ImageWidth;
|
||||
pinImg.Height = pin.ImageHeight;
|
||||
}
|
||||
|
||||
Canvas.SetTop(pinImg, pin.Position.Y);
|
||||
Canvas.SetLeft(pinImg, pin.Position.X);
|
||||
return pinImg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a coordinates to coordinates which address pixels
|
||||
/// </summary>
|
||||
/// <param name="x">the x-coordinate</param>
|
||||
/// <param name="y">the y-coordinate</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
/// <summary>Convert a coordinates to coordinates which address pixels.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="x">the x-coordinate.</param>
|
||||
/// <param name="y">the y-coordinate.</param>
|
||||
/// <returns>Point in pixel-size.</returns>
|
||||
public Point ConverToPixelPoint(double x, double y)
|
||||
{
|
||||
Point p = new Point { X = this.ScaleX * x, Y = this.ScaleY * y };
|
||||
@@ -210,6 +223,29 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
protected virtual void LoadSpatials()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a pin.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <returns>The new pin.</returns>
|
||||
private MapPinModel CreatePin(MapPinModel.PinType type)
|
||||
{
|
||||
MapPinModel pin;
|
||||
switch (type)
|
||||
{
|
||||
case MapPinModel.PinType.CurrentPosition:
|
||||
pin = new CurrentPositionPinModel();
|
||||
break;
|
||||
case MapPinModel.PinType.SearchPlace:
|
||||
pin = new SearchPlacePinModel();
|
||||
break;
|
||||
default:
|
||||
pin = new HiddenPinPlaceModel();
|
||||
break;
|
||||
}
|
||||
|
||||
return pin;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a MapPin
|
||||
/// </summary>
|
||||
public class MapPinModel
|
||||
public abstract class MapPinModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
@@ -30,15 +29,26 @@ namespace CampusAppWP8.Model.Campusmap
|
||||
/// </summary>
|
||||
public MapPinModel()
|
||||
{
|
||||
this.ImageSource = Icons.Search;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -27;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enums
|
||||
/// <summary>Values that represent PinType.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public enum PinType
|
||||
{
|
||||
/// <summary>An enum constant representing the hidden option.</summary>
|
||||
Hidden = 0,
|
||||
|
||||
/// <summary>An enum constant representing the search place option.</summary>
|
||||
SearchPlace = 1,
|
||||
|
||||
/// <summary>An enum constant representing the current position option.</summary>
|
||||
CurrentPosition = 2
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SearchPlacePinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>27.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>Search pin place model.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public class SearchPlacePinModel : MapPinModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SearchPlacePinModel" /> class.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
public SearchPlacePinModel()
|
||||
{
|
||||
this.ImageSource = Icons.SearchPlace;
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -25;
|
||||
this.PinImageOffsetY = -27;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
CampusAppWP8/CampusAppWP8/Model/Exams/ExamListModel.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamlistModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Exams
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Exam list model.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
[XmlRoot("links")]
|
||||
public class ExamListModel
|
||||
{
|
||||
/// <summary>Gets or sets the exams.</summary>
|
||||
/// <value>The exams.</value>
|
||||
[XmlElement("link")]
|
||||
public ObservableCollection<ExamModel> Exams { get; set; }
|
||||
}
|
||||
}
|
||||
67
CampusAppWP8/CampusAppWP8/Model/Exams/ExamModel.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ExamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Exams
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>Exam model.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
public class ExamModel
|
||||
{
|
||||
/// <summary>Gets or sets the course number.</summary>
|
||||
/// <value>The course number.</value>
|
||||
[XmlAttribute("stg")]
|
||||
public string CourseNumber { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the course text.</summary>
|
||||
/// <value>The course text.</value>
|
||||
[XmlAttribute("stgtext")]
|
||||
public string CourseText { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the degree number.</summary>
|
||||
/// <value>The degree number.</value>
|
||||
[XmlAttribute("abschl")]
|
||||
public string DegreeNumber { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the version.</summary>
|
||||
/// <value>The version.</value>
|
||||
[XmlAttribute("pversion")]
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the type.</summary>
|
||||
/// <value>The type.</value>
|
||||
[XmlAttribute("typ")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the title.</summary>
|
||||
/// <value>The title.</value>
|
||||
[XmlAttribute("dtxt")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the date.</summary>
|
||||
/// <value>The date.</value>
|
||||
[XmlAttribute("datum")]
|
||||
public string Date { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the link.</summary>
|
||||
/// <value>The link.</value>
|
||||
[XmlAttribute("link")]
|
||||
public string Link { get; set; }
|
||||
|
||||
/// <summary>Gets the caption.</summary>
|
||||
/// <value>The caption.</value>
|
||||
public string Caption
|
||||
{
|
||||
get
|
||||
{
|
||||
return StringManager.StripHTML(this.CourseText + " (" + this.Type + "/" + this.Version + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ namespace CampusAppWP8
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
@@ -19,8 +18,13 @@ namespace CampusAppWP8
|
||||
/// Base model io handling class.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">model type</typeparam>
|
||||
public abstract class MainModel<T> : IDisposable
|
||||
public abstract class MainModel<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// File object.
|
||||
/// </summary>
|
||||
protected CampusAppWP8.Utility.File file = null;
|
||||
|
||||
/// <summary>
|
||||
/// Model io type.
|
||||
/// </summary>
|
||||
@@ -31,11 +35,6 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
private T model = default(T);
|
||||
|
||||
/// <summary>
|
||||
/// File object.
|
||||
/// </summary>
|
||||
private CampusAppWP8.Utility.File file = null;
|
||||
|
||||
/// <summary>
|
||||
/// Web object.
|
||||
/// </summary>
|
||||
@@ -88,14 +87,6 @@ namespace CampusAppWP8
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="MainModel{T}" /> class.
|
||||
/// </summary>
|
||||
~MainModel()
|
||||
{
|
||||
this.SaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delegate of the OnIO callback function.
|
||||
/// </summary>
|
||||
@@ -238,14 +229,6 @@ namespace CampusAppWP8
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called before finalizing. Can maybe be removed.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
this.SaveData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forces a update from web.
|
||||
/// </summary>
|
||||
@@ -335,7 +318,7 @@ namespace CampusAppWP8
|
||||
{
|
||||
if (this.file != null)
|
||||
{
|
||||
string data = this.file.ReadFile();
|
||||
byte[] data = this.file.ReadFile();
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
@@ -343,9 +326,9 @@ namespace CampusAppWP8
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!data.Equals(string.Empty))
|
||||
if (data.Length > 0)
|
||||
{
|
||||
this.DeserializeModel(Encoding.UTF8.GetBytes(data));
|
||||
this.DeserializeModel(data);
|
||||
}
|
||||
|
||||
this.RunOnIOCallback(this.OnLoaded);
|
||||
@@ -494,7 +477,7 @@ namespace CampusAppWP8
|
||||
if ((this.IsFile() == true)
|
||||
&& (fileName.Equals(string.Empty) == false))
|
||||
{
|
||||
this.InitFile(CampusAppWP8.Utility.File.IOTypeRead.ReadSync, CampusAppWP8.Utility.File.IOTypeWrite.WriteAsync);
|
||||
this.InitFile();
|
||||
}
|
||||
|
||||
if ((this.IsHttpApi() == true)
|
||||
@@ -507,16 +490,12 @@ namespace CampusAppWP8
|
||||
/// <summary>
|
||||
/// Initializes the file object.
|
||||
/// </summary>
|
||||
/// <param name="readType">read io type (Default: sync)</param>
|
||||
/// <param name="writeType">write io type (Default: async)</param>
|
||||
private void InitFile(
|
||||
CampusAppWP8.Utility.File.IOTypeRead readType = CampusAppWP8.Utility.File.IOTypeRead.ReadSync,
|
||||
CampusAppWP8.Utility.File.IOTypeWrite writeType = CampusAppWP8.Utility.File.IOTypeWrite.WriteAsync)
|
||||
private void InitFile()
|
||||
{
|
||||
if ((this.IsFile() == true)
|
||||
&& (this.file == null))
|
||||
{
|
||||
this.file = new CampusAppWP8.Utility.File(this.fileName, readType, writeType);
|
||||
this.file = new CampusAppWP8.Utility.File(this.fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,7 +516,7 @@ namespace CampusAppWP8
|
||||
/// </summary>
|
||||
/// <param name="sender">sending object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void OnLoadDataComplete(object sender, DownloadStringCompletedEventArgs e)
|
||||
private void OnLoadDataComplete(object sender, OpenReadCompletedEventArgs e)
|
||||
{
|
||||
Exception downloadError = e.Error;
|
||||
if (downloadError != null)
|
||||
@@ -546,11 +525,16 @@ namespace CampusAppWP8
|
||||
}
|
||||
else
|
||||
{
|
||||
string downloadResult = e.Result;
|
||||
|
||||
if (downloadResult != null && !downloadResult.Equals(string.Empty))
|
||||
byte[] data;
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
this.DeserializeModel(Encoding.UTF8.GetBytes(downloadResult));
|
||||
e.Result.CopyTo(ms);
|
||||
data = ms.ToArray();
|
||||
}
|
||||
|
||||
if (data != null && data.Length > 0)
|
||||
{
|
||||
this.DeserializeModel(data);
|
||||
}
|
||||
|
||||
this.RunOnIOCallback(this.OnLoaded);
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.Person
|
||||
{
|
||||
public class PersonFunctionModel
|
||||
{
|
||||
private string tel1;
|
||||
|
||||
private string tel2;
|
||||
|
||||
private string fax;
|
||||
|
||||
private string mail;
|
||||
|
||||
[XmlAttribute("telefon")]
|
||||
public string Tel1
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tel1;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && value != this.tel1)
|
||||
{
|
||||
this.tel1 = StringManager.CreateUniTelefonNumber(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[XmlAttribute("telefon2")]
|
||||
public string Tel2
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tel2;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && value != this.tel2)
|
||||
{
|
||||
this.tel2 = StringManager.CreateUniTelefonNumber(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[XmlAttribute("fax")]
|
||||
public string Fax
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.fax;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && value != this.fax)
|
||||
{
|
||||
this.fax = StringManager.CreateUniTelefonNumber(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[XmlAttribute("funktion")]
|
||||
public string Function { get; set; }
|
||||
|
||||
[XmlAttribute("einrichtung")]
|
||||
public string Appointment { get; set; }
|
||||
|
||||
[XmlAttribute("gebaeude")]
|
||||
public string Building { get; set; }
|
||||
|
||||
[XmlAttribute("mail")]
|
||||
public string Mail
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mail;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null && value != this.mail && StringManager.IsValidEmail(value))
|
||||
{
|
||||
this.mail = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
28
CampusAppWP8/CampusAppWP8/Model/Person/PersonModel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.Person
|
||||
{
|
||||
public class PersonModel
|
||||
{
|
||||
[XmlAttribute("id")]
|
||||
public string ID {get; set;}
|
||||
|
||||
[XmlAttribute("akadgrad")]
|
||||
public string Akadgrad { get; set; }
|
||||
|
||||
[XmlAttribute("nachname")]
|
||||
public string SureName { get; set; }
|
||||
|
||||
[XmlAttribute("vorname")]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
[XmlElement("funktion")]
|
||||
public ObservableCollection<PersonFunctionModel> Function { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -46,5 +46,65 @@ namespace CampusAppWP8.Model.Setting
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_InitApp, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the development mode.</summary>
|
||||
/// <value>true if development mode, false if not.</value>
|
||||
public bool DevMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_DevMode);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_DevMode, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the uni network.</summary>
|
||||
/// <value>true if uni network, false if not.</value>
|
||||
public bool UniNetwork
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_UniNet);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_UniNet, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether this object is WiFi enable.</summary>
|
||||
/// <value>true if WiFi enable, false if not.</value>
|
||||
public bool WifiEnable
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_WifiEnable);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_WifiEnable, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the only WiFi.</summary>
|
||||
/// <value>true if only wifi, false if not.</value>
|
||||
public bool OnlyWifi
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.LoadFromAppState<bool>(Constants.AppSetting_OnlyWifi);
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
App.SaveToAppState<bool>(Constants.AppSetting_OnlyWifi, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace CampusAppWP8.Model.Utility
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DegreeListPickerItemListModel" /> class.
|
||||
/// Initializes a new instance of the <see cref="CampusListPickerItemListModel" /> class.
|
||||
/// </summary>
|
||||
public CampusListPickerItemListModel()
|
||||
: base()
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CampusAppWP8.Model
|
||||
/// Xml model io handler class.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">model type</typeparam>
|
||||
public class XmlModel<T> : MainModel<T>
|
||||
public abstract class XmlModel<T> : MainModel<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="XmlModel{T}" /> class.
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60"/>
|
||||
</Button>-->
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBox Name="QString" InputScope="Text" AcceptsReturn="True" />
|
||||
<TextBox Name="QString" InputScope="Text" AcceptsReturn="False" />
|
||||
</StackPanel>
|
||||
<Button Grid.Column="1" Click="Button_Click2">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60"/>
|
||||
|
||||
@@ -42,9 +42,25 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
MapCanvas.Children.Clear();
|
||||
this.AddPins(this.SearchPlaces("campus"));
|
||||
this.ShowCurrentPositionDispatcher();
|
||||
if (e.NavigationMode == NavigationMode.New)
|
||||
{
|
||||
MapCanvas.Children.Clear();
|
||||
|
||||
bool scroll = true;
|
||||
string alias = "campus";
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelMap_SearchTermAlias))
|
||||
{
|
||||
alias = NavigationContext.QueryString[Constants.ParamModelMap_SearchTermAlias];
|
||||
this.AddPins(this.SearchPlaces(alias), MapPinModel.PinType.SearchPlace);
|
||||
scroll = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AddPins(this.SearchPlaces(alias), MapPinModel.PinType.Hidden);
|
||||
}
|
||||
|
||||
this.ShowCurrentPositionDispatcher(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Button click method.</summary>
|
||||
@@ -68,9 +84,9 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MapCanvas.Children.Clear();
|
||||
this.AddPins(this.SearchPlaces(query));
|
||||
this.AddPins(this.SearchPlaces(query), MapPinModel.PinType.SearchPlace);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the first places.</summary>
|
||||
@@ -85,30 +101,37 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
/// <summary>Adds the pins.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="places">The places.</param>
|
||||
private void AddPins(List<PlaceModel> places)
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
private void AddPins(List<PlaceModel> places, MapPinModel.PinType type, bool scroll = true)
|
||||
{
|
||||
foreach (PlaceModel place in places)
|
||||
{
|
||||
GeoCoordinate coor = place.GeoRefPoint;
|
||||
if (coor != null)
|
||||
{
|
||||
this.AddPin(coor.Longitude, coor.Latitude);
|
||||
this.AddPin(coor.Longitude, coor.Latitude, type, scroll);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Add Pin to an certain position.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="x">longitude parameter.</param>
|
||||
/// <param name="y">latitude parameter.</param>
|
||||
private void AddPin(double x, double y)
|
||||
/// <param name="x"> longitude parameter.</param>
|
||||
/// <param name="y"> latitude parameter.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
private void AddPin(double x, double y, MapPinModel.PinType type, bool scroll = true)
|
||||
{
|
||||
Point scrollPoint = this.map.GetScrollPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)));
|
||||
MapCanvas.Children.Add(this.map.AddPinFromRefPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y))));
|
||||
MapCanvas.Children.Add(this.map.AddPinFromRefPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)), type));
|
||||
|
||||
MapScroller.UpdateLayout();
|
||||
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
|
||||
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
|
||||
if (scroll)
|
||||
{
|
||||
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
|
||||
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
|
||||
}
|
||||
|
||||
// XPoint.Text = x.ToString();
|
||||
// YPoint.Text = y.ToString();
|
||||
@@ -125,43 +148,57 @@ namespace CampusAppWP8.Pages.Campusmap
|
||||
|
||||
/// <summary>execute ShowCurrentPosition-Method via Dispatcher.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
private void ShowCurrentPositionDispatcher()
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
private void ShowCurrentPositionDispatcher(bool scroll = true)
|
||||
{
|
||||
ProgressBar.Visibility = Visibility.Visible;
|
||||
|
||||
Thread thread = new Thread(new ThreadStart(this.ShowCurrentPosition));
|
||||
Thread thread = new Thread(delegate() { this.ShowCurrentPosition(scroll); });
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
/// <summary>Method add a pin on the at the position of the phone.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
private void ShowCurrentPosition()
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
private void ShowCurrentPosition(bool scroll = true)
|
||||
{
|
||||
Utilities.DetermineAndStoreCurrentPositionForce();
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition()));
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition(scroll)));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SetPinToCurrentPosition();
|
||||
this.SetPinToCurrentPosition(scroll);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets pin to current position.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
private void SetPinToCurrentPosition()
|
||||
/// <param name="scroll">(Optional) the scroll.</param>
|
||||
private void SetPinToCurrentPosition(bool scroll = true)
|
||||
{
|
||||
string lat = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Lat);
|
||||
string log = App.LoadFromAppState<string>(Constants.GeoWatch_CurrentPosition_Long);
|
||||
this.SetPinToPosition(lat, log, MapPinModel.PinType.CurrentPosition, scroll);
|
||||
}
|
||||
|
||||
/// <summary>Sets pin to position.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <param name="latitude"> The latitude.</param>
|
||||
/// <param name="longitude">The longitude.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="scroll"> (Optional) the scroll.</param>
|
||||
private void SetPinToPosition(string latitude, string longitude, MapPinModel.PinType type, bool scroll = true)
|
||||
{
|
||||
double x;
|
||||
double y;
|
||||
if (!double.TryParse(log, NumberStyles.Any, CultureInfo.InvariantCulture, out x) || !double.TryParse(lat, NumberStyles.Any, CultureInfo.InvariantCulture, out y))
|
||||
if (!double.TryParse(longitude, NumberStyles.Any, CultureInfo.InvariantCulture, out x) || !double.TryParse(latitude, NumberStyles.Any, CultureInfo.InvariantCulture, out y))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.AddPin(x, y);
|
||||
this.AddPin(x, y, type, scroll);
|
||||
ProgressBar.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CampusAppWP8.Pages.Departments
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Page with a list of the faculties.
|
||||
@@ -48,7 +49,8 @@ namespace CampusAppWP8.Pages.Departments
|
||||
DepartmentIndexPage.feed.OnLoaded += new DepartmentFeed.OnIO(this.SetupFacultyList);
|
||||
DepartmentIndexPage.feed.OnFailedWeb += new DepartmentFeed.OnFailed(this.FeedIsFailedWeb);
|
||||
DepartmentIndexPage.feed.OnFailedFile += new DepartmentFeed.OnFailed(this.FeedIsFailedFile);
|
||||
DepartmentIndexPage.feed.LoadData();
|
||||
|
||||
DepartmentIndexPage.feed.LoadData(Utilities.getLoadModus<Model.Departments.DepartmentModel>());
|
||||
|
||||
if (DepartmentIndexPage.favorite == null)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Events;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
@@ -48,7 +49,7 @@ namespace CampusAppWP8.Pages.Events
|
||||
EventIndexPage.eventFeed.OnLoaded += new EventFeed.OnIO(this.SetupEventPageList);
|
||||
EventIndexPage.eventFeed.OnFailedWeb += new EventFeed.OnFailed(this.FeedIsFailedWeb);
|
||||
EventIndexPage.eventFeed.OnFailedFile += new EventFeed.OnFailed(this.FeedIsFailedFile);
|
||||
EventIndexPage.eventFeed.LoadData();
|
||||
EventIndexPage.eventFeed.LoadData(Utilities.getLoadModus<Model.RSS.RSSViewModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -88,6 +89,21 @@ namespace CampusAppWP8.Pages.Events
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
// delete all models
|
||||
EventIndexPage.eventFeed.SaveData();
|
||||
}
|
||||
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is called after the RSS feeds are loaded into the eventFeed model.
|
||||
/// If there was no feed information set to the UI, the feed list
|
||||
|
||||
81
CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml
Normal file
@@ -0,0 +1,81 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Exams.Exams"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<ProgressBar Name="ProgressBar" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
<phone:Pivot Name="ExamPivot" Title="{Binding Path=LocalizedResources.ExaminationApp_Header, Source={StaticResource LocalizedStrings}}">
|
||||
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Bachelor, Source={StaticResource LocalizedStrings}}">
|
||||
<ListBox x:Name="BachelorPanel" ItemsSource="{Binding Value}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
|
||||
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</phone:PivotItem>
|
||||
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Master, Source={StaticResource LocalizedStrings}}">
|
||||
<ListBox x:Name="MasterPanel" ItemsSource="{Binding Value}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
|
||||
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</phone:PivotItem>
|
||||
<phone:PivotItem Header="{Binding Path=LocalizedResources.Degree_Diploma, Source={StaticResource LocalizedStrings}}">
|
||||
<ListBox x:Name="DiplomaPanel" ItemsSource="{Binding Value}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}" Click="Button_Click">
|
||||
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</phone:PivotItem>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
203
CampusAppWP8/CampusAppWP8/Pages/Exams/Exams.xaml.cs
Normal file
@@ -0,0 +1,203 @@
|
||||
// <copyright file="Exams.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.09.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Exams
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Exams;
|
||||
using CampusAppWP8.File.Exams;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>class of ExamsPage.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
public partial class Exams : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>The feed.</summary>
|
||||
private ExamFeed feed;
|
||||
|
||||
/// <summary>The exam file.</summary>
|
||||
private ExamFile file;
|
||||
|
||||
/// <summary>Initializes a new instance of the Exams class.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
public Exams()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
/// <summary>Wird aufgerufen, wenn eine Seite die aktive Seite in einem Frame wird.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
if (this.feed == null)
|
||||
{
|
||||
this.InitializeFeed();
|
||||
}
|
||||
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.feed.LoadData(Utilities.getLoadModus<Model.Exams.ExamListModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn eine Seite nicht mehr die aktive Seite in einem Frame ist.
|
||||
/// </summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <param name="e">Ein Objekt, das die Ereignisdaten enthält.</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
App.SaveToIsolatedStorage<int>(Constants.ExamPageModelKey, -1);
|
||||
this.feed.SaveData();
|
||||
}
|
||||
else
|
||||
{
|
||||
App.SaveToIsolatedStorage<int>(Constants.ExamPageModelKey, this.ExamPivot.SelectedIndex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Method initialize the Feed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
this.feed = new ExamFeed();
|
||||
this.feed.OnLoaded += new ExamFeed.OnIO(this.FeedIsReady);
|
||||
this.feed.OnFailedWeb += new ExamFeed.OnFailed(this.FeedIsFailWeb);
|
||||
this.feed.OnFailedFile += new ExamFeed.OnFailed(this.FeedIsFailFile);
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is ready.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
private void FeedIsReady()
|
||||
{
|
||||
this.SetupExamList();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>Executes the PDF reader operation.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
private void LaunchPDFReader()
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
this.file.SaveAndLaunchFile();
|
||||
}
|
||||
|
||||
/// <summary>Sets up the exam list.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
private void SetupExamList()
|
||||
{
|
||||
var bachelorList = from exam in this.feed.Model.Exams
|
||||
where exam.DegreeNumber.Equals(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.BACHELOR).ToString())
|
||||
orderby exam.CourseText, exam.Version
|
||||
select exam;
|
||||
|
||||
var masterList = from exam in this.feed.Model.Exams
|
||||
where exam.DegreeNumber.Equals(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.MASTER).ToString())
|
||||
orderby exam.CourseText, exam.Version
|
||||
select exam;
|
||||
|
||||
var diplomaList = from exam in this.feed.Model.Exams
|
||||
where exam.DegreeNumber.Equals(((int)CampusAppWP8.Model.Setting.UserProfilModel.DegreeType.DIPLOM).ToString())
|
||||
orderby exam.CourseText, exam.Version
|
||||
select exam;
|
||||
|
||||
this.BachelorPanel.ItemsSource = bachelorList;
|
||||
this.MasterPanel.ItemsSource = masterList;
|
||||
this.DiplomaPanel.ItemsSource = diplomaList;
|
||||
this.ExamPivot.SelectedIndex = this.CalcSelectedIndex();
|
||||
}
|
||||
|
||||
/// <summary>Calculates the selected index.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
/// <returns>The calculated selected index.</returns>
|
||||
private int CalcSelectedIndex()
|
||||
{
|
||||
int result = App.LoadFromIsolatedStorage<int>(Constants.ExamPageModelKey);
|
||||
if (result < 0 || result > 2)
|
||||
{
|
||||
Model.Setting.UserProfilModel.DegreeType degree = Settings.UserProfil.Degree;
|
||||
|
||||
switch (degree)
|
||||
{
|
||||
case Model.Setting.UserProfilModel.DegreeType.BACHELOR:
|
||||
result = 0;
|
||||
break;
|
||||
case Model.Setting.UserProfilModel.DegreeType.MASTER:
|
||||
result = 1;
|
||||
break;
|
||||
case Model.Setting.UserProfilModel.DegreeType.DIPLOM:
|
||||
result = 2;
|
||||
break;
|
||||
default:
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is failed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
private void FeedIsFailWeb()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadWeb);
|
||||
this.feed.ForceReadFile();
|
||||
}
|
||||
|
||||
/// <summary>Method will be execute if the feed is failed.</summary>
|
||||
/// <remarks>Stubbfel, 02.09.2013.</remarks>
|
||||
private void FeedIsFailFile()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoadFile);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by Button for click events.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="sender">Source of the event.</param>
|
||||
/// <param name="e"> Routed event information.</param>
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button button = sender as Button;
|
||||
if (button == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string url = button.Tag as string;
|
||||
if (url == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// create filename
|
||||
string[] filenames = url.Split('/');
|
||||
string filename = url;
|
||||
|
||||
if (filenames.Length > 0)
|
||||
{
|
||||
filename = filenames[filenames.Length - 1];
|
||||
}
|
||||
|
||||
this.file = new ExamFile(filename, url);
|
||||
this.file.OnLoaded += new ExamFile.OnIO(this.LaunchPDFReader);
|
||||
this.file.OnFailedWeb += new ExamFile.OnFailed(this.FeedIsFailWeb);
|
||||
this.file.OnFailedFile += new ExamFile.OnFailed(this.FeedIsFailFile);
|
||||
this.file.LoadData();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@ namespace CampusAppWP8.Pages.Lecture
|
||||
#region methods
|
||||
|
||||
#region protected
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CampusAppWP8.Pages.Links
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the LinkPage
|
||||
@@ -66,8 +67,8 @@ namespace CampusAppWP8.Pages.Links
|
||||
this.InitializeFeeds();
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.loadingFeeds = 2;
|
||||
this.commonLinkFeed.LoadData();
|
||||
this.clubLinkFeed.LoadData();
|
||||
this.commonLinkFeed.LoadData(Utilities.getLoadModus<Model.Link.LinkListModel>());
|
||||
this.clubLinkFeed.LoadData(Utilities.getLoadModus<Model.Link.LinkListModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -59,8 +59,13 @@
|
||||
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
|
||||
</Grid>
|
||||
<phone:PhoneApplicationPage.ApplicationBar>
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="False" Mode="Minimized" >
|
||||
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Minimized" >
|
||||
<lui:UpdateButtonAppBar Click="MensaForceUpdate_Click"/>
|
||||
<shell:ApplicationBar.MenuItems>
|
||||
<shell:ApplicationBarMenuItem Text="Campus1" Click="ApplicationBarMenuItem_Click"/>
|
||||
<shell:ApplicationBarMenuItem Text="Campus2" Click="ApplicationBarMenuItem2_Click"/>
|
||||
<shell:ApplicationBarMenuItem Text="Campus3" Click="ApplicationBarMenuItem3_Click"/>
|
||||
</shell:ApplicationBar.MenuItems>
|
||||
</shell:ApplicationBar>
|
||||
</phone:PhoneApplicationPage.ApplicationBar>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace CampusAppWP8.Pages.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.GeoApi;
|
||||
@@ -15,7 +16,8 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using System.Threading;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MensaPage
|
||||
@@ -64,6 +66,24 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
public MensaPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
ApplicationBarMenuItem menuItem1 = ApplicationBar.MenuItems[0] as ApplicationBarMenuItem;
|
||||
ApplicationBarMenuItem menuItem2 = ApplicationBar.MenuItems[1] as ApplicationBarMenuItem;
|
||||
ApplicationBarMenuItem menuItem3 = ApplicationBar.MenuItems[2] as ApplicationBarMenuItem;
|
||||
|
||||
if (menuItem1 != null)
|
||||
{
|
||||
menuItem1.Text = AppResources.Campus_CBMain;
|
||||
}
|
||||
|
||||
if (menuItem2 != null)
|
||||
{
|
||||
menuItem2.Text = AppResources.Campus_CBSouth;
|
||||
}
|
||||
|
||||
if (menuItem3 != null)
|
||||
{
|
||||
menuItem3.Text = AppResources.Campus_SFBMain;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -89,10 +109,14 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
this.feed.SaveData(this.refreshed);
|
||||
if (this.feed != null)
|
||||
{
|
||||
this.feed.SaveData(this.refreshed);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
@@ -115,8 +139,11 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SpsApiIsFail()
|
||||
{
|
||||
MessageBoxResult result = MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorCampusLoc);
|
||||
this.InitializeFeed(Settings.UserProfil.DefaultCampus);
|
||||
if (this.Dispatcher != null)
|
||||
{
|
||||
this.Dispatcher.BeginInvoke(new Action(() => MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorCampusLoc)));
|
||||
this.Dispatcher.BeginInvoke(new Action(() => this.InitializeFeed(Settings.UserProfil.DefaultCampus)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -150,7 +177,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
}
|
||||
else
|
||||
{
|
||||
this.feed.LoadData();
|
||||
this.feed.LoadData(Utilities.getLoadModus<Model.Mensa.MenuWeekModel>());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,9 +186,9 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void InitializeFeed()
|
||||
{
|
||||
if (Settings.AppSetting.GeoWatchEnable)
|
||||
if (Settings.AppSetting.GeoWatchEnable && Settings.AppSetting.UniNetwork)
|
||||
{
|
||||
Thread thread = new Thread(new ThreadStart( this.DeterminCurrentCampusAndLoadFeed));
|
||||
Thread thread = new Thread(new ThreadStart(this.DeterminCurrentCampusAndLoadFeed));
|
||||
thread.Start();
|
||||
}
|
||||
else
|
||||
@@ -202,6 +229,7 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
/// </summary>
|
||||
private void SetupMensaPivot()
|
||||
{
|
||||
this.MensaPivot.Title = AppResources.MensaApp_Title + " (" + this.feed.Title + ")";
|
||||
this.MensaPivot.ItemsSource = this.feed.Model.Menus;
|
||||
this.MensaPivot.SelectedIndex = this.selectedIndex;
|
||||
}
|
||||
@@ -252,6 +280,36 @@ namespace CampusAppWP8.Pages.Mensa
|
||||
this.refreshed = true;
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_MAIN);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem2 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.CB_SOUTH);
|
||||
}
|
||||
|
||||
/// <summary>Event handler. Called by ApplicationBarMenuItem3 for click events.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <param name="sender">button object.</param>
|
||||
/// <param name="e"> Event information.</param>
|
||||
private void ApplicationBarMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.InitializeFeed(CampusAppWP8.Model.Setting.UserProfilModel.Campus.SFB_MAIN);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CampusAppWP8.Pages.News
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Overview page of all news.
|
||||
@@ -48,7 +49,7 @@ namespace CampusAppWP8.Pages.News
|
||||
NewsIndexPage.newsFeed.OnLoaded += new NewsFeed.OnIO(this.SetupNewsPageList);
|
||||
NewsIndexPage.newsFeed.OnFailedWeb += new NewsFeed.OnFailed(this.FeedIsFailWeb);
|
||||
NewsIndexPage.newsFeed.OnFailedFile += new NewsFeed.OnFailed(this.FeedIsFailFile);
|
||||
NewsIndexPage.newsFeed.LoadData();
|
||||
NewsIndexPage.newsFeed.LoadData(Utilities.getLoadModus<Model.RSS.RSSViewModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -88,6 +89,20 @@ namespace CampusAppWP8.Pages.News
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedFrom-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
// delete all models
|
||||
NewsIndexPage.newsFeed.SaveData();
|
||||
}
|
||||
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
/// <summary>
|
||||
/// Is called after the RSS feeds are loaded into the newsFeed model.
|
||||
/// If there was no feed information set to the UI, the feed list
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours page.
|
||||
@@ -51,7 +52,7 @@ namespace CampusAppWP8.Pages.Openinghours
|
||||
this.feed.OnLoaded += new OpeninghoursFeed.OnIO(this.FeedIsReady);
|
||||
this.feed.OnFailedWeb += new OpeninghoursFeed.OnFailed(this.FeedIsFailedWeb);
|
||||
this.feed.OnFailedFile += new OpeninghoursFeed.OnFailed(this.FeedIsFailedFile);
|
||||
this.feed.LoadData();
|
||||
this.feed.LoadData(Utilities.getLoadModus<Model.Openinghours.OpeninghoursModel>());
|
||||
}
|
||||
|
||||
this.isNewInstance = true;
|
||||
|
||||
67
CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml
Normal file
@@ -0,0 +1,67 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Person.PersonPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
mc:Ignorable="d"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!--LayoutRoot ist das Stammraster, in dem alle anderen Seiteninhalte platziert werden-->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.PersonApp_Header, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="Nachname: " Grid.Row="0"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox AcceptsReturn="False" Grid.Column="0" InputScope="PersonalSurname"/>
|
||||
<Button Grid.Column="1">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="50"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<ListBox x:Name="ResultPanel" ItemsSource="{Binding Value}" Grid.Row="2">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<Button Tag="{Binding Link}" Style="{StaticResource ListButtonStyle}">
|
||||
<TextBlock Text="{Binding Caption}" TextWrapping="Wrap"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
20
CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
|
||||
namespace CampusAppWP8.Pages.Person
|
||||
{
|
||||
public partial class PersonPage : PhoneApplicationPage
|
||||
{
|
||||
public PersonPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,12 +30,16 @@
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel>
|
||||
<StackPanel Grid.Row="0">
|
||||
<toolkit:ToggleSwitch Name="GeoWatchToggle" Content="{Binding Path=LocalizedResources.Setting_AppGeoWatch, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<toolkit:ToggleSwitch Name="OnlyWiFiToggle" Content="{Binding Path=LocalizedResources.Setting_AppOnlyWifi, Source={StaticResource LocalizedStrings}}"></toolkit:ToggleSwitch>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CampusAppWP8.Pages.Setting
|
||||
{
|
||||
this.InitializeComponent();
|
||||
GeoWatchToggle.IsChecked = Settings.AppSetting.GeoWatchEnable;
|
||||
OnlyWiFiToggle.IsChecked = Settings.AppSetting.OnlyWifi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -33,6 +34,7 @@ namespace CampusAppWP8.Pages.Setting
|
||||
if (NavigationMode.Back == e.NavigationMode)
|
||||
{
|
||||
Settings.AppSetting.GeoWatchEnable = GeoWatchToggle.IsChecked.Value;
|
||||
Settings.AppSetting.OnlyWifi = OnlyWiFiToggle.IsChecked.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,117 +23,168 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--TitlePanel enthält den Namen der Anwendung und den Seitentitel-->
|
||||
<StackPanel Grid.Row="0" Margin="12,17,0,28">
|
||||
<StackPanel Name="AppTitle" Grid.Row="0" Margin="12,17,0,28">
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
</StackPanel>
|
||||
<ScrollViewer Grid.Row="1">
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<StackPanel x:Name="ContentPanel" Margin="12,0,12,12" >
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Margin="12,0,12,12" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Name="Row0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Row 0 -->
|
||||
<lui:NavigateButton Name="TimeTableAppButton" Style="{StaticResource StartPageButton}" IsEnabled="False" Grid.Column="0">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Schedule, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<!-- Row 0 -->
|
||||
<lui:NavigateButton Name="TimeTableAppButton" Grid.Row="0" Grid.Column="0" Style="{StaticResource StartPageButton}" IsEnabled="False">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Schedule, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.TimeTableApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="NewsAppButton" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathNews_NewsIndexPage, Source={StaticResource Const}}" Grid.Column="1">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="NewsAppButton" Grid.Row="0" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathNews_NewsIndexPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.NewsApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="LectureAppButton" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathLecture_LecturePage, Source={StaticResource Const}}" Grid.Column="2">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Lectures, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
|
||||
<lui:NavigateButton Name="LectureAppButton" Grid.Row="0" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathLecture_LecturePage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Lectures, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<!-- Row 1 -->
|
||||
|
||||
<!-- Row 1 -->
|
||||
<Grid Name="Row1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<lui:NavigateButton Name="HomeworkAppButton" Grid.Row="1" Grid.Column="0" Style="{StaticResource StartPageButton}" IsEnabled="False">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Homework, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="HomeworkAppButtonText" Text="{Binding Path=LocalizedResources.HomeworkApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="HomeworkAppButton" Grid.Column="0" Style="{StaticResource StartPageButton}" IsEnabled="False">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Homework, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="HomeworkAppButtonText" Text="{Binding Path=LocalizedResources.HomeworkApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="EventAppButton" Grid.Row="1" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathEvents_EventsIndexPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="EventAppButton" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathEvents_EventsIndexPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.News, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.EventApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="CampusMapAppButton" Grid.Row="1" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathCampusmap_Campusmap, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="CampusMapAppButton" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathCampusmap_Campusmap, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Campus, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
|
||||
<!-- Row 2 -->
|
||||
<lui:NavigateButton Name="DepartmentAppButton" Grid.Row="2" Grid.Column="0" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathDepartment_DepartmentIndexPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Departments, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<!-- Row 2 -->
|
||||
|
||||
<lui:NavigateButton Name="MensaAppButton" Grid.Row="2" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMensa_MensaPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<Grid Name="Row2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<lui:NavigateButton Name="DepartmentAppButton" Grid.Column="0" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathDepartment_DepartmentIndexPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Departments, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="MailAppButton" Grid.Row="2" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMail_WebMailPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MailApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="MensaAppButton" Grid.Column="1" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMensa_MensaPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Mensa, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MensaApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<!-- Row 3 -->
|
||||
<lui:NavigateButton Name="OpenHoursAppButton" Url="{Binding Path=Constants.PathOpeninghours_OpeninghoursPage, Source={StaticResource Const}}" Grid.Row="3" Grid.Column="0" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="OpenHoursAppButtonText" Text="{Binding Path=LocalizedResources.OpenHoursApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton Name="MailAppButton" Grid.Column="2" Style="{StaticResource StartPageButton}" Url="{Binding Path=Constants.PathMail_WebMailPage, Source={StaticResource Const}}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.WebMail, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.MailApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
|
||||
<lui:NavigateButton Name="LinkAppButton" Url="{Binding Path=Constants.PathLinks_LinkPage, Source={StaticResource Const}}" Grid.Row="3" Grid.Column="1" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
<!-- Row 3 -->
|
||||
|
||||
<lui:NavigateButton Name="OSAAppButton" Url="{Binding Path=Constants.PathStudentCouncil_StudentCouncilPage, Source={StaticResource Const}}" Grid.Row="3" Grid.Column="2" Style="{StaticResource StartPageButton}">
|
||||
<lui:NavigateButton.RenderTransform>
|
||||
<CompositeTransform/>
|
||||
</lui:NavigateButton.RenderTransform>
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.StudentCouncil, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
<Grid Name="Row3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<lui:NavigateButton Name="OpenHoursAppButton" Url="{Binding Path=Constants.PathOpeninghours_OpeninghoursPage, Source={StaticResource Const}}" Grid.Column="0" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Openhours, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="OpenHoursAppButtonText" Text="{Binding Path=LocalizedResources.OpenHoursApp_Title2, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="LinkAppButton" Url="{Binding Path=Constants.PathLinks_LinkPage, Source={StaticResource Const}}" Grid.Column="1" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LinkApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="OSAAppButton" Url="{Binding Path=Constants.PathStudentCouncil_StudentCouncilPage, Source={StaticResource Const}}" Grid.Column="2" Style="{StaticResource StartPageButton}">
|
||||
<lui:NavigateButton.RenderTransform>
|
||||
<CompositeTransform/>
|
||||
</lui:NavigateButton.RenderTransform>
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.StudentCouncil, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.OSAApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
|
||||
<!-- Row 4 -->
|
||||
|
||||
<Grid Name="Row4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<lui:NavigateButton Name="examinationAppButton" Url="{Binding Path=Constants.PathExams_ExamsPage, Source={StaticResource Const}}" Grid.Column="0" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Exams, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="examinationAppButtonText" Text="{Binding Path=LocalizedResources.ExaminationApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
|
||||
<lui:NavigateButton Name="personAppButton" Url="{Binding Path=Constants.PathPerson_Person, Source={StaticResource Const}}" Grid.Column="1" Style="{StaticResource StartPageButton}">
|
||||
<StackPanel Style="{StaticResource StartPageStackPanelStyle}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Person, Source={StaticResource ThemelizedIcons}}" Style="{StaticResource StartPageButtonImg}"/>
|
||||
<TextBlock Name="personAppButtonText" Text="{Binding Path=LocalizedResources.PersonApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource StartPageButtonText}"/>
|
||||
</StackPanel>
|
||||
</lui:NavigateButton>
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- <Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" /> -->
|
||||
</Grid>
|
||||
|
||||
@@ -44,14 +44,22 @@ namespace CampusAppWP8.Pages
|
||||
menuItem2.Text = AppResources.Setting_ApplAppBarTitle;
|
||||
}
|
||||
|
||||
if (menuItem3 != null)
|
||||
if (Settings.AppSetting.DevMode)
|
||||
{
|
||||
menuItem3.Text = "Nfc";
|
||||
}
|
||||
if (menuItem3 != null)
|
||||
{
|
||||
menuItem3.Text = "Nfc";
|
||||
}
|
||||
|
||||
if (menuItem4 != null)
|
||||
if (menuItem4 != null)
|
||||
{
|
||||
menuItem4.Text = "QR-Reader";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
menuItem4.Text = "QR-Reader";
|
||||
ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1);
|
||||
ApplicationBar.MenuItems.RemoveAt(ApplicationBar.MenuItems.Count - 1);
|
||||
}
|
||||
|
||||
if (!Settings.AppSetting.InitApp)
|
||||
@@ -78,45 +86,70 @@ namespace CampusAppWP8.Pages
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
// Switch the placement of the buttons based on an orientation change.
|
||||
if (this.Orientation == PageOrientation.LandscapeLeft || this.Orientation == PageOrientation.LandscapeRight)
|
||||
if (this.Orientation == PageOrientation.LandscapeLeft)
|
||||
{
|
||||
OpenHoursAppButton.SetValue(Grid.RowProperty, 0);
|
||||
OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
OpenHoursAppButtonText.Text = AppResources.OpenHoursApp_Title;
|
||||
|
||||
OSAAppButton.SetValue(Grid.RowProperty, 1);
|
||||
OSAAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
LinkAppButton.SetValue(Grid.RowProperty, 2);
|
||||
LinkAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
ContentPanel.Margin = new Thickness(12, -24, 0, 0);
|
||||
|
||||
HomeworkAppButtonText.Text = AppResources.HomeworkApp_Title;
|
||||
ContentPanel.RowDefinitions[3].Height = GridLength.Auto;
|
||||
ContentPanel.ColumnDefinitions[3].Width = new GridLength(1, GridUnitType.Star);
|
||||
this.ContentPanel.Margin = new Thickness(24, -24, 76, 0);
|
||||
this.AppTitle.Margin = new Thickness(12, 17, 0, 28);
|
||||
this.MoveGridToLandscape();
|
||||
}
|
||||
else if (this.Orientation == PageOrientation.LandscapeRight)
|
||||
{
|
||||
this.ContentPanel.Margin = new Thickness(76, -24, 24, 0);
|
||||
this.AppTitle.Margin = new Thickness(64, 17, 0, 28);
|
||||
this.MoveGridToLandscape();
|
||||
}
|
||||
else
|
||||
{
|
||||
// If not in portrait, move buttonList content to visible row and column.
|
||||
ContentPanel.Margin = new Thickness(12, 0, 12, 12);
|
||||
OpenHoursAppButton.SetValue(Grid.RowProperty, 3);
|
||||
OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0);
|
||||
OpenHoursAppButtonText.Text = AppResources.OpenHoursApp_Title2;
|
||||
|
||||
OSAAppButton.SetValue(Grid.RowProperty, 3);
|
||||
OSAAppButton.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
LinkAppButton.SetValue(Grid.RowProperty, 3);
|
||||
LinkAppButton.SetValue(Grid.ColumnProperty, 2);
|
||||
|
||||
HomeworkAppButtonText.Text = AppResources.HomeworkApp_Title2;
|
||||
|
||||
ContentPanel.RowDefinitions[3].Height = new GridLength(1, GridUnitType.Star);
|
||||
ContentPanel.ColumnDefinitions[3].Width = GridLength.Auto;
|
||||
this.ContentPanel.Margin = new Thickness(12, 0, 12, 12);
|
||||
this.AppTitle.Margin = new Thickness(12, 17, 0, 28);
|
||||
this.MoveToPortrait();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Move to Portrait format.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
private void MoveToPortrait()
|
||||
{
|
||||
bool test = this.Row0.Children.Remove(this.OpenHoursAppButton);
|
||||
if (!test)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.Row3.Children.Add(this.OpenHoursAppButton);
|
||||
this.OpenHoursAppButton.SetValue(Grid.ColumnProperty, 0);
|
||||
|
||||
this.Row1.Children.Remove(this.OSAAppButton);
|
||||
this.Row3.Children.Add(this.OSAAppButton);
|
||||
this.OSAAppButton.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
this.Row2.Children.Remove(this.LinkAppButton);
|
||||
this.Row3.Children.Add(this.LinkAppButton);
|
||||
this.LinkAppButton.SetValue(Grid.ColumnProperty, 2);
|
||||
}
|
||||
|
||||
/// <summary>Move Grid to landscape format.</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
private void MoveGridToLandscape()
|
||||
{
|
||||
bool test = this.Row3.Children.Remove(this.OpenHoursAppButton);
|
||||
if (!test)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.Row0.Children.Add(this.OpenHoursAppButton);
|
||||
this.OpenHoursAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
this.Row3.Children.Remove(this.OSAAppButton);
|
||||
this.Row1.Children.Add(this.OSAAppButton);
|
||||
this.OSAAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
this.Row3.Children.Remove(this.LinkAppButton);
|
||||
this.Row2.Children.Add(this.LinkAppButton);
|
||||
this.LinkAppButton.SetValue(Grid.ColumnProperty, 3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method Navigate to <see cref="Setting/UserProfil"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.Lui.MessageBoxes;
|
||||
using Microsoft.Phone.Controls;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the StudentCouncilPage
|
||||
@@ -59,7 +60,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
|
||||
}
|
||||
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
this.feed.LoadData();
|
||||
this.feed.LoadData(Utilities.getLoadModus<Model.StudentCouncil.StudentCouncilListModel>());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -222,6 +222,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Prüfungsordnungen ähnelt.
|
||||
/// </summary>
|
||||
public static string ExaminationApp_Header {
|
||||
get {
|
||||
return ResourceManager.GetString("ExaminationApp_Header", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Prüfungs- ordnungen ähnelt.
|
||||
/// </summary>
|
||||
public static string ExaminationApp_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("ExaminationApp_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Fakultät ähnelt.
|
||||
/// </summary>
|
||||
@@ -681,6 +699,24 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Personensuche ähnelt.
|
||||
/// </summary>
|
||||
public static string PersonApp_Header {
|
||||
get {
|
||||
return ResourceManager.GetString("PersonApp_Header", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Personen ähnelt.
|
||||
/// </summary>
|
||||
public static string PersonApp_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("PersonApp_Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Die primäre Kamera steht nicht zur Verfügung. ähnelt.
|
||||
/// </summary>
|
||||
@@ -771,6 +807,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Nur mit Wlan laden ähnelt.
|
||||
/// </summary>
|
||||
public static string Setting_AppOnlyWifi {
|
||||
get {
|
||||
return ResourceManager.GetString("Setting_AppOnlyWifi", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Mitarbeiter ähnelt.
|
||||
/// </summary>
|
||||
|
||||
@@ -416,4 +416,19 @@
|
||||
<data name="TextToSpeech_Btn" xml:space="preserve">
|
||||
<value>vorlesen</value>
|
||||
</data>
|
||||
<data name="Setting_AppOnlyWifi" xml:space="preserve">
|
||||
<value>Nur mit Wlan laden</value>
|
||||
</data>
|
||||
<data name="ExaminationApp_Title" xml:space="preserve">
|
||||
<value>Prüfungs- ordnungen</value>
|
||||
</data>
|
||||
<data name="ExaminationApp_Header" xml:space="preserve">
|
||||
<value>Prüfungsordnungen</value>
|
||||
</data>
|
||||
<data name="PersonApp_Header" xml:space="preserve">
|
||||
<value>Personensuche</value>
|
||||
</data>
|
||||
<data name="PersonApp_Title" xml:space="preserve">
|
||||
<value>Personen</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -60,6 +60,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die DevMode ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_DevMode {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_DevMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die AppSetting.GeoWatchEnable ähnelt.
|
||||
/// </summary>
|
||||
@@ -78,6 +87,78 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die OnlyWifi ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_OnlyWifi {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_OnlyWifi", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die UniNet ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_UniNet {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_UniNet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 802.1X ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_UniNetworkDesc {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_UniNetworkDesc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 802.1X ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_UniNetworkName {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_UniNetworkName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die WifiEnable ähnelt.
|
||||
/// </summary>
|
||||
public static string AppSetting_WifiEnable {
|
||||
get {
|
||||
return ResourceManager.GetString("AppSetting_WifiEnable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die +49 ähnelt.
|
||||
/// </summary>
|
||||
public static string DeTelPrefix {
|
||||
get {
|
||||
return ResourceManager.GetString("DeTelPrefix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ExamsPage.LastPivotIndex ähnelt.
|
||||
/// </summary>
|
||||
public static string ExamPageModelKey {
|
||||
get {
|
||||
return ResourceManager.GetString("ExamPageModelKey", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die links ähnelt.
|
||||
/// </summary>
|
||||
public static string ExamXmlValidRootName {
|
||||
get {
|
||||
return ResourceManager.GetString("ExamXmlValidRootName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die DepartmentFavoriteFeed.xml ähnelt.
|
||||
/// </summary>
|
||||
@@ -105,6 +186,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die examlist.xml ähnelt.
|
||||
/// </summary>
|
||||
public static string FileExamApp_ExamFeed {
|
||||
get {
|
||||
return ResourceManager.GetString("FileExamApp_ExamFeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die ClubLinks.xml ähnelt.
|
||||
/// </summary>
|
||||
@@ -465,6 +555,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die SearchAlias ähnelt.
|
||||
/// </summary>
|
||||
public static string ParamModelMap_SearchTermAlias {
|
||||
get {
|
||||
return ResourceManager.GetString("ParamModelMap_SearchTermAlias", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die pivotindex ähnelt.
|
||||
/// </summary>
|
||||
@@ -546,6 +645,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Exams/Exams.xaml ähnelt.
|
||||
/// </summary>
|
||||
public static string PathExams_ExamsPage {
|
||||
get {
|
||||
return ResourceManager.GetString("PathExams_ExamsPage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Lecture/LecturePage.xaml ähnelt.
|
||||
/// </summary>
|
||||
@@ -636,6 +744,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Person/PersonPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
public static string PathPerson_Person {
|
||||
get {
|
||||
return ResourceManager.GetString("PathPerson_Person", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die /Pages/Setting/AppSettingPage.xaml ähnelt.
|
||||
/// </summary>
|
||||
@@ -735,6 +852,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die 035569 ähnelt.
|
||||
/// </summary>
|
||||
public static string UniCBTelPrefix {
|
||||
get {
|
||||
return ResourceManager.GetString("UniCBTelPrefix", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/professorships.xml ähnelt.
|
||||
/// </summary>
|
||||
@@ -753,6 +879,15 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die https://www.zv.tu-cottbus.de/CMS-Webservice/Pruefungsordnung/Uebersicht ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlExamApp_ExamFeed {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlExamApp_ExamFeed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.zv.tu-cottbus.de/LSFveranst/LSF4 ähnelt.
|
||||
/// </summary>
|
||||
@@ -790,16 +925,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week {
|
||||
get {
|
||||
return ResourceManager.GetString("UrlMensa_Week", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBMain {
|
||||
get {
|
||||
@@ -808,7 +934,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBNorth {
|
||||
get {
|
||||
@@ -817,7 +943,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusHL&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_CBSouth {
|
||||
get {
|
||||
@@ -826,7 +952,7 @@ namespace CampusAppWP8.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=Senftenberg&v=1 ähnelt.
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&v=1 ähnelt.
|
||||
/// </summary>
|
||||
public static string UrlMensa_Week_SBFMain {
|
||||
get {
|
||||
|
||||
@@ -255,9 +255,6 @@
|
||||
<data name="FileEvents_Name" xml:space="preserve">
|
||||
<value>EventsFeed.xml</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="FileOpeningHours_OpeningHours" xml:space="preserve">
|
||||
<value>OpeninghoursFeed.xml</value>
|
||||
</data>
|
||||
@@ -382,16 +379,16 @@
|
||||
<value>MensaFeed_SFBMain.xml</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBMain" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBNorth" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusBTU&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusBTU&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_CBSouth" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=CottbusHL&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=CottbusHL&v=1</value>
|
||||
</data>
|
||||
<data name="UrlMensa_Week_SBFMain" xml:space="preserve">
|
||||
<value>http://www.tu-cottbus.de/campusapp-data/Studentenwerk/index.php?mensa=Senftenberg&v=1</value>
|
||||
<value>http://www.studentenwerk-frankfurt.de/2011/ClassPackage/App_IKMZ_BTU/index.php?mensa=Senftenberg&v=1</value>
|
||||
</data>
|
||||
<data name="SpsApi_CampusDomain" xml:space="preserve">
|
||||
<value>3</value>
|
||||
@@ -417,4 +414,49 @@
|
||||
<data name="FileMap_CBMainMap" xml:space="preserve">
|
||||
<value>/Assets/campusmap.png</value>
|
||||
</data>
|
||||
<data name="AppSetting_DevMode" xml:space="preserve">
|
||||
<value>DevMode</value>
|
||||
</data>
|
||||
<data name="AppSetting_UniNet" xml:space="preserve">
|
||||
<value>UniNet</value>
|
||||
</data>
|
||||
<data name="AppSetting_UniNetworkDesc" xml:space="preserve">
|
||||
<value>802.1X</value>
|
||||
</data>
|
||||
<data name="AppSetting_UniNetworkName" xml:space="preserve">
|
||||
<value>802.1X</value>
|
||||
</data>
|
||||
<data name="AppSetting_WifiEnable" xml:space="preserve">
|
||||
<value>WifiEnable</value>
|
||||
</data>
|
||||
<data name="AppSetting_OnlyWifi" xml:space="preserve">
|
||||
<value>OnlyWifi</value>
|
||||
</data>
|
||||
<data name="ParamModelMap_SearchTermAlias" xml:space="preserve">
|
||||
<value>SearchAlias</value>
|
||||
</data>
|
||||
<data name="PathExams_ExamsPage" xml:space="preserve">
|
||||
<value>/Pages/Exams/Exams.xaml</value>
|
||||
</data>
|
||||
<data name="ExamXmlValidRootName" xml:space="preserve">
|
||||
<value>links</value>
|
||||
</data>
|
||||
<data name="FileExamApp_ExamFeed" xml:space="preserve">
|
||||
<value>examlist.xml</value>
|
||||
</data>
|
||||
<data name="UrlExamApp_ExamFeed" xml:space="preserve">
|
||||
<value>https://www.zv.tu-cottbus.de/CMS-Webservice/Pruefungsordnung/Uebersicht</value>
|
||||
</data>
|
||||
<data name="ExamPageModelKey" xml:space="preserve">
|
||||
<value>ExamsPage.LastPivotIndex</value>
|
||||
</data>
|
||||
<data name="PathPerson_Person" xml:space="preserve">
|
||||
<value>/Pages/Person/PersonPage.xaml</value>
|
||||
</data>
|
||||
<data name="DeTelPrefix" xml:space="preserve">
|
||||
<value>+49</value>
|
||||
</data>
|
||||
<data name="UniCBTelPrefix" xml:space="preserve">
|
||||
<value>035569</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -66,6 +66,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the CurrentPosition icon.
|
||||
/// </summary>
|
||||
public static string CurrentPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("current_position_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Delete icon.
|
||||
/// </summary>
|
||||
@@ -88,6 +99,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Exams icon.
|
||||
/// </summary>
|
||||
public static string Exams
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("exams_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Favorite icon.
|
||||
/// </summary>
|
||||
@@ -220,6 +242,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Person icon.
|
||||
/// </summary>
|
||||
public static string Person
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("person_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the Phone icon.
|
||||
/// </summary>
|
||||
@@ -264,6 +297,17 @@ namespace CampusAppWP8.Resources
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the SearchPlace icon.
|
||||
/// </summary>
|
||||
public static string SearchPlace
|
||||
{
|
||||
get
|
||||
{
|
||||
return Themerize("search_place_159.png");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the uri string of the StudentCouncil icon.
|
||||
/// </summary>
|
||||
|
||||
@@ -129,12 +129,18 @@
|
||||
<data name="CowPig" xml:space="preserve">
|
||||
<value>info_159.png</value>
|
||||
</data>
|
||||
<data name="CurrentPosition" xml:space="preserve">
|
||||
<value>current_position_159.png</value>
|
||||
</data>
|
||||
<data name="Delete" xml:space="preserve">
|
||||
<value>delete_159.png</value>
|
||||
</data>
|
||||
<data name="Departments" xml:space="preserve">
|
||||
<value>departments_159.png</value>
|
||||
</data>
|
||||
<data name="Exams" xml:space="preserve">
|
||||
<value>exams_159.png</value>
|
||||
</data>
|
||||
<data name="Favorite" xml:space="preserve">
|
||||
<value>favorite_159.png</value>
|
||||
</data>
|
||||
@@ -171,6 +177,9 @@
|
||||
<data name="Openhours" xml:space="preserve">
|
||||
<value>openhours_159.png</value>
|
||||
</data>
|
||||
<data name="Person" xml:space="preserve">
|
||||
<value>person_159.png</value>
|
||||
</data>
|
||||
<data name="Phone" xml:space="preserve">
|
||||
<value>phone_159.png</value>
|
||||
</data>
|
||||
@@ -183,6 +192,9 @@
|
||||
<data name="Search" xml:space="preserve">
|
||||
<value>search_159.png</value>
|
||||
</data>
|
||||
<data name="SearchPlace" xml:space="preserve">
|
||||
<value>search_place_159.png</value>
|
||||
</data>
|
||||
<data name="StudentCouncil" xml:space="preserve">
|
||||
<value>student_council_159.png</value>
|
||||
</data>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<CollectionProperty Name="RecognizedWords">
|
||||
<Value>enum</Value>
|
||||
<Value>Fiedler</Value>
|
||||
<Value>Stubbfel</Value>
|
||||
</CollectionProperty>
|
||||
</GlobalSettings>
|
||||
<Analyzers>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="Width" Value="164"/>
|
||||
<Setter Property="Height" Value="192"/>
|
||||
<Setter Property="toolkit:TiltEffect.IsTiltEnabled" Value="True"/>
|
||||
</Style>
|
||||
<Style x:Key="StartPageButtonText" TargetType="TextBlock">
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace CampusAppWP8.Utility
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.Storage;
|
||||
|
||||
/// <summary>
|
||||
@@ -27,27 +28,12 @@ namespace CampusAppWP8.Utility
|
||||
/// </summary>
|
||||
private string filename = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Read type.
|
||||
/// </summary>
|
||||
private IOTypeRead readType;
|
||||
|
||||
/// <summary>
|
||||
/// Write type.
|
||||
/// </summary>
|
||||
private IOTypeWrite writeType;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="File" /> class.
|
||||
/// </summary>
|
||||
/// <param name="filename">file name</param>
|
||||
/// <param name="read">read type</param>
|
||||
/// <param name="write">write type</param>
|
||||
public File(string filename, IOTypeRead read, IOTypeWrite write)
|
||||
/// <summary>Initializes a new instance of the <see cref="File" /> class.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="filename"> file name.</param>
|
||||
public File(string filename)
|
||||
{
|
||||
this.filename = filename;
|
||||
this.readType = (read == IOTypeRead.INVALID) ? IOTypeRead.ReadAsync : read;
|
||||
this.writeType = write;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -55,113 +41,28 @@ namespace CampusAppWP8.Utility
|
||||
/// </summary>
|
||||
public delegate void WriteCallbackFunc();
|
||||
|
||||
/// <summary>
|
||||
/// IO read type ENUM.
|
||||
/// </summary>
|
||||
public enum IOTypeRead
|
||||
/// <summary>Read data from file to a string.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <returns>data string.</returns>
|
||||
public byte[] ReadFile()
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid/unset state.
|
||||
/// </summary>
|
||||
INVALID = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Sync read.
|
||||
/// </summary>
|
||||
ReadSync = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Async read.
|
||||
/// </summary>
|
||||
ReadAsync = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IO write type ENUM.
|
||||
/// </summary>
|
||||
public enum IOTypeWrite
|
||||
{
|
||||
/// <summary>
|
||||
/// Invalid/unset state.
|
||||
/// </summary>
|
||||
INVALID = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Sync write.
|
||||
/// </summary>
|
||||
WriteSync = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Async write.
|
||||
/// </summary>
|
||||
WriteAsync = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Read only, no writing.
|
||||
/// </summary>
|
||||
ReadOnly = 3
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read data from file to a string.
|
||||
/// </summary>
|
||||
/// <param name="ioType">read type</param>
|
||||
/// <returns>data string</returns>
|
||||
public string ReadFile(IOTypeRead ioType = IOTypeRead.INVALID)
|
||||
{
|
||||
string retValue = null;
|
||||
byte[] retValue = null;
|
||||
|
||||
if (this.Exist() == true)
|
||||
{
|
||||
IOTypeRead tempType = ioType;
|
||||
|
||||
if (tempType == IOTypeRead.INVALID)
|
||||
{
|
||||
tempType = this.readType;
|
||||
}
|
||||
|
||||
if (tempType == IOTypeRead.ReadAsync)
|
||||
{
|
||||
// retValue = this.ReadAsync();
|
||||
retValue = this.ReadSync();
|
||||
}
|
||||
else if (tempType == IOTypeRead.ReadSync)
|
||||
{
|
||||
retValue = this.ReadSync();
|
||||
}
|
||||
retValue = this.ReadSync();
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write bytes to the file.
|
||||
/// </summary>
|
||||
/// <param name="data">data byte array.</param>
|
||||
/// <param name="onSavedCallback">callback function, called after writing is done.</param>
|
||||
/// <summary>Write bytes to the file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="data"> data byte array.</param>
|
||||
/// <param name="onSavedCallback"> callback function, called after writing is done.</param>
|
||||
/// <param name="onFailedCallback">callback function, called when writing failed.</param>
|
||||
/// <param name="ioType">write type.</param>
|
||||
public void WriteFile(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback, IOTypeWrite ioType = IOTypeWrite.INVALID)
|
||||
public void WriteFile(byte[] data, WriteCallbackFunc onSavedCallback, WriteCallbackFunc onFailedCallback)
|
||||
{
|
||||
IOTypeWrite tempType = ioType;
|
||||
|
||||
if (tempType == IOTypeWrite.INVALID)
|
||||
{
|
||||
tempType = this.writeType;
|
||||
}
|
||||
|
||||
/*
|
||||
if (tempType == IOTypeWrite.WriteAsync)
|
||||
{
|
||||
this.WriteAsync(data, onSavedCallback, onFailedCallback);
|
||||
}
|
||||
else if (tempType == IOTypeWrite.WriteSync)
|
||||
{
|
||||
// this.WriteSync(data);
|
||||
this.WriteAsync(data, onSavedCallback, onFailedCallback);
|
||||
}
|
||||
*/
|
||||
|
||||
Thread th = new Thread(delegate() { this.WriteAsync(data, onSavedCallback, onFailedCallback); });
|
||||
th.Start();
|
||||
}
|
||||
@@ -185,48 +86,39 @@ namespace CampusAppWP8.Utility
|
||||
return this.GetFileInfo().Exists;
|
||||
}
|
||||
|
||||
/// <summary>Converts this object to a storage file.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <returns>Storage File</returns>
|
||||
public async Task<StorageFile> AsStorageFile()
|
||||
{
|
||||
if (this.Exist())
|
||||
{
|
||||
return await File.LocalFolder.GetFileAsync(this.filename);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read data synchronous from file.
|
||||
/// </summary>
|
||||
/// <returns>data string</returns>
|
||||
private string ReadSync()
|
||||
private byte[] ReadSync()
|
||||
{
|
||||
string retValue = null;
|
||||
byte[] retValue = null;
|
||||
|
||||
using (Stream fileStream = File.LocalFolder.OpenStreamForReadAsync(this.filename).Result)
|
||||
{
|
||||
using (StreamReader streamReader = new StreamReader(fileStream))
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
retValue = streamReader.ReadToEnd();
|
||||
fileStream.CopyTo(ms);
|
||||
retValue = ms.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read data asynchronous from file.
|
||||
/// </summary>
|
||||
/// <returns>data string</returns>
|
||||
private string ReadAsync()
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write data synchronous to file.
|
||||
/// </summary>
|
||||
/// <param name="data">data array</param>
|
||||
/// <returns>true, if succeeded</returns>
|
||||
private bool WriteSync(byte[] data)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write data asynchronous to file.
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,17 @@ namespace CampusAppWP8.Utility
|
||||
client.DownloadStringAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>Method realize the http-get-method resource.</summary>
|
||||
/// <remarks>Stubbfel, 03.09.2013.</remarks>
|
||||
/// <param name="url"> Url of the resource.</param>
|
||||
/// <param name="action">The action.</param>
|
||||
public void HttpGet(Uri url, Action<object, OpenReadCompletedEventArgs> action)
|
||||
{
|
||||
WebClient client = new WebClient();
|
||||
client.OpenReadCompleted += new OpenReadCompletedEventHandler(action);
|
||||
client.OpenReadAsync(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create the Url for the http-get-method
|
||||
/// </summary>
|
||||
|
||||
@@ -73,11 +73,15 @@ namespace CampusAppWP8.Utility.Lui.Button
|
||||
/// </remarks>
|
||||
protected override void OnClick()
|
||||
{
|
||||
MapsTask mapsTask = new MapsTask();
|
||||
mapsTask.Center = new GeoCoordinate(51.766788, 14.326681);
|
||||
mapsTask.SearchTerm = this.SearchTerm as string;
|
||||
mapsTask.ZoomLevel = 15;
|
||||
mapsTask.Show();
|
||||
string urlString = Constants.PathCampusmap_Campusmap;
|
||||
if (this.SearchTerm != null)
|
||||
{
|
||||
urlString += "?" + Constants.ParamModelMap_SearchTermAlias + "=" + this.SearchTerm;
|
||||
}
|
||||
|
||||
Uri url = new Uri(urlString as string, UriKind.Relative);
|
||||
Page page = App.RootFrame.Content as Page;
|
||||
page.NavigationService.Navigate(url);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
/// <summary>
|
||||
@@ -31,8 +33,9 @@ namespace CampusAppWP8.Utility
|
||||
/// <param name="inputString">String with Html-Tags</param>
|
||||
/// <returns>String without Html-Tags</returns>
|
||||
public static string StripHTML(string inputString)
|
||||
{
|
||||
return Regex.Replace(inputString, HtmlTagPattern, string.Empty);
|
||||
{
|
||||
string result = Regex.Replace(inputString, HtmlTagPattern, string.Empty);
|
||||
return System.Net.HttpUtility.HtmlDecode(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -55,6 +58,48 @@ namespace CampusAppWP8.Utility
|
||||
return str.TrimEnd('\n');
|
||||
}
|
||||
|
||||
/// <summary>Query if 'strIn' is valid email.</summary>
|
||||
/// <remarks>Stubbfel, 04.09.2013.</remarks>
|
||||
/// <param name="strIn">The in.</param>
|
||||
/// <returns>true if valid email, false if not.</returns>
|
||||
public static bool IsValidEmail(string strIn)
|
||||
{
|
||||
// Return true if strIn is in valid e-mail format.
|
||||
try
|
||||
{
|
||||
return Regex.IsMatch(strIn,
|
||||
@"^(?("")(""[^""]+?""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +
|
||||
@"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9]{2,17}))$",
|
||||
RegexOptions.IgnoreCase);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates uni telefon number.</summary>
|
||||
/// <remarks>Stubbfel, 04.09.2013.</remarks>
|
||||
/// <param name="input">The input.</param>
|
||||
/// <returns>The new uni telefon number.</returns>
|
||||
public static string CreateUniTelefonNumber(string input)
|
||||
{
|
||||
string result = null;
|
||||
if (input.Length < 5)
|
||||
{
|
||||
result = Constants.UniCBTelPrefix + input.TrimStart('0');
|
||||
}
|
||||
else
|
||||
{
|
||||
result = input;
|
||||
}
|
||||
|
||||
Regex regexObj = new Regex(@"[^\d]");
|
||||
result = regexObj.Replace(result.TrimStart('0'), "");
|
||||
result = Constants.DeTelPrefix + result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>Count character.</summary>
|
||||
/// <remarks>Fiedler, 27.08.2013.</remarks>
|
||||
/// <param name="str">input string.</param>
|
||||
|
||||
@@ -6,20 +6,18 @@
|
||||
// <sience>16.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Utility
|
||||
{
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Device.Location;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility.NDEF;
|
||||
using Windows.Networking.Proximity;
|
||||
using Microsoft.Phone.Net.NetworkInformation;
|
||||
|
||||
/// <summary>
|
||||
/// Collection of utility functions.
|
||||
@@ -212,7 +210,7 @@ namespace CampusAppWP8.Utility
|
||||
{
|
||||
if (!Settings.AppSetting.GeoWatchEnable)
|
||||
{
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
|
||||
GeoCoordinateWatcher watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.High);
|
||||
@@ -286,5 +284,59 @@ namespace CampusAppWP8.Utility
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Query if the phone is in the uni network. Method compares only Networkname and Description!</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <returns>true if uni networkavailable, false if not.</returns>
|
||||
public static bool IsUniNetworkAvailable()
|
||||
{
|
||||
NetworkInterfaceList networkInterfaceList = new NetworkInterfaceList();
|
||||
foreach (NetworkInterfaceInfo networkInterfaceInfo in networkInterfaceList)
|
||||
{
|
||||
if (networkInterfaceInfo.InterfaceType == NetworkInterfaceType.Wireless80211
|
||||
&& networkInterfaceInfo.InterfaceSubtype == NetworkInterfaceSubType.WiFi
|
||||
&& networkInterfaceInfo.InterfaceName.Equals(Constants.AppSetting_UniNetworkName)
|
||||
&& networkInterfaceInfo.Description.Equals(Constants.AppSetting_UniNetworkDesc)
|
||||
&& networkInterfaceInfo.InterfaceState == ConnectState.Connected)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Queries if a wifik is available.</summary>
|
||||
/// <remarks>Stubbfel, 26.08.2013.</remarks>
|
||||
/// <returns>true if a wifik is available, false if not.</returns>
|
||||
public static bool IsWifiAvailable()
|
||||
{
|
||||
NetworkInterfaceList networkInterfaceList = new NetworkInterfaceList();
|
||||
foreach (NetworkInterfaceInfo networkInterfaceInfo in networkInterfaceList)
|
||||
{
|
||||
if (networkInterfaceInfo.InterfaceType == NetworkInterfaceType.Wireless80211
|
||||
&& networkInterfaceInfo.InterfaceSubtype == NetworkInterfaceSubType.WiFi
|
||||
&& networkInterfaceInfo.InterfaceState == ConnectState.Connected)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Gets load modus. Is check if the only Wifi option is active</summary>
|
||||
/// <remarks>Stubbfel, 27.08.2013.</remarks>
|
||||
/// <typeparam name="T">Generic type parameter.</typeparam>
|
||||
/// <returns>The load modus< t></returns>
|
||||
public static MainModel<T>.ForceType getLoadModus<T>()
|
||||
{
|
||||
if (Settings.AppSetting.OnlyWifi && !Settings.AppSetting.WifiEnable)
|
||||
{
|
||||
return MainModel<T>.ForceType.FORCE_FILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return MainModel<T>.ForceType.INVALID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CampusAppWPortalLib8</RootNamespace>
|
||||
<AssemblyName>CampusAppWPortalLib8</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\Campusmap\CBMainMapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceInformation.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceModel.cs" />
|
||||
<Compile Include="Model\GeoDb\PlaceService.cs" />
|
||||
<Compile Include="Model\GeoDb\SpsModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utility\Logger.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFMessage.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFRecord.cs" />
|
||||
<Compile Include="Utility\NDEF\NDEFShortRecord.cs" />
|
||||
<Compile Include="Utility\StringManager.cs" />
|
||||
<Compile Include="Utility\XmlManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.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>
|
||||
@@ -0,0 +1,45 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="CBMainMapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>13.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
using CampusAppWPortalLib8.Model.GeoDb;
|
||||
using CampusAppWPortalLib8.Utility;
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.Campusmap
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Class for the MapModel of the mainCampus of cottbus
|
||||
/// </summary>
|
||||
public class CBMainMapModel : MapModel
|
||||
{
|
||||
/// <summary>Variable for the identify of the campus.</summary>
|
||||
private static readonly string Campus = "1";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CBMainMapModel" /> class.
|
||||
/// </summary>
|
||||
public CBMainMapModel(string xmlFilePath) : base(xmlFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Loads the spatial./.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
protected override void LoadSpatials(string xmlFilePath)
|
||||
{
|
||||
SpsModel model = XmlManager.DeserializationFileToModel<SpsModel>(xmlFilePath);
|
||||
|
||||
this.Spatial = new SpsModel();
|
||||
foreach (PlaceModel place in model.Places)
|
||||
{
|
||||
if (Campus.Equals(place.ParentId) || Campus.Equals(place.PlaceId))
|
||||
{
|
||||
this.Spatial.Places.Add(place);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.Campusmap
|
||||
{
|
||||
using CampusAppWPortalLib8.Model.GeoDb;
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a Map
|
||||
/// </summary>
|
||||
public class MapModel
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapModel" /> class.
|
||||
/// </summary>
|
||||
public MapModel(string xmlFilePath)
|
||||
{
|
||||
this.LoadSpatials(xmlFilePath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>Gets or sets the spatial of the map.</summary>
|
||||
/// <value>The spatial.</value>
|
||||
public SpsModel Spatial { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>Loads the spatial./</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
protected virtual void LoadSpatials(string xmlFilePath)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlaceInformation.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>19.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Information about the place.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
public class PlaceInformation
|
||||
{
|
||||
/// <summary>Gets or sets the name of the information.</summary>
|
||||
/// <value>The name of the information.</value>
|
||||
[XmlElement("placeInformationName")]
|
||||
public string InformationName { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the information value.</summary>
|
||||
/// <value>The information value.</value>
|
||||
[XmlText]
|
||||
public string InformationValue { get; set; }
|
||||
}
|
||||
}
|
||||
47
CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/PlaceModel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="PlaceModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a place of the SPSService
|
||||
/// </summary>
|
||||
public class PlaceModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the placeId
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public string PlaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the "parent" of a place
|
||||
/// </summary>
|
||||
[XmlAttribute("parentId")]
|
||||
public string ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ReferencePoint of a place
|
||||
/// </summary>
|
||||
[XmlAttribute("refpoint")]
|
||||
public string RefPoint { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the information.</summary>
|
||||
/// <value>The information.</value>
|
||||
[XmlElement("placeInformation")]
|
||||
public ObservableCollection<PlaceInformation> Informations { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the services.</summary>
|
||||
/// <value>The services.</value>
|
||||
[XmlElement("placeService")]
|
||||
public ObservableCollection<PlaceService> Services { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="PlaceService.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>19.08.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>Place service.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
public class PlaceService
|
||||
{
|
||||
/// <summary>Gets or sets the name of the service.</summary>
|
||||
/// <value>The name of the service.</value>
|
||||
[XmlAttribute("placeServiceName")]
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the SAP of an service.</summary>
|
||||
/// <value>The sap.</value>
|
||||
[XmlElement("sap")]
|
||||
public string SAP { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the request for a place.</summary>
|
||||
/// <value>The request.</value>
|
||||
[XmlElement("request")]
|
||||
public string Request { get; set; }
|
||||
}
|
||||
}
|
||||
87
CampusAppWP8/CampusAppWPortalLib8/Model/GeoDb/SpsModel.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="SpsModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWPortalLib8.Model.GeoDb
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a xml-response of the SPSService
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class SpsModel
|
||||
{
|
||||
/// <summary>Initializes a new instance of the SpsModel class.</summary>
|
||||
/// <remarks>Stubbfel, 20.08.2013.</remarks>
|
||||
public SpsModel()
|
||||
{
|
||||
this.Places = new ObservableCollection<PlaceModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of places
|
||||
/// </summary>
|
||||
[XmlElement("place")]
|
||||
public ObservableCollection<PlaceModel> Places { get; set; }
|
||||
|
||||
/// <summary>Gets places by information.</summary>
|
||||
/// <remarks>Stubbfel, 19.08.2013.</remarks>
|
||||
/// <param name="query"> The query.</param>
|
||||
/// <param name="ignoreCases"> (Optional) the ignore cases.</param>
|
||||
/// <param name="informationName">(Optional) name of the information.</param>
|
||||
/// <returns>The places by information.</returns>
|
||||
public List<PlaceModel> GetPlacesByInformation(string query, bool ignoreCases = true, string informationName = null)
|
||||
{
|
||||
string querryLow = string.Empty;
|
||||
IEnumerable<PlaceModel> resultplaces = null;
|
||||
|
||||
// select correct statement
|
||||
if (ignoreCases && informationName == null)
|
||||
{
|
||||
querryLow = query.ToLower();
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.ToLower().Contains(querryLow)
|
||||
select place;
|
||||
}
|
||||
else if (ignoreCases && informationName != null)
|
||||
{
|
||||
querryLow = query.ToLower();
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.ToLower().Contains(querryLow) && info.InformationName.Equals(informationName)
|
||||
select place;
|
||||
}
|
||||
else if (!ignoreCases && informationName == null)
|
||||
{
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.Contains(querryLow)
|
||||
select place;
|
||||
}
|
||||
else if (!ignoreCases && informationName != null)
|
||||
{
|
||||
resultplaces = from place in this.Places
|
||||
from info in place.Informations
|
||||
where info.InformationValue.Contains(querryLow) && info.InformationName.Equals(informationName)
|
||||
select place;
|
||||
}
|
||||
|
||||
// null assert
|
||||
if (resultplaces == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return resultplaces.ToList<PlaceModel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
30
CampusAppWP8/CampusAppWPortalLib8/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.Resources;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über folgende
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("CampusAppWPortalLib8")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CampusAppWPortalLib8")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: NeutralResourcesLanguage("de")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// durch Einsatz von '*', wie in nachfolgendem Beispiel:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
35
CampusAppWP8/CampusAppWPortalLib8/Utility/Logger.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
//--------------------------------------------------------------------
|
||||
// <copyright file="Logger.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility
|
||||
{
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// This Class creates logs for the app
|
||||
/// </summary>
|
||||
public class Logger
|
||||
{
|
||||
/// <summary>
|
||||
/// Method log a Exception
|
||||
/// </summary>
|
||||
/// <param name="exception">exception which has to log</param>
|
||||
public static void LogException(Exception exception)
|
||||
{
|
||||
// Console.WriteLine(exception);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log a message.
|
||||
/// </summary>
|
||||
/// <param name="msg">to be logged message</param>
|
||||
public static void LogMsg(string msg)
|
||||
{
|
||||
// Console.WriteLine(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
154
CampusAppWP8/CampusAppWPortalLib8/Utility/NDEF/NDEFMessage.cs
Normal file
@@ -0,0 +1,154 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFMessage.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility.NDEF
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
/// <summary>Ndef message.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public class NDEFMessage
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>The records.</summary>
|
||||
private List<NDEFRecord> records;
|
||||
|
||||
#endregion
|
||||
|
||||
#region constructors
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="type"> The type.</param>
|
||||
/// <param name="tnf"> (Optional) the tnf.</param>
|
||||
public NDEFMessage(string content, TYPEVAL type, NDEFRecord.TNFVAL tnf = NDEFRecord.TNFVAL.WKT)
|
||||
{
|
||||
this.records = new List<NDEFRecord>();
|
||||
float recordsCount = (float)content.Length / NDEFRecord.MaxRecordPayLoad;
|
||||
NDEFRecord tmpRecord = null;
|
||||
string praefix = NDEFMessage.GetPraefix(type);
|
||||
|
||||
for (int i = 0; recordsCount > 0; i++)
|
||||
{
|
||||
tmpRecord = new NDEFShortRecord();
|
||||
tmpRecord.Type = type;
|
||||
tmpRecord.TNF = tnf;
|
||||
tmpRecord.PayloadPraefix = praefix;
|
||||
int recordsize = 255;
|
||||
if (content.Length < (i + 1) * recordsize)
|
||||
{
|
||||
recordsize = content.Length - (i * recordsize);
|
||||
}
|
||||
|
||||
tmpRecord.Payload = content.Substring(i * 255, recordsize);
|
||||
if (i == 0)
|
||||
{
|
||||
tmpRecord.MB = NDEFRecord.NDEFFlags.MBSET;
|
||||
}
|
||||
|
||||
this.records.Add(tmpRecord);
|
||||
recordsCount--;
|
||||
}
|
||||
|
||||
this.records[this.records.IndexOf(tmpRecord)].ME = NDEFRecord.NDEFFlags.MESET;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFMessage class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
public NDEFMessage(byte[] array)
|
||||
{
|
||||
this.records = new List<NDEFRecord>();
|
||||
|
||||
NDEFRecord tmpRecord = null;
|
||||
for (int i = 0; i < array.Length; i += tmpRecord.RecordSize)
|
||||
{
|
||||
tmpRecord = new NDEFShortRecord(array, i);
|
||||
|
||||
this.records.Add(tmpRecord);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enum
|
||||
|
||||
/// <summary>Values that represent TYPEVAL.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum TYPEVAL
|
||||
{
|
||||
/// <summary>An enum constant representing the empty option.</summary>
|
||||
EMPTY = 0x00,
|
||||
|
||||
/// <summary>An enum constant representing the URL option.</summary>
|
||||
URL = 0x55,
|
||||
|
||||
/// <summary>An enum constant representing the text option.</summary>
|
||||
TEXT = 0x54,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
/// <summary>Gets a praefix.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <returns>The praefix.</returns>
|
||||
public static string GetPraefix(TYPEVAL type)
|
||||
{
|
||||
string praefix = string.Empty;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case TYPEVAL.TEXT:
|
||||
praefix = "\x02" + "de";
|
||||
break;
|
||||
case TYPEVAL.URL:
|
||||
praefix = "\x01";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return praefix;
|
||||
}
|
||||
|
||||
/// <summary>Gets the content.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>The content.</returns>
|
||||
public string GetContent()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
foreach (NDEFRecord record in this.records)
|
||||
{
|
||||
result += record.Payload;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>Converts this object to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public byte[] ToByteArray()
|
||||
{
|
||||
MemoryStream ms = new MemoryStream();
|
||||
foreach (NDEFRecord record in this.records)
|
||||
{
|
||||
ms.Write(record.ToByteArray(), 0, record.RecordSize);
|
||||
}
|
||||
|
||||
return ms.ToArray();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
188
CampusAppWP8/CampusAppWPortalLib8/Utility/NDEF/NDEFRecord.cs
Normal file
@@ -0,0 +1,188 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFRecord.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility.NDEF
|
||||
{
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>Ndef record of a NDEFMessage.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public abstract class NDEFRecord
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>The maximum record pay load.</summary>
|
||||
public const int MaxRecordPayLoad = 255;
|
||||
|
||||
/// <summary>Size of the type.</summary>
|
||||
protected const byte TypeSize = 0x01;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public NDEFRecord()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
/// <param name="index">(Optional) zero-based index of the.</param>
|
||||
public NDEFRecord(byte[] array, int index = 0)
|
||||
{
|
||||
this.FormatFlags = array[index];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region enum
|
||||
|
||||
/// <summary>Values that represent NDEFFlags.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum NDEFFlags
|
||||
{
|
||||
/// <summary>An Enum constant representing the UNSET option.</summary>
|
||||
UNSET = 0x00,
|
||||
|
||||
/// <summary>An Enum constant representing the Message begin option.</summary>
|
||||
MBSET = 0x80,
|
||||
|
||||
/// <summary>An Enum constant representing the Message end option.</summary>
|
||||
MESET = 0x40,
|
||||
|
||||
/// <summary>An Enum constant representing the CHUNK FLAG option.</summary>
|
||||
CFSET = 0x20,
|
||||
|
||||
/// <summary>An Enum constant representing the Short Record set option.</summary>
|
||||
SRSET = 0x10,
|
||||
|
||||
/// <summary>An Enum constant representing the ID length option.</summary>
|
||||
ILSET = 0x08,
|
||||
|
||||
/// <summary>An enum constant representing the tnfset option.</summary>
|
||||
TNFSET = 0x03
|
||||
}
|
||||
|
||||
/// <summary>Values that represent TNFVAL.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public enum TNFVAL
|
||||
{
|
||||
/// <summary>An enum constant representing the empty option.</summary>
|
||||
EMPTY = 0x00,
|
||||
|
||||
/// <summary>An enum constant representing the Well-Know-Type option.</summary>
|
||||
WKT = 0x01,
|
||||
|
||||
/// <summary>An enum constant representing the MediaType option.</summary>
|
||||
MEDIATYPE = 0x02,
|
||||
|
||||
/// <summary>An enum constant representing the URI option.</summary>
|
||||
URI = 0x03,
|
||||
|
||||
/// <summary>An enum constant representing the NFCE option.</summary>
|
||||
NFCE = 0x04,
|
||||
|
||||
/// <summary>An enum constant representing the unknow option.</summary>
|
||||
unknow = 0x05,
|
||||
|
||||
/// <summary>An enum constant representing the unchanged option.</summary>
|
||||
UNCHANGED = 0x06,
|
||||
|
||||
/// <summary>An enum constant representing the reserved option.</summary>
|
||||
RESERVED = 0x07
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>Gets or sets the MBFlag.</summary>
|
||||
/// <value>The MBFlag.</value>
|
||||
public NDEFFlags MB { get; set; }
|
||||
|
||||
/// <summary>Gets or sets MEFlag.</summary>
|
||||
/// <value>The MEFlag .</value>
|
||||
public NDEFFlags ME { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the CFFlag.</summary>
|
||||
/// <value>The CFFlag.</value>
|
||||
public NDEFFlags CF { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the SRFlag.</summary>
|
||||
/// <value>The SRFlag.</value>
|
||||
public NDEFFlags SR { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the ILFlag.</summary>
|
||||
/// <value>The ILFlag.</value>
|
||||
public NDEFFlags IL { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the TNFField.</summary>
|
||||
/// <value>The TNFField.</value>
|
||||
public TNFVAL TNF { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the type.</summary>
|
||||
/// <value>The type.</value>
|
||||
public NDEFMessage.TYPEVAL Type { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the format flags.</summary>
|
||||
/// <value>The format flags.</value>
|
||||
public byte FormatFlags
|
||||
{
|
||||
get
|
||||
{
|
||||
return (byte)((byte)this.TNF | ((byte)this.MB) | ((byte)this.ME) | ((byte)this.CF) | ((byte)this.SR) | ((byte)this.IL));
|
||||
}
|
||||
|
||||
protected set
|
||||
{
|
||||
this.TNF = (TNFVAL)(value & (byte)NDEFFlags.TNFSET);
|
||||
this.MB = (NDEFFlags)(value & (byte)NDEFFlags.MBSET);
|
||||
this.ME = (NDEFFlags)(value & (byte)NDEFFlags.MESET);
|
||||
this.CF = (NDEFFlags)(value & (byte)NDEFFlags.CFSET);
|
||||
this.SR = (NDEFFlags)(value & (byte)NDEFFlags.SRSET);
|
||||
this.IL = (NDEFFlags)(value & (byte)NDEFFlags.ILSET);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the payload.</summary>
|
||||
/// <value>The payload.</value>
|
||||
public string Payload { get; set; }
|
||||
|
||||
/// <summary>Gets the size of the record.</summary>
|
||||
/// <value>The size of the record.</value>
|
||||
public int RecordSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.HeaderSize + this.Payload.Length + this.PayloadPraefix.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the payload praefix.</summary>
|
||||
/// <value>The payload praefix.</value>
|
||||
public string PayloadPraefix { get; set; }
|
||||
|
||||
/// <summary>Gets or sets the size of the header.</summary>
|
||||
/// <value>The size of the header.</value>
|
||||
protected int HeaderSize { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>Converts the record to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public abstract byte[] ToByteArray();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
// End of Utility\NDEF\NDEFRecord.cs
|
||||
@@ -0,0 +1,63 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="NDEFShortRecord.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>21.08.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility.NDEF
|
||||
{
|
||||
using System.Text;
|
||||
|
||||
/// <summary>Ndef short record.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public class NDEFShortRecord : NDEFRecord
|
||||
{
|
||||
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
public NDEFShortRecord()
|
||||
{
|
||||
this.HeaderSize = 4;
|
||||
this.SR = NDEFFlags.SRSET;
|
||||
this.IL = NDEFFlags.UNSET;
|
||||
this.CF = NDEFFlags.UNSET;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the NDEFShortRecord class.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <param name="array">The array.</param>
|
||||
/// <param name="index">(Optional) zero-based index of the.</param>
|
||||
public NDEFShortRecord(byte[] array, int index = 0)
|
||||
: base(array)
|
||||
{
|
||||
this.HeaderSize = 4;
|
||||
this.Type = (NDEFMessage.TYPEVAL)array[index + 3];
|
||||
this.PayloadPraefix = NDEFMessage.GetPraefix(this.Type);
|
||||
int payLoadSize = array[index + 2] - this.PayloadPraefix.Length;
|
||||
this.Payload = Encoding.UTF8.GetString(array, index + this.HeaderSize + this.PayloadPraefix.Length, payLoadSize);
|
||||
}
|
||||
|
||||
/// <summary>Converts this NDEFShortRecord to a byte array.</summary>
|
||||
/// <remarks>Stubbfel, 21.08.2013.</remarks>
|
||||
/// <returns>This object as a byte[].</returns>
|
||||
public override byte[] ToByteArray()
|
||||
{
|
||||
byte[] payloadAr = Encoding.UTF8.GetBytes(this.PayloadPraefix + this.Payload);
|
||||
byte[] array = new byte[payloadAr.Length + this.HeaderSize];
|
||||
|
||||
array[0] = this.FormatFlags;
|
||||
array[1] = NDEFRecord.TypeSize;
|
||||
array[2] = (byte)(Payload.Length + this.PayloadPraefix.Length);
|
||||
array[3] = (byte)this.Type;
|
||||
|
||||
int i = this.HeaderSize;
|
||||
foreach (byte b in payloadAr)
|
||||
{
|
||||
array[i] = b;
|
||||
i++;
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
}
|
||||
}
|
||||
59
CampusAppWP8/CampusAppWPortalLib8/Utility/StringManager.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StringManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>06.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility
|
||||
{
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some special StringMethods
|
||||
/// </summary>
|
||||
public static class StringManager
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Patter for Html-Tags
|
||||
/// </summary>
|
||||
private static readonly string HtmlTagPattern = "<.*?>";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method removes Html-Tag of a String
|
||||
/// </summary>
|
||||
/// <param name="inputString">String with Html-Tags</param>
|
||||
/// <returns>String without Html-Tags</returns>
|
||||
public static string StripHTML(string inputString)
|
||||
{
|
||||
return Regex.Replace(inputString, HtmlTagPattern, string.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method add an Newline to a string
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>input string + newline</returns>
|
||||
public static string AddNewLine(string str)
|
||||
{
|
||||
return str.ToString() + "\n";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method remove(TrimEND!) an Newline to a string
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>input string - newline</returns
|
||||
public static string RemoveNewLine(string str)
|
||||
{
|
||||
return str.TrimEnd('\n');
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
88
CampusAppWP8/CampusAppWPortalLib8/Utility/XmlManager.cs
Normal file
@@ -0,0 +1,88 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="XmlManager.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWPortalLib8.Utility
|
||||
{
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Class provides some Xml-methods
|
||||
/// </summary>
|
||||
public class XmlManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Method deserialization a string to a Model
|
||||
/// </summary>
|
||||
/// <typeparam name="T">the model</typeparam>
|
||||
/// <param name="xmlString">the XmlString</param>
|
||||
/// <param name="validRootName">name of the RootTag</param>
|
||||
/// <returns>return the deserialization of the model</returns>
|
||||
public static T DeserializationToModel<T>(string xmlString, string validRootName)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
XDocument document = XDocument.Parse(xmlString);
|
||||
if (!document.Root.Name.ToString().Equals(validRootName))
|
||||
{
|
||||
XElement content = document.Root;
|
||||
document = new XDocument();
|
||||
document.Add(new XElement(validRootName, content));
|
||||
}
|
||||
|
||||
T model = (T)serializer.Deserialize(document.CreateReader());
|
||||
return model;
|
||||
}
|
||||
|
||||
/// <summary>Deserialization a xml file to a model.</summary>
|
||||
/// <remarks>Stubbfel, 20.08.2013.</remarks>
|
||||
/// <typeparam name="T">Generic type parameter.</typeparam>
|
||||
/// <param name="xmlFilePath">Path to the a XmlFile.</param>
|
||||
/// <returns>model of the XmlFile.</returns>
|
||||
public static T DeserializationFileToModel<T>(string xmlFilePath)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
XDocument document = XDocument.Load(xmlFilePath);
|
||||
T model = (T)serializer.Deserialize(document.CreateReader());
|
||||
return model;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method serializes a model to a string.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">type of the model</typeparam>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>serialized string</returns>
|
||||
public static string SerializationToString<T>(T model)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
|
||||
ns.Add(string.Empty, string.Empty);
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(T));
|
||||
TextWriter writer = new StringWriter();
|
||||
|
||||
serializer.Serialize(writer, model, ns);
|
||||
|
||||
retValue = writer.ToString();
|
||||
|
||||
if (retValue.StartsWith("<?xml") == true)
|
||||
{
|
||||
int endTag = retValue.IndexOf("?>");
|
||||
retValue = retValue.Substring(endTag + 2);
|
||||
|
||||
if (retValue.StartsWith("\r\n") == true)
|
||||
{
|
||||
retValue = retValue.Substring(2);
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
CampusAppWP8/CampussAppWStore8/App.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<Application
|
||||
x:Class="CampussAppWStore8.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:CampussAppWStore8">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<!--
|
||||
Stile, die allgemeine Aspekte von Aussehen und Verhalten der Plattform definieren
|
||||
Erforderlich für Visual Studio-Projekt- und Elementvorlagen
|
||||
-->
|
||||
<ResourceDictionary Source="Common/StandardStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
90
CampusAppWP8/CampussAppWStore8/App.xaml.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
// Die Vorlage "Leere Anwendung" ist unter http://go.microsoft.com/fwlink/?LinkId=234227 dokumentiert.
|
||||
|
||||
namespace CampussAppWStore8
|
||||
{
|
||||
/// <summary>
|
||||
/// Stellt das anwendungsspezifische Verhalten bereit, um die Standardanwendungsklasse zu ergänzen.
|
||||
/// </summary>
|
||||
sealed partial class App : Application
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialisiert das Singletonanwendungsobjekt. Dies ist die erste Zeile von erstelltem Code
|
||||
/// und daher das logische Äquivalent von main() bzw. WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.Suspending += OnSuspending;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn die Anwendung durch den Endbenutzer normal gestartet wird. Weitere Einstiegspunkte
|
||||
/// werden verwendet, wenn die Anwendung zum Öffnen einer bestimmten Datei, zum Anzeigen
|
||||
/// von Suchergebnissen usw. gestartet wird.
|
||||
/// </summary>
|
||||
/// <param name="args">Details über Startanforderung und -prozess.</param>
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||
{
|
||||
Frame rootFrame = Window.Current.Content as Frame;
|
||||
|
||||
// App-Initialisierung nicht wiederholen, wenn das Fenster bereits Inhalte enthält.
|
||||
// Nur sicherstellen, dass das Fenster aktiv ist.
|
||||
if (rootFrame == null)
|
||||
{
|
||||
// Einen Rahmen erstellen, der als Navigationskontext fungiert und zum Parameter der ersten Seite navigieren
|
||||
rootFrame = new Frame();
|
||||
|
||||
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
|
||||
{
|
||||
//TODO: Zustand von zuvor angehaltener Anwendung laden
|
||||
}
|
||||
|
||||
// Den Rahmen im aktuellen Fenster platzieren
|
||||
Window.Current.Content = rootFrame;
|
||||
}
|
||||
|
||||
if (rootFrame.Content == null)
|
||||
{
|
||||
// Wenn der Navigationsstapel nicht wiederhergestellt wird, zur ersten Seite navigieren
|
||||
// und die neue Seite konfigurieren, indem die erforderlichen Informationen als Navigationsparameter
|
||||
// übergeben werden
|
||||
if (!rootFrame.Navigate(typeof(MainPage), args.Arguments))
|
||||
{
|
||||
throw new Exception("Failed to create initial page");
|
||||
}
|
||||
}
|
||||
// Sicherstellen, dass das aktuelle Fenster aktiv ist
|
||||
Window.Current.Activate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wird aufgerufen, wenn die Ausführung der Anwendung angehalten wird. Der Anwendungszustand wird gespeichert,
|
||||
/// ohne zu wissen, ob die Anwendung beendet oder fortgesetzt wird und die Speicherinhalte dabei
|
||||
/// unbeschädigt bleiben.
|
||||
/// </summary>
|
||||
/// <param name="sender">Die Quelle der Anhalteanforderung.</param>
|
||||
/// <param name="e">Details zur Anhalteanforderung.</param>
|
||||
private void OnSuspending(object sender, SuspendingEventArgs e)
|
||||
{
|
||||
var deferral = e.SuspendingOperation.GetDeferral();
|
||||
//TODO: Anwendungszustand speichern und alle Hintergrundaktivitäten beenden
|
||||
deferral.Complete();
|
||||
}
|
||||
}
|
||||
}
|
||||