clear git
@@ -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
|
||||
@@ -1,32 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureApi.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Lecture
|
||||
{
|
||||
using System;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the feed of the Lecture
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need the XmlAPI
|
||||
/// </remarks>
|
||||
public class LectureApi : XmlApi<LectureList>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureApi" /> class.
|
||||
/// </summary>
|
||||
public LectureApi()
|
||||
: base(new Uri(Constants.UrlLecture_ApiBaseAddr))
|
||||
{
|
||||
this.ValidRootName = Constants.LectureXmlValidRootName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
<Application
|
||||
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"
|
||||
x:Class="CampusAppWP8.App"
|
||||
>
|
||||
|
||||
<!--Anwendungsressourcen-->
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="Styles/ListButton.xaml"/>
|
||||
<ResourceDictionary Source="Styles/StartPageStyles.xaml"/>
|
||||
<ResourceDictionary>
|
||||
<local:LocalizedStrings xmlns:local="clr-namespace:CampusAppWP8" x:Key="LocalizedStrings"/>
|
||||
<local:ThemelizedIcons xmlns:local="clr-namespace:CampusAppWP8" x:Key="ThemelizedIcons"/>
|
||||
<local:Const xmlns:local="clr-namespace:CampusAppWP8" x:Key="Const"/>
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
|
||||
<Application.ApplicationLifetimeObjects>
|
||||
<!--Erforderliches Objekt, das Lebensdauerereignisse der Anwendung behandelt-->
|
||||
<shell:PhoneApplicationService
|
||||
Launching="Application_Launching" Closing="Application_Closing"
|
||||
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
|
||||
</Application.ApplicationLifetimeObjects>
|
||||
|
||||
</Application>
|
||||
@@ -1,292 +0,0 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Resources;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
using Microsoft.Phone.Shell;
|
||||
using CampusAppWP8.Resources;
|
||||
using System.IO.IsolatedStorage;
|
||||
|
||||
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Bietet einen einfachen Zugriff auf den Stammframe der Phone-Anwendung.
|
||||
/// </summary>
|
||||
/// <returns>Der Stammframe der Phone-Anwendung.</returns>
|
||||
public static PhoneApplicationFrame RootFrame { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Konstruktor für das Application-Objekt.
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
// Globaler Handler für nicht abgefangene Ausnahmen.
|
||||
UnhandledException += Application_UnhandledException;
|
||||
|
||||
// Standard-XAML-Initialisierung
|
||||
InitializeComponent();
|
||||
|
||||
// Phone-spezifische Initialisierung
|
||||
InitializePhoneApplication();
|
||||
|
||||
// Initialisierung der Sprachanzeige
|
||||
InitializeLanguage();
|
||||
|
||||
// Während des Debuggens Profilerstellungsinformationen zur Grafikleistung anzeigen.
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// Zähler für die aktuelle Bildrate anzeigen
|
||||
Application.Current.Host.Settings.EnableFrameRateCounter = true;
|
||||
|
||||
// Bereiche der Anwendung hervorheben, die mit jedem Bild neu gezeichnet werden.
|
||||
//Application.Current.Host.Settings.EnableRedrawRegions = true;
|
||||
|
||||
// Nicht produktiven Visualisierungsmodus für die Analyse aktivieren,
|
||||
// in dem Bereiche einer Seite angezeigt werden, die mit einer Farbüberlagerung an die GPU übergeben wurden.
|
||||
//Application.Current.Host.Settings.EnableCacheVisualization = true;
|
||||
|
||||
// Verhindert, dass der Bildschirm im Debugger ausgeschaltet wird, indem
|
||||
// die Leerlauferkennung der Anwendung deaktiviert wird.
|
||||
// Vorsicht: Nur im Debugmodus verwenden. Eine Anwendung mit deaktivierter Benutzerleerlauferkennung wird weiterhin ausgeführt
|
||||
// und verbraucht auch dann Akkuenergie, wenn der Benutzer das Handy nicht verwendet.
|
||||
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method save any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
/// <param name="value">value of the object, if value == null => remove key</param>
|
||||
public static void SaveToIsolatedStorage<T>(string key, T value)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
isolatedStore.Remove(key);
|
||||
if (value != null)
|
||||
{
|
||||
isolatedStore.Add(key, value);
|
||||
}
|
||||
|
||||
isolatedStore.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
public static T LoadFromIsolatedStorage<T>(string key)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
|
||||
if(isolatedStore.Contains(key)) {
|
||||
object value = isolatedStore[key];
|
||||
return (T)value;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method save any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
/// <param name="value">value of the object, if value == null => remove key</param>
|
||||
public static void SaveToAppState<T>(string key, T value)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
isolatedStore.Remove(key);
|
||||
if (value != null)
|
||||
{
|
||||
isolatedStore.Add(key, value);
|
||||
}
|
||||
|
||||
isolatedStore.Save();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load any object to the IsolatedStorage
|
||||
/// </summary>
|
||||
/// <param name="key"> key of the object</param>
|
||||
public static T LoadFromAppState<T>(string key)
|
||||
{
|
||||
IsolatedStorageSettings isolatedStore = IsolatedStorageSettings.ApplicationSettings;
|
||||
|
||||
if (isolatedStore.Contains(key))
|
||||
{
|
||||
object value = isolatedStore[key];
|
||||
return (T)value;
|
||||
}
|
||||
return default(T);
|
||||
}
|
||||
// Code, der beim Starten der Anwendung ausgeführt werden soll (z. B. über "Start")
|
||||
// Dieser Code wird beim Reaktivieren der Anwendung nicht ausgeführt
|
||||
private void Application_Launching(object sender, LaunchingEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code, der ausgeführt werden soll, wenn die Anwendung aktiviert wird (in den Vordergrund gebracht wird)
|
||||
// Dieser Code wird beim ersten Starten der Anwendung nicht ausgeführt
|
||||
private void Application_Activated(object sender, ActivatedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Code, der ausgeführt werden soll, wenn die Anwendung deaktiviert wird (in den Hintergrund gebracht wird)
|
||||
// Dieser Code wird beim Schließen der Anwendung nicht ausgeführt
|
||||
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
// Code, der beim Schließen der Anwendung ausgeführt wird (z. B. wenn der Benutzer auf "Zurück" klickt)
|
||||
// Dieser Code wird beim Deaktivieren der Anwendung nicht ausgeführt
|
||||
private void Application_Closing(object sender, ClosingEventArgs e)
|
||||
{
|
||||
// Sicherstellen, dass der erforderliche Anwendungszustand hier beibehalten wird
|
||||
}
|
||||
|
||||
// Code, der bei einem Navigationsfehler ausgeführt wird
|
||||
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// Navigationsfehler. Unterbrechen und Debugger öffnen
|
||||
Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
// Code, der bei nicht behandelten Ausnahmen ausgeführt wird
|
||||
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
// Eine nicht behandelte Ausnahme ist aufgetreten. Unterbrechen und Debugger öffnen
|
||||
Debugger.Break();
|
||||
}
|
||||
}
|
||||
|
||||
#region Initialisierung der Phone-Anwendung
|
||||
|
||||
// Doppelte Initialisierung vermeiden
|
||||
private bool phoneApplicationInitialized = false;
|
||||
|
||||
// Fügen Sie keinen zusätzlichen Code zu dieser Methode hinzu
|
||||
private void InitializePhoneApplication()
|
||||
{
|
||||
if (phoneApplicationInitialized)
|
||||
return;
|
||||
|
||||
// Frame erstellen, aber noch nicht als RootVisual festlegen. Dadurch kann der Begrüßungsbildschirm
|
||||
// aktiv bleiben, bis die Anwendung bereit für das Rendern ist.
|
||||
RootFrame = new PhoneApplicationFrame();
|
||||
RootFrame.Navigated += CompleteInitializePhoneApplication;
|
||||
|
||||
// Navigationsfehler behandeln
|
||||
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
|
||||
|
||||
// Behandeln Sie Rücksetzanforderungen zum Löschen des Backstack
|
||||
RootFrame.Navigated += CheckForResetNavigation;
|
||||
|
||||
// Sicherstellen, dass keine erneute Initialisierung erfolgt
|
||||
phoneApplicationInitialized = true;
|
||||
}
|
||||
|
||||
// Fügen Sie keinen zusätzlichen Code zu dieser Methode hinzu
|
||||
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Visuelle Stammkomponente festlegen, sodass die Anwendung gerendert werden kann
|
||||
if (RootVisual != RootFrame)
|
||||
RootVisual = RootFrame;
|
||||
|
||||
// Dieser Handler wird nicht mehr benötigt und kann entfernt werden
|
||||
RootFrame.Navigated -= CompleteInitializePhoneApplication;
|
||||
}
|
||||
|
||||
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Wenn die App eine 'Reset'-Navigation empfangen hat, müssen wir prüfen
|
||||
// bei der nächsten Navigation, um festzustellen, ob der Seitenstapel zurückgesetzt werden muss
|
||||
if (e.NavigationMode == NavigationMode.Reset)
|
||||
RootFrame.Navigated += ClearBackStackAfterReset;
|
||||
}
|
||||
|
||||
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
|
||||
{
|
||||
// Heben Sie die Registrierung des Ereignisses auf, damit es nicht erneut aufgerufen wird.
|
||||
RootFrame.Navigated -= ClearBackStackAfterReset;
|
||||
|
||||
// Löschen Sie den Stapel nur bei den Navigationen "neu" (vorwärts) und "Aktualisieren"
|
||||
if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
|
||||
return;
|
||||
|
||||
// Löschen Sie zur Sicherstellung der UI-Konsistenz den gesamten Seitenstapel
|
||||
while (RootFrame.RemoveBackEntry() != null)
|
||||
{
|
||||
; // unternehmen Sie nichts
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Initialisieren Sie die Schriftart und Flussrichtung der App wie in den lokalisierten Ressourcenzeichenfolgen angegeben.
|
||||
//
|
||||
// Um sicherzustellen, dass die Schriftart der Anwendung mit den unterstützten Sprachen abgestimmt ist und dass
|
||||
// FlowDirection der einzelnen Sprachen der herkömmlichen Richtung folgt, müssen ResourceLanguage
|
||||
// und ResourceFlowDirection in jeder RESX-Datei initialisiert werden, damit sie den Werten
|
||||
// der Kultur dieser Datei entsprechen. Zum Beispiel:
|
||||
//
|
||||
// AppResources.es-ES.resx
|
||||
// Der Wert von ResourceLanguage muss "es-ES" sein.
|
||||
// Der Wert von ResourceFlowDirection muss "LeftToRight" sein.
|
||||
//
|
||||
// AppResources.ar-SA.resx
|
||||
// Der Wert von ResourceLanguage muss "ar-SA" sein.
|
||||
// Der Wert von ResourceFlowDirection muss "RightToLeft" sein.
|
||||
//
|
||||
// Weitere Informationen über die Lokalisierung von Windows Phone-Apps finden Sie unter http://go.microsoft.com/fwlink/?LinkId=262072.
|
||||
//
|
||||
private void InitializeLanguage()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Legen Sie die Schriftart so fest, dass sie der Anzeigesprache entspricht, die
|
||||
// in der ResourceLanguage-Ressourcenzeichenfolge der einzelnen unterstützten Sprachen definiert ist.
|
||||
//
|
||||
// Greifen Sie auf die Schriftart der neutralen Sprache zurück, wenn die
|
||||
// Anzeigesprache des Telefons nicht unterstützt wird.
|
||||
//
|
||||
// Wenn ein Compilerfehler auftritt, fehlt ResourceLanguage in
|
||||
// der Ressourcendatei.
|
||||
RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
|
||||
|
||||
// Legen Sie FlowDirection aller Elemente im Stammframe fest und zwar auf Grundlage
|
||||
// der ResourceFlowDirection-Ressourcenzeichenfolge der einzelnen
|
||||
// unterstützten Sprachen.
|
||||
//
|
||||
// Wenn ein Compilerfehler auftritt, fehlt ResourceFlowDirection in
|
||||
// der Ressourcendatei.
|
||||
FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
|
||||
RootFrame.FlowDirection = flow;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Tritt hier eine Ausnahme auf, liegt das wahrscheinlich entweder an
|
||||
// ResourceLangauge ist nicht richtig auf eine unterstützte Sprache eingestellt
|
||||
// Code oder ResourceFlowDirection ist auf einen anderen Wert als LeftToRight festgelegt
|
||||
// oder RightToLeft.
|
||||
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
Debugger.Break();
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@@ -1,426 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}</ProjectGuid>
|
||||
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CampusAppWP8</RootNamespace>
|
||||
<AssemblyName>CampusAppWP8</AssemblyName>
|
||||
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
|
||||
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
|
||||
<SilverlightApplication>true</SilverlightApplication>
|
||||
<SupportedCultures>
|
||||
</SupportedCultures>
|
||||
<XapOutputs>true</XapOutputs>
|
||||
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
|
||||
<XapFilename>CampusAppWP8_$(Configuration)_$(Platform).xap</XapFilename>
|
||||
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
|
||||
<SilverlightAppEntry>CampusAppWP8.App</SilverlightAppEntry>
|
||||
<ValidateXaml>true</ValidateXaml>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
|
||||
<ExpressionBlendVersion>5.0.40218.0</ExpressionBlendVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\x86\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\x86\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Bin\ARM\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Bin\ARM\Release</OutputPath>
|
||||
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Departments\DepartmentFavoriteFeed.cs" />
|
||||
<Compile Include="Const.cs" />
|
||||
<Compile Include="Utility\Lui\Button\EmailButton.cs" />
|
||||
<Compile Include="Feed\Link\CommonLinkFeed.cs" />
|
||||
<Compile Include="Feed\Link\ClubLinkFeed.cs" />
|
||||
<Compile Include="Feed\Openinghours\OpeninghoursFeed.cs" />
|
||||
<Compile Include="Feed\StudentCouncil\StudentCouncilFeed.cs" />
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Model\Campusmap\MapModel.cs" />
|
||||
<Compile Include="Model\Campusmap\MapPinModel.cs" />
|
||||
<Compile Include="Model\Departments\ChairModel.cs" />
|
||||
<Compile Include="Model\Departments\DepartmentModel.cs" />
|
||||
<Compile Include="Model\Departments\FacultyModel.cs" />
|
||||
<Compile Include="Model\RSS\RSSChannelModel.cs" />
|
||||
<Compile Include="Model\RSS\RSSViewModel.cs" />
|
||||
<Compile Include="Model\Lecture\LectureActivity.cs" />
|
||||
<Compile Include="Model\Lecture\LectureCourse.cs" />
|
||||
<Compile Include="Model\Lecture\LectureDate.cs" />
|
||||
<Compile Include="Model\Lecture\LectureLecturer.cs" />
|
||||
<Compile Include="Model\Lecture\LectureList.cs" />
|
||||
<Compile Include="Model\Lecture\LectureModule.cs" />
|
||||
<Compile Include="Model\Lecture\LecturePageModel.cs" />
|
||||
<Compile Include="Model\MainModel.cs" />
|
||||
<Compile Include="Model\Link\LinkModel.cs" />
|
||||
<Compile Include="Model\Link\LinkListModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuModel.cs" />
|
||||
<Compile Include="Model\Mensa\MenuWeekModel.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursInstitutionModel.cs" />
|
||||
<Compile Include="Model\Openinghours\OpeninghoursModel.cs" />
|
||||
<Compile Include="Model\StudentCouncil\StudentCouncilListModel.cs" />
|
||||
<Compile Include="Model\StudentCouncil\StudentCouncilModel.cs" />
|
||||
<Compile Include="Model\Utility\UrlParamModel.cs" />
|
||||
<Compile Include="Model\XmlModel.cs" />
|
||||
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
|
||||
<DependentUpon>CampusMapPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Api\Lecture\LectureApi.cs" />
|
||||
<Compile Include="Feed\Departments\DepartmentFeed.cs" />
|
||||
<Compile Include="Pages\Departments\DepartmentFavoritePage.xaml.cs">
|
||||
<DependentUpon>DepartmentFavoritePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Departments\DepartmentIndexPage.xaml.cs">
|
||||
<DependentUpon>DepartmentIndexPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Departments\DepartmentInfoPage.xaml.cs">
|
||||
<DependentUpon>DepartmentInfoPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Departments\DepartmentPage.xaml.cs">
|
||||
<DependentUpon>DepartmentPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Events\EventFeed.cs" />
|
||||
<Compile Include="Pages\Events\EventIndexPage.xaml.cs">
|
||||
<DependentUpon>EventIndexPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Events\EventPage.xaml.cs">
|
||||
<DependentUpon>EventPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Lecture\LecturePage.xaml.cs">
|
||||
<DependentUpon>LecturePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\Mensa\MensaFeed.cs" />
|
||||
<Compile Include="Pages\Lecture\ModulWebPage.xaml.cs">
|
||||
<DependentUpon>ModulWebPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Utility\ListPickerItemModel.cs" />
|
||||
<Compile Include="Pages\Lecture\ResultDetailPage.xaml.cs">
|
||||
<DependentUpon>ResultDetailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Lecture\ResultPage.xaml.cs">
|
||||
<DependentUpon>ResultPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Links\LinkPage.xaml.cs">
|
||||
<DependentUpon>LinkPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Mensa\MensaPage.xaml.cs">
|
||||
<DependentUpon>MensaPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Feed\News\NewsFeed.cs" />
|
||||
<Compile Include="Pages\News\NewsIndexPage.xaml.cs">
|
||||
<DependentUpon>NewsIndexPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\News\NewsPage.xaml.cs">
|
||||
<DependentUpon>NewsPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\RSS\RSSModel.cs" />
|
||||
<Compile Include="Pages\Openinghours\OpeninghoursPage.xaml.cs">
|
||||
<DependentUpon>OpeninghoursPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\StartPage.xaml.cs">
|
||||
<DependentUpon>StartPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\StudentCouncil\StudentCouncilPage.xaml.cs">
|
||||
<DependentUpon>StudentCouncilPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Pages\Webmail\WebmailPage.xaml.cs">
|
||||
<DependentUpon>WebmailPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\AppResources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>AppResources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Constants.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Constants.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Resources\Icons.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Icons.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ThemelizedIcons.cs" />
|
||||
<Compile Include="Utility\Api.cs" />
|
||||
<Compile Include="Utility\ApiEventHandler.cs" />
|
||||
<Compile Include="Utility\File.cs" />
|
||||
<Compile Include="Utility\Logger.cs" />
|
||||
<Compile Include="Utility\HttpRequest.cs" />
|
||||
<Compile Include="Utility\Lui\Button\GoToMapButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\ToggleButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\NavigateButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\PhoneButton.cs" />
|
||||
<Compile Include="Utility\Lui\Button\LinkButton.cs" />
|
||||
<Compile Include="Utility\StringManager.cs" />
|
||||
<Compile Include="Utility\Utilities.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Utility\XmlApi.cs" />
|
||||
<Compile Include="Utility\XmlManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="Pages\Campusmap\CampusMapPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Departments\DepartmentFavoritePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Departments\DepartmentIndexPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Departments\DepartmentInfoPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Departments\DepartmentPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\LecturePage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ModulWebPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ResultDetailPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Lecture\ResultPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Events\EventIndexPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Events\EventPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\Links\LinkPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Mensa\MensaPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Pages\News\NewsIndexPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\News\NewsPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Openinghours\OpeninghoursPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="pages\StartPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\StudentCouncil\StudentCouncilPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Pages\Webmail\WebmailPage.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\StartPageStyles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ListButton.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\psd\holo_optionsbuttons.psd" />
|
||||
<None Include="Assets\psd\iconbutton_effects2.psd" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\AppManifest.xml" />
|
||||
<None Include="Properties\WMAppManifest.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Assets\AlignmentGrid.png" />
|
||||
<Content Include="Assets\ApplicationIcon.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<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\delete_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\favorite_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\info_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\phone_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\delete_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\departments_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\homework_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" />
|
||||
<Content Include="Assets\Icons\LightTheme\info_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\link_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\lectures_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\mensa_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\mensa_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\news_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\news_159.png" />
|
||||
<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\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\student_council_159.png" />
|
||||
<Content Include="Assets\Icons\DarkTheme\webmail_159.png" />
|
||||
<Content Include="Assets\Icons\LightTheme\webmail_159.png" />
|
||||
<Content Include="Assets\testmap.png" />
|
||||
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Assets\Tiles\IconicTileSmall.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="README_FIRST.txt" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Cancel.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Check.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Delete.png" />
|
||||
<Content Include="Toolkit.Content\ApplicationBar.Select.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\AppResources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Constants.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Constants.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Icons.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Phone.Controls.Toolkit">
|
||||
<HintPath>..\packages\WPtoolkit.4.2012.10.30\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<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.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ProjectExtensions />
|
||||
</Project>
|
||||
@@ -1,33 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="Const.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>08.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Access to Constants.rex
|
||||
/// </summary>
|
||||
public class Const
|
||||
{
|
||||
/// <summary>
|
||||
/// Resource object.
|
||||
/// </summary>
|
||||
private static Constants constantResources = new Constants();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the resource object.
|
||||
/// </summary>
|
||||
public Constants Constants
|
||||
{
|
||||
get
|
||||
{
|
||||
return constantResources;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentFavoriteFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>01.07.2013</sience>
|
||||
//----------------------------------------------------------------------using System;
|
||||
namespace CampusAppWP8.Feed.Departments
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Departments;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Feed object to handle favorite department feeds.
|
||||
/// </summary>
|
||||
public class DepartmentFavoriteFeed : XmlModel<DepartmentModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentFavoriteFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
public DepartmentFavoriteFeed(bool autoLoad = true)
|
||||
: base(ModelType.File, Constants.FileDepartment_Favorite_Name, string.Empty)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
|
||||
if (autoLoad == true)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
// Constructor
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(DepartmentModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if ((model == null)
|
||||
|| (model.Faculties == null)
|
||||
|| (model.Faculties.Count != 1))
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
if (this.Model == null)
|
||||
{
|
||||
retValue = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = (model.HasChanged() == false) ? true : false;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
// Protected
|
||||
#endregion
|
||||
|
||||
// Method
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Departments
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Departments;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Feed class for the department information.
|
||||
/// </summary>
|
||||
public class DepartmentFeed : XmlModel<DepartmentModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
public DepartmentFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileDepartment_Name, Constants.UrlDepartment_Addr)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
|
||||
if (autoLoad == true)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
// Constructor
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Protected
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(DepartmentModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 7.0);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(DepartmentModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
// at loading
|
||||
if (info.Exists == true)
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 7.0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// at saving
|
||||
if ((info.Exists == false)
|
||||
|| (info.Length == 0))
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
// Protedted
|
||||
#endregion
|
||||
|
||||
// Method
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="EventFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Events
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.RSS;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Event Feed.
|
||||
/// </summary>
|
||||
public class EventFeed : XmlModel<RSSViewModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
public EventFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileEvents_Name, Constants.UrlEvents_Addr)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
|
||||
if (autoLoad == true)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(RSSViewModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">file info object</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
// at loading
|
||||
if (info.Exists == true)
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// at saving
|
||||
if ((info.Exists == false)
|
||||
|| (info.Length == 0))
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ClubLinkFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Link
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Link;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for ClubLinkFeeds
|
||||
/// </summary>
|
||||
public class ClubLinkFeed : XmlModel<LinkListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClubLinkFeed" /> class.
|
||||
/// </summary>
|
||||
public ClubLinkFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileLink_ClubLinks, Constants.UrlLink_ClubLinks)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(LinkListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DateTime lastModified = model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
DateTime lastModified = fileInfo.LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
DateTime temp = lastModified.AddDays(1);
|
||||
|
||||
int diff = temp.CompareTo(DateTime.Now);
|
||||
|
||||
if (diff < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="CommonLinkFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Link
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Link;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for CommonLinkFeeds
|
||||
/// </summary>
|
||||
public class CommonLinkFeed : XmlModel<LinkListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CommonLinkFeed" /> class.
|
||||
/// </summary>
|
||||
public CommonLinkFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileLink_CommonLinks, Constants.UrlLink_CommonLinks)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(LinkListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DateTime lastModified = model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(LinkListModel model, FileInfo fileInfo)
|
||||
{
|
||||
DateTime lastModified = fileInfo.LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
DateTime temp = lastModified.AddDays(1);
|
||||
|
||||
int diff = temp.CompareTo(DateTime.Now);
|
||||
|
||||
if (diff < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MensaFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Mensa
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Mensa;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MensaFeeds
|
||||
/// </summary>
|
||||
public class MensaFeed : XmlModel<MenuWeekModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MensaFeed" /> class.
|
||||
/// </summary>
|
||||
public MensaFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileMensa_Shedule, Constants.UrlMensa_Week)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(MenuWeekModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DateTime lastModified = model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(MenuWeekModel model, FileInfo fileInfo)
|
||||
{
|
||||
DateTime lastModified = fileInfo.LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the last modification was later as the NewMenuWeekDay
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
int diff = lastModified.CompareTo(MenuWeekModel.CalcFirstWeekDay());
|
||||
|
||||
if (diff < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="NewsFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.News
|
||||
{
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.RSS;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// News Feed.
|
||||
/// </summary>
|
||||
public class NewsFeed : XmlModel<RSSViewModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NewsFeed" /> class.
|
||||
/// </summary>
|
||||
/// <param name="autoLoad">automatic loading of the data</param>
|
||||
public NewsFeed(bool autoLoad = true)
|
||||
: base(ModelType.FileAndFeed, Constants.FileNews_Name, Constants.UrlNews_Addr)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
|
||||
if (autoLoad == true)
|
||||
{
|
||||
this.LoadData();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsModelUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(RSSViewModel model)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, model.CreateTime, 1.0);
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method implement CheckIsFileUpToDate()-Method <see cref="Pages"/>
|
||||
/// </summary>
|
||||
/// <param name="model">model object</param>
|
||||
/// <param name="info">info object of the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(RSSViewModel model, FileInfo info)
|
||||
{
|
||||
bool retValue = true;
|
||||
|
||||
if (model == null)
|
||||
{
|
||||
// at loading
|
||||
if (info.Exists == true)
|
||||
{
|
||||
retValue = Utilities.DayDifference(Utilities.DifferenceType.Less, info.LastWriteTime, 1.0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// at saving
|
||||
if ((info.Exists == false)
|
||||
|| (info.Length == 0))
|
||||
{
|
||||
retValue = false;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.Openinghours;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for MesaFeeds
|
||||
/// </summary>
|
||||
public class OpeninghoursFeed : XmlModel<OpeninghoursModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursFeed" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileOpeningHours_OpeningHours, Constants.UrlOpeningHours_OpeningHours)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(OpeninghoursModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DateTime lastModified = model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(OpeninghoursModel model, FileInfo fileInfo)
|
||||
{
|
||||
DateTime lastModified = fileInfo.LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilFeed.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Feed.StudentCouncil
|
||||
{
|
||||
using System;
|
||||
using System.IO;
|
||||
using CampusAppWP8.Model;
|
||||
using CampusAppWP8.Model.StudentCouncil;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// This Class is for StudentCouncilFeed
|
||||
/// </summary>
|
||||
public class StudentCouncilFeed : XmlModel<StudentCouncilListModel>
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilFeed" /> class.
|
||||
/// </summary>
|
||||
public StudentCouncilFeed()
|
||||
: base(ModelType.FileAndFeed, Constants.FileStudentCouncil_StudentCouncils, Constants.UrlStudentCouncil_StudentCouncils)
|
||||
{
|
||||
this.isFileUpToDate += new IsFileUpToDate(this.CheckIsFileUpToDate);
|
||||
this.isModelUpToDate += new IsModelUpToDate(this.CheckIsModelUpToDate);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#region Private
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedModel is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <returns>true, if model is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsModelUpToDate(StudentCouncilListModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
DateTime lastModified = model.CreateTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the FeedFile is up-to-date
|
||||
/// </summary>
|
||||
/// <param name="model">reference of the FeedModel</param>
|
||||
/// <param name="fileInfo">info about the file</param>
|
||||
/// <returns>true, if file is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsFileUpToDate(StudentCouncilListModel model, FileInfo fileInfo)
|
||||
{
|
||||
DateTime lastModified = fileInfo.LastWriteTime;
|
||||
return this.CheckIsUpToDate(lastModified);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the model or file is up-to-date.
|
||||
/// </summary>
|
||||
/// <param name="lastModified">Date of the last modification</param>
|
||||
/// <returns>true, if is up-to-date, otherwise false</returns>
|
||||
private bool CheckIsUpToDate(DateTime lastModified)
|
||||
{
|
||||
DateTime temp = lastModified.AddDays(1);
|
||||
|
||||
int diff = temp.CompareTo(DateTime.Now);
|
||||
|
||||
if (diff < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
namespace CampusAppWP8
|
||||
{
|
||||
/// <summary>
|
||||
/// Bietet Zugriff auf Zeichenfolgenressourcen.
|
||||
/// </summary>
|
||||
public class LocalizedStrings
|
||||
{
|
||||
private static AppResources _localizedResources = new AppResources();
|
||||
|
||||
public AppResources LocalizedResources { get { return _localizedResources; } }
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
/// <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()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageSource of the map
|
||||
/// </summary>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageWidth of the map
|
||||
/// </summary>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageHeight of the map
|
||||
/// </summary>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetX of the map
|
||||
/// </summary>
|
||||
public double MapImageOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetY of the map
|
||||
/// </summary>
|
||||
public double MapImageOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GeoOffsetX of the map
|
||||
/// </summary>
|
||||
public double GeoOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the GeoOffsetY of the map
|
||||
/// </summary>
|
||||
public double GeoOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Scale (to pixel) of the map
|
||||
/// </summary>
|
||||
public double Scale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the reference point
|
||||
/// </summary>
|
||||
public Point RefPoint { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the coordinates of ScrollToOffsets point
|
||||
/// </summary>
|
||||
/// <param name="point">input point</param>
|
||||
/// <returns>point (in pixel)</returns>
|
||||
public Point GetScrollPoint(Point point)
|
||||
{
|
||||
return this.GetScrollPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method calculate the coordinates of ScrollToOffsets point
|
||||
/// </summary>
|
||||
/// <remarks>the input-point will be shown in the center</remarks>
|
||||
/// <param name="x">x - coordinate</param>
|
||||
/// <param name="y">y - coordinate</param>
|
||||
/// <returns>point (in pixel)</returns>
|
||||
public Point GetScrollPoint(double x, double y)
|
||||
{
|
||||
x = this.RefPoint.X + this.MapImageOffsetX + x;
|
||||
y = this.RefPoint.Y + this.MapImageOffsetY - y;
|
||||
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)
|
||||
{
|
||||
Point position = new Point(x, y);
|
||||
return this.AddPin(position);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
{
|
||||
Point position = new Point(this.RefPoint.X + x, this.RefPoint.Y - y);
|
||||
return this.AddPin(position);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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)
|
||||
{
|
||||
return this.AddPinFromRefPoint(position.X, position.Y);
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
MapPinModel pin = new MapPinModel() { Position = position };
|
||||
Image pinImg = new Image() { Source = new BitmapImage(new Uri(pin.ImageSource, UriKind.Relative)), Width = pin.ImageWidth };
|
||||
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>
|
||||
public Point ConverToPixelPoint(double x, double y)
|
||||
{
|
||||
return new Point { X = this.Scale * x, Y = this.Scale * y };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a coordinates to coordinates which address pixels
|
||||
/// </summary>
|
||||
/// <param name="point">not scaled point</param>
|
||||
/// <returns>Point in pixel-size</returns>
|
||||
public Point ConverToPixelPoint(Point point)
|
||||
{
|
||||
return this.ConverToPixelPoint(point.X, point.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="MapPinModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Campusmap
|
||||
{
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// This Class manage the properties of a MapPin
|
||||
/// </summary>
|
||||
public class MapPinModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the actual position of the pin
|
||||
/// </summary>
|
||||
private Point position;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MapPinModel" /> class.
|
||||
/// </summary>
|
||||
public MapPinModel()
|
||||
{
|
||||
this.ImageSource = "/Assets/icons/search_159_light.png";
|
||||
this.ImageWidth = 60;
|
||||
this.ImageHeight = 60;
|
||||
this.PinImageOffsetX = -24;
|
||||
this.PinImageOffsetY = -24;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageSource of the pin
|
||||
/// </summary>
|
||||
public string ImageSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageWidth of the pin
|
||||
/// </summary>
|
||||
public double ImageWidth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageHeight of the pin
|
||||
/// </summary>
|
||||
public double ImageHeight { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetX of the pin
|
||||
/// </summary>
|
||||
public double PinImageOffsetX { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ImageOffsetY of the pin
|
||||
/// </summary>
|
||||
public double PinImageOffsetY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets position of the pin
|
||||
/// </summary>
|
||||
public Point Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.position;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
// null assert
|
||||
if (value == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.position == null)
|
||||
{
|
||||
this.position = value;
|
||||
return;
|
||||
}
|
||||
|
||||
// check the x-value
|
||||
if (value.X + this.PinImageOffsetX != this.position.X)
|
||||
{
|
||||
this.position.X = value.X + this.PinImageOffsetX;
|
||||
}
|
||||
|
||||
// check the y-value
|
||||
if (value.Y + this.PinImageOffsetY != this.position.Y)
|
||||
{
|
||||
this.position.Y = value.Y + this.PinImageOffsetY;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ChairModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Class to hold information about a professorship chair.
|
||||
/// </summary>
|
||||
public class ChairModel
|
||||
{
|
||||
/// <summary>
|
||||
/// German name of the chair.
|
||||
/// </summary>
|
||||
private string nameDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Link to the chair page.
|
||||
/// </summary>
|
||||
private string url = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English name of the chair.
|
||||
/// </summary>
|
||||
private string nameEN = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChairModel" /> class.
|
||||
/// </summary>
|
||||
public ChairModel()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChairModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the chair</param>
|
||||
public ChairModel(string name)
|
||||
{
|
||||
this.nameDE = name;
|
||||
this.nameEN = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german name of the chair.
|
||||
/// </summary>
|
||||
[XmlAttribute("name_de")]
|
||||
public string NameDE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nameDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.nameDE)
|
||||
{
|
||||
this.nameDE = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english name of the chair.
|
||||
/// </summary>
|
||||
[XmlAttribute("name_en")]
|
||||
public string NameEN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.nameEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.nameEN)
|
||||
{
|
||||
this.nameEN = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the url of the chair homepage.
|
||||
/// </summary>
|
||||
[XmlAttribute("url")]
|
||||
public string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.url)
|
||||
{
|
||||
this.url = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized name of the chair.
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.NameDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.NameEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// View model for department page.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class DepartmentModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Object to store the time when the instance was created.
|
||||
/// </summary>
|
||||
private DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// List of faculties.
|
||||
/// </summary>
|
||||
private ObservableCollection<FacultyModel> faculties;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentModel" /> class.
|
||||
/// </summary>
|
||||
public DepartmentModel()
|
||||
{
|
||||
this.Faculties = new ObservableCollection<FacultyModel>();
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the faculty list.
|
||||
/// </summary>
|
||||
[XmlArray("professorships")]
|
||||
[XmlArrayItem("faculty")]
|
||||
public ObservableCollection<FacultyModel> Faculties
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.faculties;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.faculties)
|
||||
{
|
||||
this.faculties = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time.
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the content of the faculty lists hast changed since the
|
||||
/// last call of this function.
|
||||
/// </summary>
|
||||
/// <returns>true, if changes happend since last request, otherwise false</returns>
|
||||
public bool HasChanged()
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
foreach (FacultyModel temp in this.Faculties)
|
||||
{
|
||||
if ((temp.HasChanged() == true) && (retValue == false))
|
||||
{
|
||||
retValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,238 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="FacultyModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Departments
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for holding the faculty information.
|
||||
/// </summary>
|
||||
public class FacultyModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Object to hold the information of the chair containing to this
|
||||
/// faculty.
|
||||
/// </summary>
|
||||
private ObservableCollection<ChairModel> chairs;
|
||||
|
||||
/// <summary>
|
||||
/// Name of the faculty.
|
||||
/// </summary>
|
||||
private string name = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// For checking of change.
|
||||
/// </summary>
|
||||
private bool hasChanged = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
|
||||
/// </summary>
|
||||
public FacultyModel()
|
||||
{
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FacultyModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the faculty</param>
|
||||
public FacultyModel(string name)
|
||||
{
|
||||
this.name = name;
|
||||
this.chairs = new ObservableCollection<ChairModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of the chairs containing to this faculty.
|
||||
/// </summary>
|
||||
[XmlElement("chair")]
|
||||
public ObservableCollection<ChairModel> Chairs
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.chairs;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.chairs)
|
||||
{
|
||||
this.chairs = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the faculty.
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppResources.Faculty + " " + this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the faculty.
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.name = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove a chair model from the lost.
|
||||
/// </summary>
|
||||
/// <param name="chairName">name of the chair</param>
|
||||
/// <returns>true, if succeeded</returns>
|
||||
public bool RemoveChair(string chairName)
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
ChairModel tempChair = null;
|
||||
|
||||
foreach (ChairModel temp in this.Chairs)
|
||||
{
|
||||
if (temp.Name.Equals(chairName) == true)
|
||||
{
|
||||
tempChair = temp;
|
||||
}
|
||||
}
|
||||
|
||||
if (tempChair != null)
|
||||
{
|
||||
retValue = this.Chairs.Remove(tempChair);
|
||||
this.hasChanged = true;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a chair to the list, if it does not already exist.
|
||||
/// </summary>
|
||||
/// <param name="chairModel">chair model to add</param>
|
||||
/// <returns>true, is succeeded</returns>
|
||||
public bool AddChair(ChairModel chairModel)
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
if ((chairModel != null)
|
||||
&& (this.Chairs.Contains(chairModel) == false))
|
||||
{
|
||||
bool isIn = false;
|
||||
|
||||
foreach (ChairModel temp in this.Chairs)
|
||||
{
|
||||
if ((temp.NameDE.Equals(chairModel.NameDE) == true)
|
||||
|| (temp.NameEN.Equals(chairModel.NameEN) == true))
|
||||
{
|
||||
isIn = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isIn == false)
|
||||
{
|
||||
this.Chairs.Add(chairModel);
|
||||
this.hasChanged = true;
|
||||
retValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a chair model and add it to the list, if it does not already
|
||||
/// exist.
|
||||
/// </summary>
|
||||
/// <param name="nameDE">german name of the chair</param>
|
||||
/// <param name="nameEN">english name of the chair</param>
|
||||
/// <param name="url">url of the chair home page</param>
|
||||
/// <returns>true, if succeeded</returns>
|
||||
public bool AddChair(string nameDE, string nameEN, string url)
|
||||
{
|
||||
bool retValue = false;
|
||||
|
||||
bool isIn = false;
|
||||
|
||||
foreach (ChairModel temp in this.Chairs)
|
||||
{
|
||||
if ((temp.NameDE.Equals(nameDE) == true)
|
||||
|| (temp.NameEN.Equals(nameEN) == true))
|
||||
{
|
||||
isIn = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isIn == false)
|
||||
{
|
||||
ChairModel newModel = new ChairModel();
|
||||
newModel.NameDE = nameDE;
|
||||
newModel.NameEN = nameEN;
|
||||
newModel.Url = url;
|
||||
|
||||
this.Chairs.Add(newModel);
|
||||
this.hasChanged = true;
|
||||
retValue = true;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the chair model of the chair with the specified name.
|
||||
/// </summary>
|
||||
/// <param name="name">name of the chair</param>
|
||||
/// <returns>chair model, if succeeded, otherwise null</returns>
|
||||
public ChairModel GetChairModel(string name)
|
||||
{
|
||||
ChairModel retValue = null;
|
||||
|
||||
foreach (ChairModel temp in this.Chairs)
|
||||
{
|
||||
if (temp.Name.Equals(name) == true)
|
||||
{
|
||||
retValue = temp;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if there were changes in the chair list, otherwise false.
|
||||
/// </summary>
|
||||
/// <param name="reset">when true, the hasChanged flag will be reseted</param>
|
||||
/// <returns>true, when changed, otherwise false</returns>
|
||||
public bool HasChanged(bool reset = true)
|
||||
{
|
||||
bool retValue = this.hasChanged;
|
||||
|
||||
if (reset == true)
|
||||
{
|
||||
this.hasChanged = false;
|
||||
}
|
||||
|
||||
return retValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
using CampusAppWP8.Model;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.events_news
|
||||
{
|
||||
/// <summary>
|
||||
/// Channel Model, which contains the rss feed item list.
|
||||
/// </summary>
|
||||
public class RSSChannelModel : BaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// RssFeed information item list.
|
||||
/// </summary>
|
||||
[XmlElement("item")]
|
||||
public ObservableCollection<RSSModel> item { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor.
|
||||
/// </summary>
|
||||
public RSSChannelModel()
|
||||
{
|
||||
this.item = new ObservableCollection<RSSModel>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the rss feed item list.
|
||||
/// </summary>
|
||||
public ObservableCollection<RSSModel> Item
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.item;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != this.item)
|
||||
{
|
||||
this.item = value;
|
||||
int i = 0;
|
||||
foreach (RSSModel rssItem in this.item)
|
||||
{
|
||||
rssItem.Index = i++;
|
||||
}
|
||||
NotifyPropertyChanged("item");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
using CampusAppWP8.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace CampusAppWP8.Model.events_news
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the rss feed informations.
|
||||
/// </summary>
|
||||
public class RSSModel : BaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Title of the fees
|
||||
/// </summary>
|
||||
private string title;
|
||||
/// <summary>
|
||||
/// Description text of the feed.
|
||||
/// </summary>
|
||||
private string text;
|
||||
/// <summary>
|
||||
/// Timestamp (publication date) of the event or news.
|
||||
/// </summary>
|
||||
private DateTime timestamp;
|
||||
/// <summary>
|
||||
/// Url of the feed.
|
||||
/// </summary>
|
||||
private string link;
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the title of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("title")]
|
||||
public string Title
|
||||
{
|
||||
get { return this.title; }
|
||||
set
|
||||
{
|
||||
if (this.title != value)
|
||||
{
|
||||
this.title = value;
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the text of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("description")]
|
||||
public string Text
|
||||
{
|
||||
get { return this.text; }
|
||||
set
|
||||
{
|
||||
if (this.text != HTMLUnicodeToString(value))
|
||||
{
|
||||
this.text = HTMLUnicodeToString(value);
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the timestamp of the feed as string.
|
||||
/// </summary>
|
||||
[XmlElement("pubDate")]
|
||||
public string Timestamp
|
||||
{
|
||||
get { return this.timestamp.ToString("R"); }
|
||||
set
|
||||
{
|
||||
if (this.timestamp != DateTime.Parse(value))
|
||||
{
|
||||
this.timestamp = DateTime.Parse(value);
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the timestamp of the feed as DateTime object.
|
||||
/// </summary>
|
||||
public DateTime DTTimestamp
|
||||
{
|
||||
get { return this.timestamp; }
|
||||
set { this.timestamp = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the date of the timestamp as string.
|
||||
/// example: Mon, 25.06.2013.
|
||||
/// </summary>
|
||||
public string Date
|
||||
{
|
||||
get { return String.Format("{0:ddd, dd.MM.yyyy}", this.timestamp); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the time of the timestamp as string.
|
||||
/// example: 12:56 Uhr.
|
||||
/// </summary>
|
||||
public string Time
|
||||
{
|
||||
get { return String.Format("{0:h:mm} Uhr", this.timestamp); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ListIndex
|
||||
/// </summary>
|
||||
public int Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set/Get the link/url of the feed.
|
||||
/// </summary>
|
||||
[XmlElement("link")]
|
||||
public string Link
|
||||
{
|
||||
get { return this.link; }
|
||||
set
|
||||
{
|
||||
if (this.link != value)
|
||||
{
|
||||
this.link = value;
|
||||
NotifyPropertyChanged("rss");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove or transform html-unicode specific tags into ascii.
|
||||
/// </summary>
|
||||
/// <param name="htmluni">html string</param>
|
||||
/// <returns>ascii string</returns>
|
||||
private string HTMLUnicodeToString(string htmluni)
|
||||
{
|
||||
StringBuilder retValue = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < htmluni.Length; i++)
|
||||
{
|
||||
switch (htmluni[i])
|
||||
{
|
||||
// beginning tag of the unicode
|
||||
case '&':
|
||||
{
|
||||
int startOff = i + 2;
|
||||
// sear closing tag of the unicode
|
||||
int endOff = htmluni.IndexOf(';', startOff);
|
||||
// get and parse value inbetween
|
||||
string sub = htmluni.Substring(startOff, endOff - startOff);
|
||||
int cVal = int.Parse(sub);
|
||||
|
||||
switch (cVal)
|
||||
{
|
||||
// if the unicode value is 128 (€)
|
||||
case 128:
|
||||
retValue.Append('€');
|
||||
break;
|
||||
|
||||
default:
|
||||
retValue.Append((char)cVal);
|
||||
break;
|
||||
}
|
||||
|
||||
// set the current index to the end of the unicode tag
|
||||
i = endOff;
|
||||
}
|
||||
break;
|
||||
case '<':
|
||||
{
|
||||
// ignoring <..> html tags
|
||||
i = htmluni.IndexOf('>', i);
|
||||
}
|
||||
break;
|
||||
case '\t':
|
||||
// removing tabs
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
// adding other characters to the return string
|
||||
retValue.Append(htmluni[i]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return retValue.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comparing function for Datetime-Timestamps.
|
||||
/// (currently unused)
|
||||
/// </summary>
|
||||
/// <param name="item1">first item</param>
|
||||
/// <param name="item2">secound item</param>
|
||||
/// <returns></returns>
|
||||
public static int CompareTimeStamp(RSSModel item1, RSSModel item2)
|
||||
{
|
||||
if (item1.DTTimestamp > item2.DTTimestamp)
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,221 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureActivity.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Utility;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a Activity
|
||||
/// </summary>
|
||||
public class LectureActivity
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// List of lecturer
|
||||
/// </summary>
|
||||
private ObservableCollection<LectureLecturer> lecturer;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the lecturers
|
||||
/// </summary>
|
||||
private string lecturerString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the names of the courses
|
||||
/// </summary>
|
||||
private string courseString;
|
||||
|
||||
/// <summary>
|
||||
/// a formatted string for the topic of the lecture
|
||||
/// </summary>
|
||||
private string topic;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureActivity" /> class.
|
||||
/// </summary>
|
||||
public LectureActivity()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the activity
|
||||
/// </summary>
|
||||
[XmlElement("art")]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the id of the activity
|
||||
/// </summary>
|
||||
[XmlAttribute("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets semester of the activity
|
||||
/// </summary>
|
||||
[XmlElement("semester")]
|
||||
public int Semester { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contact hour
|
||||
/// </summary>
|
||||
[XmlElement("sws")]
|
||||
public string SWS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureModule
|
||||
/// </summary>
|
||||
[XmlElement("modul")]
|
||||
public LectureModule Modul { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets LectureTitel
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the lecturers
|
||||
/// </summary>
|
||||
[XmlElement("lehrperson")]
|
||||
public ObservableCollection<LectureLecturer> Lecturer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lecturer;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.lecturer)
|
||||
{
|
||||
this.lecturer = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the formatted string of the lecturers
|
||||
/// </summary>
|
||||
public string LecturerString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.lecturerString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.lecturerString)
|
||||
{
|
||||
this.lecturerString = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets formatted string of the courses
|
||||
/// </summary>
|
||||
public string CourseString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.courseString;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.courseString)
|
||||
{
|
||||
this.courseString = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the courses
|
||||
/// </summary>
|
||||
[XmlElement("studiengang")]
|
||||
public ObservableCollection<LectureCourse> Course { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the dates of the activity
|
||||
/// </summary>
|
||||
[XmlElement("termin")]
|
||||
public ObservableCollection<LectureDate> Dates { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Department
|
||||
/// </summary>
|
||||
[XmlElement("zugeordnete_einrichtung")]
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the topic of the Lecture
|
||||
/// </summary>
|
||||
[XmlElement("lehrinhalt")]
|
||||
public string Topic
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.topic;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.topic)
|
||||
{
|
||||
this.topic = StringManager.StripHTML(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the LecturerList
|
||||
/// </summary>
|
||||
public void CreateLectureString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (LectureLecturer tmpLecturer in this.Lecturer)
|
||||
{
|
||||
result += StringManager.AddNewLine(tmpLecturer.ToString());
|
||||
}
|
||||
|
||||
this.LecturerString = StringManager.RemvoveNewLine(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method create a formatted string of the CourseList
|
||||
/// </summary>
|
||||
public void CreateCourseString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
foreach (LectureCourse course in this.Course)
|
||||
{
|
||||
result += StringManager.AddNewLine(course.Title);
|
||||
}
|
||||
|
||||
this.CourseString = StringManager.RemvoveNewLine(result);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
// <copyright file="LectureCourse.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a course
|
||||
/// </summary>
|
||||
public class LectureCourse
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureCourse" /> class.
|
||||
/// </summary>
|
||||
public LectureCourse()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the course
|
||||
/// </summary>
|
||||
[XmlElement("bezeichnung")]
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureDate.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the date of an activity
|
||||
/// </summary>
|
||||
public class LectureDate
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureDate" /> class.
|
||||
/// </summary>
|
||||
public LectureDate()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets WeekDay
|
||||
/// </summary>
|
||||
[XmlElement("wochentag")]
|
||||
public string WeekDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets From
|
||||
/// </summary>
|
||||
[XmlElement("von")]
|
||||
public string From { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets To
|
||||
/// </summary>
|
||||
[XmlElement("bis")]
|
||||
public string To { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Interval
|
||||
/// </summary>
|
||||
[XmlElement("rhythmus")]
|
||||
public string Interval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets Room
|
||||
/// </summary>
|
||||
[XmlElement("raum")]
|
||||
public string Room { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets StartDate
|
||||
/// </summary>
|
||||
[XmlElement("anfangsdatum")]
|
||||
public string StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets EndDate
|
||||
/// </summary>
|
||||
[XmlElement("enddatum")]
|
||||
public string EndDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureLecturer.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a lecturer
|
||||
/// </summary>
|
||||
public class LectureLecturer
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
|
||||
/// </summary>
|
||||
public LectureLecturer()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FirstName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("vorname")]
|
||||
public string FirstName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the LastName of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("name")]
|
||||
public string LastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of a lecturer
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Responsibility of a lecturer
|
||||
/// </summary>
|
||||
[XmlAttribute("zustaendigkeit")]
|
||||
public string Responsibility { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Method overrides the base ToString() and create an formatted string of the lecturer
|
||||
/// </summary>
|
||||
/// <returns>returns a string like: [Title] FirstName LastName [(Responsibility)]</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string result = string.Empty;
|
||||
|
||||
if (!this.Title.Equals(string.Empty))
|
||||
{
|
||||
result += this.Title + " ";
|
||||
}
|
||||
|
||||
result += this.FirstName + " ";
|
||||
result += this.LastName + " ";
|
||||
|
||||
if (!this.Responsibility.Equals(string.Empty))
|
||||
{
|
||||
result += "(" + this.Responsibility + ") ";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureList.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a List of LectureActivity
|
||||
/// </summary>
|
||||
[XmlRoot("lsf_auszug")]
|
||||
public class LectureList
|
||||
{
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureList" /> class.
|
||||
/// </summary>
|
||||
public LectureList()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets List of the activities
|
||||
/// </summary>
|
||||
[XmlArray("veranstaltungsliste")]
|
||||
[XmlArrayItem("veranstaltung")]
|
||||
public ObservableCollection<LectureActivity> Activities { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method return a certain activity
|
||||
/// </summary>
|
||||
/// <param name="id"> id of the activity</param>
|
||||
/// <returns> the activity (FirstOrDefault)</returns>
|
||||
public LectureActivity GetActivity(int id)
|
||||
{
|
||||
LectureActivity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault();
|
||||
return activity;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LectureModule.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>10.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the module of an lecture
|
||||
/// </summary>
|
||||
public class LectureModule
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Number of the module (like an id)
|
||||
/// </summary>
|
||||
private int number;
|
||||
|
||||
/// <summary>
|
||||
/// Url to the website of the module
|
||||
/// </summary>
|
||||
private Uri url;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LectureModule" /> class.
|
||||
/// </summary>
|
||||
public LectureModule()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the module
|
||||
/// </summary>
|
||||
[XmlElement("titel")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of the module and create the URL
|
||||
/// </summary>
|
||||
[XmlElement("nummer")]
|
||||
public int Number
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.number;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.number)
|
||||
{
|
||||
this.number = value;
|
||||
this.CreateUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL of the module
|
||||
/// </summary>
|
||||
public Uri Url
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.url;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method create the url of the module
|
||||
/// </summary>
|
||||
private void CreateUrl()
|
||||
{
|
||||
this.url = new Uri(Constants.UrlLecture_ModulBaseAddr + this.number.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LecturePageModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>18.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Lecture
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for the LecturePage
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class LecturePageModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// List for the courses of the BTU
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need to be extend to full list
|
||||
/// </remarks>
|
||||
private List<ListPickerItemModel> courseList;
|
||||
|
||||
/// <summary>
|
||||
/// List of the degrees
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> degreeList;
|
||||
|
||||
/// <summary>
|
||||
/// List of the semester
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> semesterList;
|
||||
|
||||
/// <summary>
|
||||
/// List for the number of semester
|
||||
/// </summary>
|
||||
private List<ListPickerItemModel> numberList;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LecturePageModel" /> class.
|
||||
/// </summary>
|
||||
public LecturePageModel()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected course index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectCourseIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected degree index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectDegreeIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected semester-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectSemesterIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected from-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectFromIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the selected to-index
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int SelectToIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets List for the courses of the BTU
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> CourseList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.courseList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List of the degrees
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> DegreeList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.degreeList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List of the semester
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> SemesterList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.semesterList;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets List for the number of semester
|
||||
/// </summary>
|
||||
public List<ListPickerItemModel> NumberList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.numberList;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
#region public
|
||||
|
||||
/// <summary>
|
||||
/// Load all ListPickerLists
|
||||
/// </summary>
|
||||
public void LoadLists()
|
||||
{
|
||||
this.LoadCourseList();
|
||||
this.LoadDegreeList();
|
||||
this.LoadNumberList();
|
||||
this.LoadSemesterList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Load the NumberList
|
||||
/// </summary>
|
||||
private void LoadNumberList()
|
||||
{
|
||||
this.numberList = new List<ListPickerItemModel>();
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "1", Value = "1" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "2", Value = "2" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "3", Value = "3" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "4", Value = "4" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "5", Value = "5" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "5", Value = "6" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "7", Value = "7" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "8", Value = "8" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "9", Value = "9" });
|
||||
this.numberList.Add(new ListPickerItemModel() { Text = "10", Value = "10" });
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the SemesterList
|
||||
/// </summary>
|
||||
private void LoadSemesterList()
|
||||
{
|
||||
this.semesterList = new List<ListPickerItemModel>();
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 13", Value = "20131" });
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "WiSe 13/14", Value = "20132" });
|
||||
this.semesterList.Add(new ListPickerItemModel() { Text = "SoSe 14", Value = "20131" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the DegreeList
|
||||
/// </summary>
|
||||
private void LoadDegreeList()
|
||||
{
|
||||
this.degreeList = new List<ListPickerItemModel>();
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Bachelor, Value = "82" });
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Master, Value = "88" });
|
||||
this.degreeList.Add(new ListPickerItemModel() { Text = AppResources.Degree_Diploma, Value = "11" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load the DegreeList
|
||||
/// </summary>
|
||||
private void LoadCourseList()
|
||||
{
|
||||
this.courseList = new List<ListPickerItemModel>();
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur", Value = "013" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Bauingenieurwesen", Value = "017" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Betriebswirtschaftslehre", Value = "021" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsrecht für Technologieunternehmen", Value = "042" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Elektrotechnik", Value = "048" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Informatik ", Value = "079" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Maschinenbau", Value = "104" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Mathematik", Value = "105" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Physik ", Value = "128" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsingenieurwesen", Value = "179" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftswissenschaften ", Value = "184" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Biomedizinische Gerätetechnik ", Value = "215" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik", Value = "226" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Wirtschaftsmathematik ", Value = "276" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Kultur und Technik ", Value = "711" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Physik der Halbleiter-Technologie", Value = "744" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Angewandte Mathematik ", Value = "749" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Technologie- und Innovationsmanagement", Value = "764" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Stadt- und Regionalplanung", Value = "766" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Informations- und Medientechnik ", Value = "767" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "World Heritage Studies", Value = "768" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen und Verfahrenstechnik", Value = "770" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental and Resource Management", Value = "771" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Landnutzung und Wasserbewirtschaftung", Value = "772" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Bauen und Erhalten", Value = "773" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Umweltingenieurwesen", Value = "774" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "eBusiness", Value = "794" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Civil Engineering", Value = "798" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Structural Engineering", Value = "799" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Electrical Power Engineering ", Value = "800" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Euro Hydroinformatics and Water Management", Value = "841" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Technologien Biogener Rohstoffe", Value = "842" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Environmental Technologies", Value = "843" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Process Engineering and Plant Design", Value = "844" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architekturvermittlung", Value = "845" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Nachwachsende Rohstoffe und Erneuerbare Energien", Value = "851" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Energieträger aus Biomasse und Abfällen", Value = "852" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Power Engineering", Value = "853" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verfahrenstechnik - Prozess- und Anlagentechnik", Value = "857" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Architektur.Studium.Generale", Value = "858" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Verarbeitungstechnologien der Werkstoffe", Value = "860" });
|
||||
this.courseList.Add(new ListPickerItemModel() { Text = "Forensic Sciences and Engineering", Value = "871" });
|
||||
this.courseList = this.courseList.OrderBy(o => o.Text).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="LinkListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Link
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for a list of links.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class LinkListModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinkListModel" /> class.
|
||||
/// </summary>
|
||||
public LinkListModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("link")]
|
||||
public ObservableCollection<LinkModel> Links { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="LinkModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Link
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
public class LinkModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the link title.
|
||||
/// </summary>
|
||||
private string titleDE;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the link title.
|
||||
/// </summary>
|
||||
private string titleEN;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the link.
|
||||
/// </summary>
|
||||
private string linkDE;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the link.
|
||||
/// </summary>
|
||||
private string linkEN;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LinkModel" /> class.
|
||||
/// </summary>
|
||||
public LinkModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the link.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.titleDE)
|
||||
{
|
||||
this.titleDE = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the link.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german link.
|
||||
/// </summary>
|
||||
[XmlAttribute("link_de")]
|
||||
public string Link_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.linkDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.linkDE)
|
||||
{
|
||||
this.linkDE = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english link.
|
||||
/// </summary>
|
||||
[XmlAttribute("link_en")]
|
||||
public string Link_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.linkEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.linkEN)
|
||||
{
|
||||
this.linkEN = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized title. If the phone is set to german language,
|
||||
/// the german title will be returned otherwise the english title.
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized link. if the phone is set to german language,
|
||||
/// the german comment will be returned otherwise the english link.
|
||||
/// </summary>
|
||||
public string Link
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.Link_DE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.Link_EN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,581 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursInstitutionModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
public class OpeninghoursInstitutionModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// German version of the institution title.
|
||||
/// </summary>
|
||||
private string titleDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the institution title.
|
||||
/// </summary>
|
||||
private string titleEN = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on monday.
|
||||
/// </summary>
|
||||
private string dayMonday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on tuesday.
|
||||
/// </summary>
|
||||
private string dayTuesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on wednesday.
|
||||
/// </summary>
|
||||
private string dayWednesday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on thursday.
|
||||
/// </summary>
|
||||
private string dayThursday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on friday.
|
||||
/// </summary>
|
||||
private string dayFriday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on saturday.
|
||||
/// </summary>
|
||||
private string daySaturday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Opening hours on sunday.
|
||||
/// </summary>
|
||||
private string daySunday = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Email address of the institution.
|
||||
/// </summary>
|
||||
private string infoEmail = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Phone number of the institution.
|
||||
/// </summary>
|
||||
private string infoPhone = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Building name where the institution is located.
|
||||
/// </summary>
|
||||
private string infoBuilding = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Room where the institution is located.
|
||||
/// </summary>
|
||||
private string infoRoom = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// German version of the comment.
|
||||
/// </summary>
|
||||
private string commentDE = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// English version of the comment.
|
||||
/// </summary>
|
||||
private string commentEN = string.Empty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursInstitutionModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursInstitutionModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_de")]
|
||||
public string Title_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english title of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("title_en")]
|
||||
public string Title_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.titleEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on monday.
|
||||
/// </summary>
|
||||
[XmlAttribute("monday")]
|
||||
public string Monday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayMonday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayMonday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on tuesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("tuesday")]
|
||||
public string Tuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayTuesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayTuesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on wednesday.
|
||||
/// </summary>
|
||||
[XmlAttribute("wednesday")]
|
||||
public string Wednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayWednesday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayWednesday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on thursday.
|
||||
/// </summary>
|
||||
[XmlAttribute("thursday")]
|
||||
public string Thursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayThursday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayThursday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on friday.
|
||||
/// </summary>
|
||||
[XmlAttribute("friday")]
|
||||
public string Friday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dayFriday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.dayFriday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on saturday.
|
||||
/// </summary>
|
||||
[XmlAttribute("saturday")]
|
||||
public string Saturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySaturday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySaturday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the open hours on sunday.
|
||||
/// </summary>
|
||||
[XmlAttribute("sunday")]
|
||||
public string Sunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.daySunday;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.daySunday = this.FixOpeninghoursString(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email address of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("email")]
|
||||
public string EMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoEmail;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoEmail = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the phone number of the institution.
|
||||
/// </summary>
|
||||
[XmlAttribute("phone")]
|
||||
public string Phone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoPhone;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoPhone = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the building where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_building")]
|
||||
public string Building
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoBuilding;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoBuilding = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the room where the institution is located.
|
||||
/// </summary>
|
||||
[XmlAttribute("location_room")]
|
||||
public string Room
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.infoRoom;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.infoRoom = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the german comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_de")]
|
||||
public string Comment_DE
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentDE = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the english comment.
|
||||
/// </summary>
|
||||
[XmlAttribute("comment_en")]
|
||||
public string Comment_EN
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.commentEN = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized title. If the phone is set to german language,
|
||||
/// the german title will be returned otherwise the english title.
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.titleDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.titleEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the localized comment. if the phone is set to german language,
|
||||
/// the german comment will be returned otherwise the english comment.
|
||||
/// </summary>
|
||||
public string Comment
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CultureInfo.CurrentUICulture.Name.StartsWith("de"))
|
||||
{
|
||||
return this.commentDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.commentEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the email address and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string EMailTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.EMail + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a string containing the phone number and the institution
|
||||
/// title separated by ':'.
|
||||
/// </summary>
|
||||
public string PhoneTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Phone + ":" + this.Title;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the monday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleMonday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayMonday == string.Empty) || (this.dayMonday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the tuesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleTuesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayTuesday == string.Empty) || (this.dayTuesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the wednesday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleWednesday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayWednesday == string.Empty) || (this.dayWednesday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the thursday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleThursday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayThursday == string.Empty) || (this.dayThursday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the friday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleFriday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.dayFriday == string.Empty) || (this.dayFriday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the saturday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSaturday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySaturday == string.Empty) || (this.daySaturday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the sunday TextBlock.
|
||||
/// </summary>
|
||||
public Visibility VisibleSunday
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.daySunday == string.Empty) || (this.daySunday.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the comment.
|
||||
/// </summary>
|
||||
public Visibility VisibleComment
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.Comment == string.Empty) || (this.Comment.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the email address.
|
||||
/// </summary>
|
||||
public Visibility VisibleEMail
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoEmail == string.Empty) || (this.infoEmail.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the phone number.
|
||||
/// </summary>
|
||||
public Visibility VisiblePhone
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoPhone == string.Empty) || (this.infoPhone.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the room.
|
||||
/// </summary>
|
||||
public Visibility VisibleRoom
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoRoom == string.Empty) || (this.infoRoom.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the visibility state of the building.
|
||||
/// </summary>
|
||||
public Visibility VisibleBuilding
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((this.infoBuilding == string.Empty) || (this.infoBuilding.Length == 0)) ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
/// <summary>
|
||||
/// Removes unwanted chars in a string.
|
||||
/// </summary>
|
||||
/// <param name="str">input string</param>
|
||||
/// <returns>fixed string</returns>
|
||||
private string FixOpeninghoursString(string str)
|
||||
{
|
||||
string retValue = string.Empty;
|
||||
|
||||
retValue = str.Replace(" | ", "\n");
|
||||
|
||||
return retValue;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="OpeninghoursModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.Openinghours
|
||||
{
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for opening hours.
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class OpeninghoursModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// Time when the model was created.
|
||||
/// </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets feed information item list.
|
||||
/// </summary>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("institution")]
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> institutions { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="OpeninghoursModel" /> class.
|
||||
/// </summary>
|
||||
public OpeninghoursModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model.
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Institutions.
|
||||
/// </summary>
|
||||
public ObservableCollection<OpeninghoursInstitutionModel> Institutions
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.institutions;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilListModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.StudentCouncil
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menus in one week
|
||||
/// </summary>
|
||||
[XmlRoot("root")]
|
||||
public class StudentCouncilListModel
|
||||
{
|
||||
#region Members
|
||||
/// <summary>
|
||||
/// Time when the model was created
|
||||
/// </summary>
|
||||
private readonly DateTime createTime;
|
||||
|
||||
#endregion
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilListModel" /> class.
|
||||
/// </summary>
|
||||
public StudentCouncilListModel()
|
||||
{
|
||||
this.createTime = DateTime.Now;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Proberty
|
||||
/// <summary>
|
||||
/// Gets or sets the StudentCouncils
|
||||
/// </summary>
|
||||
[XmlArray("data")]
|
||||
[XmlArrayItem("studentcouncil")]
|
||||
public ObservableCollection<StudentCouncilModel> StudentCouncils { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the creation time of the model
|
||||
/// </summary>
|
||||
public DateTime CreateTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.createTime;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Method
|
||||
/// <summary>
|
||||
/// Method group the StudentCouncilList by Faculty
|
||||
/// </summary>
|
||||
/// <returns>a Dictionary, where the Key is name of the Faculty und the value is a List of StudentCouncil</returns>
|
||||
public Dictionary<string, List<StudentCouncilModel>> GetStudentCouncilsGroupByFaculty()
|
||||
{
|
||||
List<IGrouping<string, StudentCouncilModel>> tmpList = this.StudentCouncils.GroupBy(p => p.Faculty).ToList();
|
||||
Dictionary<string, List<StudentCouncilModel>> itemMap = new Dictionary<string, List<StudentCouncilModel>>();
|
||||
foreach (IGrouping<string, StudentCouncilModel> group in tmpList)
|
||||
{
|
||||
Dictionary<string, List<StudentCouncilModel>> tempDic = new Dictionary<string, List<StudentCouncilModel>>();
|
||||
itemMap.Add(group.Key, group.ToList());
|
||||
}
|
||||
|
||||
return itemMap;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="StudentCouncilModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>02.07.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace CampusAppWP8.Model.StudentCouncil
|
||||
{
|
||||
using System.Xml.Serialization;
|
||||
using CampusAppWP8.Resources;
|
||||
|
||||
/// <summary>
|
||||
/// Model for menu
|
||||
/// </summary>
|
||||
public class StudentCouncilModel
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// name of the faculty.
|
||||
/// </summary>
|
||||
private string faculty;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StudentCouncilModel" /> class.
|
||||
/// </summary>
|
||||
public StudentCouncilModel()
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Property
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the faculty of the StudentCouncil.
|
||||
/// </summary>
|
||||
[XmlAttribute("faculty")]
|
||||
public string Faculty
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.faculty;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != this.faculty)
|
||||
{
|
||||
this.faculty = value;
|
||||
int num;
|
||||
if (int.TryParse(this.faculty, out num))
|
||||
{
|
||||
this.faculty = AppResources.Faculty + " " + num;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the StudentCouncil.
|
||||
/// </summary>
|
||||
[XmlAttribute("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the webpage-url of the StudentCouncil.
|
||||
/// </summary>
|
||||
[XmlAttribute("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email-address of the StudentCouncil.
|
||||
/// </summary>
|
||||
[XmlAttribute("email")]
|
||||
public string Email { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ListPickerItemModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for the ListPickerItems
|
||||
/// </summary>
|
||||
public class ListPickerItemModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Value of an Item
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Text (caption) of an Item
|
||||
/// </summary>
|
||||
public string Text { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="URLParamModel.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>17.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Model.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class is a Model for the URLParameter like GET-Parameter
|
||||
/// </summary>
|
||||
public class UrlParamModel
|
||||
{
|
||||
#region Members
|
||||
|
||||
/// <summary>
|
||||
/// Variable of the key
|
||||
/// </summary>
|
||||
private readonly string key;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>
|
||||
public UrlParamModel(string key)
|
||||
{
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UrlParamModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="key">the key for the parameter</param>>
|
||||
/// <param name="value">value of the parameter</param>
|
||||
public UrlParamModel(string key, string value)
|
||||
{
|
||||
this.key = key;
|
||||
this.Value = value;
|
||||
}
|
||||
#endregion
|
||||
#region Proberty
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the Parameter
|
||||
/// </summary>
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the key of the parameter
|
||||
/// </summary>
|
||||
public string Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.key;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Method check if the parameter is valid
|
||||
/// </summary>
|
||||
/// <returns>true if is it valid, otherwise false</returns>
|
||||
public virtual bool IsParamValid()
|
||||
{
|
||||
if (this.key == null || string.Empty.Equals(this.key) || string.Empty.Equals(this.Value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method return a formatted string like Key=Value
|
||||
/// </summary>
|
||||
/// <returns> return formatted string</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
if (!this.IsParamValid())
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
return "&" + this.key + "=" + this.Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
<phone:PhoneApplicationPage xmlns:Controls="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
|
||||
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:Location="clr-namespace:System.Device.Location;assembly=System.Device"
|
||||
x:Class="CampusAppWP8.Pages.Campusmap.CampusMapPage"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged"
|
||||
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 LocalizedResources.CampusMapApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Name="XPoint" Grid.Column="0" Text="0" />
|
||||
<TextBox Name="YPoint" Grid.Column="1" Text="0"/>
|
||||
<Button Grid.Column="2" Click="Button_Click">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<ScrollViewer Name="MapScroller" Grid.Row="1" HorizontalScrollBarVisibility="Auto" RenderTransformOrigin="0,0">
|
||||
<Canvas Name="MapCanvas" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Height="{Binding ImageHeight}" Width="{Binding ImageWidth}">
|
||||
<Canvas.Background>
|
||||
<ImageBrush Stretch="Fill" ImageSource="{Binding ImageSource}">
|
||||
|
||||
</ImageBrush>
|
||||
</Canvas.Background>
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,51 +0,0 @@
|
||||
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;
|
||||
using System.Windows.Media;
|
||||
using CampusAppWP8.Model.Campusmap;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace CampusAppWP8.Pages.Campusmap
|
||||
{
|
||||
public partial class CampusMapPage : PhoneApplicationPage
|
||||
{
|
||||
private MapModel map;
|
||||
public CampusMapPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.map = new MapModel() { ImageSource = "/Assets/testmap.png", ImageWidth = 2000, ImageHeight = 2000, MapImageOffsetX = -228, MapImageOffsetY = -300, RefPoint = new Point(1000, 1000), Scale = 20};
|
||||
this.MapCanvas.DataContext = map;
|
||||
|
||||
}
|
||||
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Methods overrides the OnNavigatedTo-Method
|
||||
/// </summary>
|
||||
/// <param name="e">some NavigationEventArgs</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MapCanvas.Children.Clear();
|
||||
Point scrollPoint = map.GetScrollPoint(map.ConverToPixelPoint(double.Parse(XPoint.Text), double.Parse(YPoint.Text)));
|
||||
MapCanvas.Children.Add(map.AddPinFromRefPoint(map.ConverToPixelPoint(double.Parse(XPoint.Text), double.Parse(YPoint.Text))));
|
||||
|
||||
MapScroller.ScrollToVerticalOffset(scrollPoint.Y);
|
||||
MapScroller.ScrollToHorizontalOffset(scrollPoint.X);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Departments.DepartmentPage"
|
||||
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:viewModel="clr-namespace:CampusAppWP8.Model.Departments"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
OrientationChanged="PhoneApplicationPage_OrientationChanged"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.DataContext>
|
||||
<viewModel:DepartmentModel />
|
||||
</Grid.DataContext>
|
||||
<!-- Pivot -->
|
||||
<phone:Pivot x:Name="DepartmentPivot" Title="{Binding Path=LocalizedResources.DepartmentApp_Title, Source={StaticResource LocalizedStrings}}" ItemsSource="{Binding Faculties}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Name, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ListBox ItemsSource="{Binding Chairs}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<!--chair button-->
|
||||
<Button Tag="{Binding Url}" Click="ChairTB_Click" HorizontalContentAlignment="Left">
|
||||
<TextBlock Text="{Binding Name}" HorizontalAlignment="Stretch" TextWrapping="Wrap" FontSize="24"/>
|
||||
</Button>
|
||||
<StackPanel Visibility="Collapsed">
|
||||
<!--add to favorite button-->
|
||||
<Button BorderBrush="Transparent" Tag="{Binding Name}" Click="AddBtn_Click" HorizontalContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Grid.Row="0" Height="32" Width="32" Source="{Binding Path=ThemelizedIcon.Add, Source={StaticResource ThemelizedIcons}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding Path=LocalizedResources.Add, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
<!--info button-->
|
||||
<Button x:Name="InfoBtn" BorderBrush="Transparent" Tag="{Binding Url}" Click="InfoBtn_Click" HorizontalContentAlignment="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="64"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Grid.Row="0" Height="32" Width="32" Source="{Binding Path=ThemelizedIcon.Info, Source={StaticResource ThemelizedIcons}}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding Path=LocalizedResources.Info, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,149 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="DepartmentPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>24.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Departments
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Pivot page with list of the chairs of the faculties.
|
||||
/// </summary>
|
||||
public partial class DepartmentPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// For checking, if the source of the list is already set.
|
||||
/// </summary>
|
||||
private bool isSourceSet = false;
|
||||
|
||||
/// <summary>
|
||||
/// Last clicked button object.
|
||||
/// </summary>
|
||||
private FrameworkElement lastClickedBtn = null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DepartmentPage" /> class.
|
||||
/// </summary>
|
||||
public DepartmentPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page.
|
||||
/// Initialize the feed loading.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
if (this.isSourceSet == false)
|
||||
{
|
||||
this.DepartmentPivot.ItemsSource = DepartmentIndexPage.GetFeed().GetModel().Faculties;
|
||||
this.isSourceSet = true;
|
||||
}
|
||||
|
||||
string pivotIndex = string.Empty;
|
||||
|
||||
// Navigate to the selected pivotitem
|
||||
if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
|
||||
{
|
||||
int pivotIndexInt = int.Parse(pivotIndex) - 1;
|
||||
|
||||
// if the index is in the range of the array
|
||||
if ((pivotIndexInt >= 0) && (pivotIndexInt < DepartmentIndexPage.GetFeed().GetModel().Faculties.Count()))
|
||||
{
|
||||
DepartmentPivot.SelectedIndex = pivotIndexInt;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERROR: pivotIndex out of range!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On orientation changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">sender object</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void PhoneApplicationPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking a chair TextBlock.
|
||||
/// Open the browser with the url of the chair.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked chair TextBlock</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void ChairTB_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement tempBtn = sender as FrameworkElement;
|
||||
StackPanel tempParent = null;
|
||||
|
||||
if (this.lastClickedBtn != tempBtn)
|
||||
{
|
||||
if (this.lastClickedBtn != null)
|
||||
{
|
||||
tempParent = this.lastClickedBtn.Parent as StackPanel;
|
||||
tempParent.Children[1].Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
tempParent = tempBtn.Parent as StackPanel;
|
||||
tempParent.Children[1].Visibility = Visibility.Visible;
|
||||
|
||||
this.lastClickedBtn = tempBtn;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempParent = this.lastClickedBtn.Parent as StackPanel;
|
||||
tempParent.Children[1].Visibility = Visibility.Collapsed;
|
||||
this.lastClickedBtn = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking on a add button.
|
||||
/// Add the chair to the favorite list.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void AddBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Button btn = this.lastClickedBtn as Button;
|
||||
TextBlock btnText = btn.Content as TextBlock;
|
||||
|
||||
Model.Departments.ChairModel tempModel = DepartmentIndexPage.GetFeed().GetModel().Faculties[this.DepartmentPivot.SelectedIndex].GetChairModel(btnText.Text);
|
||||
|
||||
if (tempModel != null)
|
||||
{
|
||||
DepartmentIndexPage.GetFavoriteFeed().GetModel().Faculties[0].AddChair(tempModel);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking on a info button.
|
||||
/// Open the info page to this chair.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void InfoBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement infoBtn = sender as FrameworkElement;
|
||||
string chairName = ((this.lastClickedBtn as Button).Content as TextBlock).Text.ToString();
|
||||
|
||||
NavigationService.Navigate(new Uri(Constants.PathDepartment_DepartmentInfoPage + "?url=" + infoBtn.Tag.ToString() + "&name=" + chairName, UriKind.Relative));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Events.EventIndexPage"
|
||||
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 -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title and headline -->
|
||||
<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.EventApp_Title, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
|
||||
</StackPanel>
|
||||
<!-- Content -->
|
||||
<ListBox x:Name="EventList" Grid.Row="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<lui:NavigateButton Name="EventItem" QuerryStringValue="{Binding Index}" Url="{Binding Path=Constants.PathEvent_EventPage, Source={StaticResource Const}}" QuerryStringName="{Binding Path=Constants.ParamPivotIndex, Source={StaticResource Const}}" Style="{StaticResource ListButtonStyle}">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding Title}" />
|
||||
</lui:NavigateButton>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,70 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="EventIndexPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Events
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Events;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Overview page of all events.
|
||||
/// </summary>
|
||||
public partial class EventIndexPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Event Feed object, which contains the RSS models and data.
|
||||
/// </summary>
|
||||
private static EventFeed eventFeed = null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventIndexPage" /> class.
|
||||
/// </summary>
|
||||
public EventIndexPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
|
||||
if (EventIndexPage.eventFeed == null)
|
||||
{
|
||||
EventIndexPage.eventFeed = new EventFeed(false);
|
||||
}
|
||||
|
||||
EventIndexPage.eventFeed.onLoaded += new EventFeed.OnLoaded(this.SetupEventPageList);
|
||||
EventIndexPage.eventFeed.LoadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the eventFeed object.
|
||||
/// </summary>
|
||||
/// <returns>event feed object</returns>
|
||||
public static EventFeed GetEventFeed()
|
||||
{
|
||||
return EventIndexPage.eventFeed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page, creates a FeedEventHandler and load the RSS feed data.
|
||||
/// </summary>
|
||||
/// <param name="e">event args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(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
|
||||
/// will be sorted by timestamp and the buttons will be created.
|
||||
/// </summary>
|
||||
private void SetupEventPageList()
|
||||
{
|
||||
this.EventList.ItemsSource = EventIndexPage.eventFeed.Model.Channel[0].Item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Events.EventPage"
|
||||
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:viewModel="clr-namespace:CampusAppWP8.Model.RSS"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
|
||||
shell:SystemTray.IsVisible="True">
|
||||
|
||||
<phone:PhoneApplicationPage.Resources>
|
||||
<viewModel:RSSViewModel x:Key="RssViewModel" x:Name="RssView" />
|
||||
</phone:PhoneApplicationPage.Resources>
|
||||
<!-- LayoutRoot -->
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<!-- Pivotpage -->
|
||||
<phone:Pivot x:Name="EventPivot" Title="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}">
|
||||
<!-- Pivotitem template -->
|
||||
<phone:Pivot.HeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Path=Date, Mode=OneWay}" />
|
||||
</DataTemplate>
|
||||
</phone:Pivot.HeaderTemplate>
|
||||
<phone:Pivot.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="100"/>-->
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="90"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid x:Name="EventTextGrid" Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock x:Name="EventHeadline" Text="{Binding Path=Title, Mode=OneWay}" Grid.Row="0" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="42"/>
|
||||
<ScrollViewer x:Name="EventTextScroll" Grid.Row="1">
|
||||
<TextBlock x:Name="EventText" Text="{Binding Path=Text, Mode=OneWay}" Height="Auto" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="24" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<phone:WebBrowser x:Name="WebBrowser" Grid.Row="0" IsScriptEnabled="True" Visibility="Collapsed"/>
|
||||
|
||||
<Button Name="EventHome" Content="{Binding Path=LocalizedResources.NewsHomeBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Click="EventHome_Click"/>
|
||||
<Button Name="EventLink" Tag="{Binding Path=Link, Mode=OneWay}" Content="{Binding Path=LocalizedResources.NewsLinkBtn, Source={StaticResource LocalizedStrings}}" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="EventLink_Click"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</phone:Pivot.ItemTemplate>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,128 +0,0 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// <copyright file="EventPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>fiedlchr</author>
|
||||
// <sience>03.05.2013</sience>
|
||||
//-----------------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Events
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// EventPage, where every event fees has his own PivotItem.
|
||||
/// </summary>
|
||||
public partial class EventPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// for checking if the feed source is already set or not.
|
||||
/// </summary>
|
||||
private bool isSourceSet = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EventPage" /> class.
|
||||
/// </summary>
|
||||
public EventPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On navigation to this page.
|
||||
/// The PivotItem source will be set, if it wasn't before.
|
||||
/// Navigating to the submitted index of the chosen PivotItem page.
|
||||
/// </summary>
|
||||
/// <param name="e">Event Args</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
|
||||
// Set pivotitem Source
|
||||
if (this.isSourceSet == false)
|
||||
{
|
||||
this.EventPivot.ItemsSource = EventIndexPage.GetEventFeed().Model.Channel[0].Item;
|
||||
this.isSourceSet = true;
|
||||
}
|
||||
|
||||
string pivotIndex = string.Empty;
|
||||
|
||||
// Navigate to the selected pivotitem
|
||||
if (NavigationContext.QueryString.TryGetValue("pivotindex", out pivotIndex))
|
||||
{
|
||||
int pivotIndexInt = int.Parse(pivotIndex);
|
||||
|
||||
// if the index is in the range of the array
|
||||
if ((pivotIndexInt >= 0) && (pivotIndexInt < EventIndexPage.GetEventFeed().Model.Channel[0].Item.Count()))
|
||||
{
|
||||
EventPivot.SelectedIndex = pivotIndexInt;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("ERROR: pivotIndex out of range!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the home button (lower left).
|
||||
/// Navigate back to the event index page.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EventHome_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// Navigate back to the event index page
|
||||
NavigationService.GoBack();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// On clicking the link button if a link exists in the feed
|
||||
/// (lower right).
|
||||
/// Open the WebBrowser with the url set in the feed.
|
||||
/// </summary>
|
||||
/// <param name="sender">clicked button</param>
|
||||
/// <param name="e">event args</param>
|
||||
private void EventLink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
FrameworkElement fe = sender as FrameworkElement;
|
||||
|
||||
// Open the webbrowser
|
||||
Grid grfe = fe.Parent as Grid;
|
||||
FrameworkElement eventTextGrid = null;
|
||||
FrameworkElement eventWeb = null;
|
||||
|
||||
foreach (FrameworkElement tempElem in grfe.Children)
|
||||
{
|
||||
if (tempElem.Name == "EventTextGrid")
|
||||
{
|
||||
eventTextGrid = tempElem;
|
||||
}
|
||||
else if (tempElem.Name == "WebBrowser")
|
||||
{
|
||||
eventWeb = tempElem;
|
||||
}
|
||||
}
|
||||
|
||||
if ((eventTextGrid != null)
|
||||
&& (eventWeb != null))
|
||||
{
|
||||
if (eventTextGrid.Visibility == Visibility.Visible)
|
||||
{
|
||||
eventTextGrid.Visibility = Visibility.Collapsed;
|
||||
eventWeb.Visibility = Visibility.Visible;
|
||||
(eventWeb as WebBrowser).Navigate(new Uri(fe.Tag.ToString(), UriKind.Absolute));
|
||||
}
|
||||
else
|
||||
{
|
||||
eventWeb.Visibility = Visibility.Collapsed;
|
||||
eventTextGrid.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,171 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.LecturePage"
|
||||
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:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
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-->
|
||||
<ProgressBar Name="ProgressBar" Grid.Row="1" Visibility="Collapsed" IsIndeterminate="True"/>
|
||||
|
||||
<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.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<ScrollViewer Grid.Row="1" Margin="12,0,12,0">
|
||||
<Grid x:Name="ContentPanel">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}"/>
|
||||
<TextBox Name="ActivtyName"/>
|
||||
</StackPanel>
|
||||
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="1">
|
||||
<StackPanel >
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Course, Source={StaticResource LocalizedStrings}}"/>
|
||||
<!-- Listpicket of courses -->
|
||||
<toolkit:ListPicker Name="Course" ExpansionMode="FullScreenOnly" FullModeHeader="{Binding Path=LocalizedResources.LectureApp_ListPickerHeaderCourse, Source={StaticResource LocalizedStrings}}" >
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="2">
|
||||
<StackPanel >
|
||||
<!-- Listpicket of degree-->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Degree, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="Degree" ExpansionMode="FullScreenOnly">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="3">
|
||||
<StackPanel >
|
||||
<!-- Listpicket of semesters(from to) -->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Term, Source={StaticResource LocalizedStrings}}"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<toolkit:ListPicker Width="60" Name="From" ExpansionMode="FullScreenOnly">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
<TextBlock Text="bis" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<toolkit:ListPicker Width="60" Name="To" ExpansionMode="FullScreenOnly">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="4">
|
||||
<StackPanel>
|
||||
<!-- Listpicket of semster -->
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Semester, Source={StaticResource LocalizedStrings}}"/>
|
||||
<toolkit:ListPicker Name="Semester" ExpansionMode="FullScreenOnly">
|
||||
<toolkit:ListPicker.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Text}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.ItemTemplate>
|
||||
<toolkit:ListPicker.FullModeItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneAccentBrush}" BorderThickness="12,0,0,0" Margin="0,0,0,6">
|
||||
<TextBlock Text="{Binding Text}" Style="{StaticResource PhoneTextGroupHeaderStyle}" TextWrapping="Wrap"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</toolkit:ListPicker.FullModeItemTemplate>
|
||||
</toolkit:ListPicker>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneBorderBrush}" BorderThickness="0,2,0,0" Grid.Row="5">
|
||||
<Button Name="SearchButton" Click="SendRequest">
|
||||
<Image Name="SearchButtonImg" Source="{Binding Path=ThemelizedIcon.Search, Source={StaticResource ThemelizedIcons}}" Width="60" />
|
||||
</Button>
|
||||
</Border>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,205 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="LecturePage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>13.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Feed.Lecture;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Model.Utility;
|
||||
using CampusAppWP8.Resources;
|
||||
using CampusAppWP8.Utility;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the LecturePage
|
||||
/// </summary>
|
||||
public partial class LecturePage : PhoneApplicationPage
|
||||
{
|
||||
#region Member
|
||||
|
||||
/// <summary>
|
||||
/// actual LectureAPI
|
||||
/// </summary>
|
||||
private LectureApi api;
|
||||
|
||||
/// <summary>
|
||||
/// List for the courses of the BTU
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// need to be extend to full list
|
||||
/// </remarks>
|
||||
private LecturePageModel pageModel;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="LecturePage" /> class.
|
||||
/// </summary>
|
||||
public LecturePage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
this.LoadPageModel();
|
||||
this.SetupListPickers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region methods
|
||||
|
||||
#region protected
|
||||
/// <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
|
||||
App.SaveToIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel, null);
|
||||
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.StoreSelectedIndex();
|
||||
App.SaveToIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel, this.pageModel);
|
||||
}
|
||||
|
||||
base.OnNavigatedFrom(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private
|
||||
|
||||
/// <summary>
|
||||
/// Load the PageModel
|
||||
/// </summary>
|
||||
private void LoadPageModel()
|
||||
{
|
||||
this.pageModel = new LecturePageModel();
|
||||
this.pageModel.LoadLists();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method sets the ItemSource of the ListPickers
|
||||
/// </summary>
|
||||
private void SetupListPickers()
|
||||
{
|
||||
this.Course.ItemsSource = this.pageModel.CourseList;
|
||||
this.Degree.ItemsSource = this.pageModel.DegreeList;
|
||||
this.From.ItemsSource = this.pageModel.NumberList;
|
||||
this.To.ItemsSource = this.pageModel.NumberList;
|
||||
this.Semester.ItemsSource = this.pageModel.SemesterList;
|
||||
|
||||
// load values from last request
|
||||
LecturePageModel lastPageModel = App.LoadFromIsolatedStorage<LecturePageModel>(Constants.IsolatedStorage_LecturePageModel);
|
||||
if (lastPageModel != null)
|
||||
{
|
||||
this.SetLastSelectedIndex(lastPageModel);
|
||||
}
|
||||
|
||||
this.SetSelectedIndex();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
/// <param name="lastPageModel">Last PageModel</param>
|
||||
private void SetLastSelectedIndex(LecturePageModel lastPageModel)
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = lastPageModel.SelectCourseIndex;
|
||||
this.pageModel.SelectDegreeIndex = lastPageModel.SelectDegreeIndex;
|
||||
this.pageModel.SelectFromIndex = lastPageModel.SelectFromIndex;
|
||||
this.pageModel.SelectToIndex = lastPageModel.SelectToIndex;
|
||||
this.pageModel.SelectSemesterIndex = lastPageModel.SelectSemesterIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method set the last selected index of the ListPickers
|
||||
/// </summary>
|
||||
private void SetSelectedIndex()
|
||||
{
|
||||
this.Course.SelectedIndex = this.pageModel.SelectCourseIndex;
|
||||
this.Degree.SelectedIndex = this.pageModel.SelectDegreeIndex;
|
||||
this.Semester.SelectedIndex = this.pageModel.SelectSemesterIndex;
|
||||
this.From.SelectedIndex = this.pageModel.SelectFromIndex;
|
||||
this.To.SelectedIndex = this.pageModel.SelectToIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method store the actual selectIndex to the models
|
||||
/// </summary>
|
||||
private void StoreSelectedIndex()
|
||||
{
|
||||
this.pageModel.SelectCourseIndex = this.Course.SelectedIndex;
|
||||
this.pageModel.SelectDegreeIndex = this.Degree.SelectedIndex;
|
||||
this.pageModel.SelectSemesterIndex = this.Semester.SelectedIndex;
|
||||
this.pageModel.SelectFromIndex = this.From.SelectedIndex;
|
||||
this.pageModel.SelectToIndex = this.To.SelectedIndex;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method send a request to the Feed
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// have to refactors
|
||||
/// </remarks>
|
||||
/// <param name="sender">sender of this event</param>
|
||||
/// <param name="e"> events arguments</param>
|
||||
private void SendRequest(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.api = new LectureApi();
|
||||
this.api.EventHandler.ApiIsReadyEvent += new ApiEventHandler.ApiReadyHandler(this.ApiIsReady);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
|
||||
List<UrlParamModel> parameterList = this.CreateUrlParameter();
|
||||
this.api.ApiGet(parameterList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method read the values from the inputs and put them in a list of parameters
|
||||
/// </summary>
|
||||
/// <returns>a list of parameters</returns>
|
||||
private List<UrlParamModel> CreateUrlParameter()
|
||||
{
|
||||
ListPickerItemModel semester = (ListPickerItemModel)this.Semester.SelectedItem;
|
||||
ListPickerItemModel degree = (ListPickerItemModel)this.Degree.SelectedItem;
|
||||
ListPickerItemModel course = (ListPickerItemModel)this.Course.SelectedItem;
|
||||
ListPickerItemModel from = (ListPickerItemModel)this.From.SelectedItem;
|
||||
ListPickerItemModel to = (ListPickerItemModel)this.To.SelectedItem;
|
||||
|
||||
List<UrlParamModel> parameterList = new List<UrlParamModel>();
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Semester, semester.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Degree, degree.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_Course, course.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_From, from.Value));
|
||||
parameterList.Add(new UrlParamModel(Constants.ParamGetLecture_To, to.Value));
|
||||
return parameterList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method will be execute if the feed is ready
|
||||
/// </summary>
|
||||
private void ApiIsReady()
|
||||
{
|
||||
App.SaveToIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel, this.api.Model);
|
||||
this.ProgressBar.Visibility = System.Windows.Visibility.Collapsed;
|
||||
Uri url = new Uri(Constants.PathLecture_ResultPage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ModulWebPage"
|
||||
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="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<phone:WebBrowser x:Name="WebmailBrowser" IsScriptEnabled="True"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,43 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ModulWebPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows Webpages from the BaseAddress <see cref="Constants.UrlLecture_ModulBaseAddr" />
|
||||
/// </summary>
|
||||
public partial class ModulWebPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ModulWebPage" /> class.
|
||||
/// </summary>
|
||||
public ModulWebPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ModulNumber))
|
||||
{
|
||||
string number = NavigationContext.QueryString[Constants.ParamModelLecture_ModulNumber];
|
||||
this.WebmailBrowser.Navigate(new Uri(Constants.UrlLecture_ModulBaseAddr + number, UriKind.Absolute));
|
||||
}
|
||||
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ResultDetailPage"
|
||||
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="Portrait" 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.LectureApp_DetailsHeader, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!--ContentPanel - zusätzliche Inhalte hier platzieren-->
|
||||
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,0,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Type, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Type}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureName, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Officer, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding LecturerString}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Courses, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding CourseString}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_Department, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Department}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border BorderBrush="{StaticResource PhoneInverseInactiveBrush}" BorderThickness="0,1,0,0" Padding="0,12,0,12">
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Path=LocalizedResources.LectureApp_LectureTopic, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextGroupHeaderStyle}" Margin="0,0,0,0"/>
|
||||
<TextBlock Text="{Binding Topic}" TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
@@ -1,59 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultDetailPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows details of an activity
|
||||
/// </summary>
|
||||
public partial class ResultDetailPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultDetailPage" /> class.
|
||||
/// </summary>
|
||||
public ResultDetailPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelLecture_ActivityId))
|
||||
{
|
||||
string activityId = NavigationContext.QueryString[Constants.ParamModelLecture_ActivityId];
|
||||
this.LoadActivity(int.Parse(activityId));
|
||||
}
|
||||
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method load a certain Activity from the model
|
||||
/// </summary>
|
||||
/// <param name="activityId">id of the activity</param>
|
||||
private void LoadActivity(int activityId)
|
||||
{
|
||||
LectureList list = App.LoadFromIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel);
|
||||
if (list != null)
|
||||
{
|
||||
LectureActivity activity = list.GetActivity(activityId);
|
||||
activity.CreateLectureString();
|
||||
activity.CreateCourseString();
|
||||
this.ContentPanel.DataContext = activity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="CampusAppWP8.Pages.Lecture.ResultPage"
|
||||
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:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
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">
|
||||
<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.LectureApp_Title, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}" />
|
||||
</StackPanel>
|
||||
<ListBox x:Name="ResultList" Grid.Row="1">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderBrush="{StaticResource PhoneContrastBackgroundBrush}" Style="{StaticResource ListButtonBorder}">
|
||||
<StackPanel>
|
||||
<lui:ToggleButton ToggleContentTag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Style="{StaticResource ListButtonNoneBorder}" HorizontalContentAlignment="Left" >
|
||||
<Grid HorizontalAlignment="Left">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding Type}" TextAlignment="Left" HorizontalAlignment="Left" />
|
||||
<TextBlock Text=" : "/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Grid.Column="1" Grid.Row="0"/>
|
||||
</Grid>
|
||||
</lui:ToggleButton>
|
||||
<StackPanel Tag="{Binding Path=Constants.ToggleContent, Source={StaticResource Const}}" Visibility="Collapsed">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<lui:NavigateButton toolkit:TiltEffect.IsTiltEnabled="True" Name="Link" Url="{Binding Path=Constants.PathLecture_ModulWebPage, Source={StaticResource Const}}" QuerryStringValue="{Binding Modul.Number}" QuerryStringName="{Binding Path=Constants.ParamModelLecture_ModulNumber, Source={StaticResource Const}}">
|
||||
<Image Source="{Binding Path=ThemelizedIcon.Link, Source={StaticResource ThemelizedIcons}}" Height="50"/>
|
||||
</lui:NavigateButton>
|
||||
<lui:NavigateButton toolkit:TiltEffect.IsTiltEnabled="True" Name="Details" Content="Details" Url="{Binding Path=Constants.PathLecture_ResultDetailPage, Source={StaticResource Const}}" QuerryStringValue="{Binding Id}" QuerryStringName="{Binding Path=Constants.ParamModelLecture_ActivityId, Source={StaticResource Const}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</phone:PhoneApplicationPage>
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
//-----------------------------------------------------------------------
|
||||
// <copyright file="ResultPage.xaml.cs" company="BTU/IIT">
|
||||
// Company copyright tag.
|
||||
// </copyright>
|
||||
// <author>stubbfel</author>
|
||||
// <sience>11.06.2013</sience>
|
||||
//----------------------------------------------------------------------
|
||||
namespace CampusAppWP8.Pages.Lecture
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
using CampusAppWP8.Model.Lecture;
|
||||
using CampusAppWP8.Resources;
|
||||
using Microsoft.Phone.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Class for the page which shows the results of an LectureRequest
|
||||
/// </summary>
|
||||
public partial class ResultPage : PhoneApplicationPage
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ResultPage" /> class.
|
||||
/// </summary>
|
||||
public ResultPage()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override the OnNavigatedTo method
|
||||
/// </summary>
|
||||
/// <param name="e">Arguments of navigation</param>
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
LectureList list = App.LoadFromIsolatedStorage<LectureList>(Constants.IsolatedStorage_LectureModel);
|
||||
if (list == null)
|
||||
{
|
||||
Uri url = new Uri(Constants.PathLecture_LecturePage, UriKind.Relative);
|
||||
NavigationService.Navigate(url);
|
||||
return;
|
||||
}
|
||||
|
||||
this.ResultList.ItemsSource = list.Activities.OrderByDescending(o => o.Type).ThenBy(o => o.Title).ToList();
|
||||
base.OnNavigatedTo(e);
|
||||
}
|
||||
}
|
||||
}
|
||||