diff --git a/CampusAppWP8/CampusAppW8.sln b/CampusAppWP8/CampusAppW8.sln index fec303b9..389dbe1c 100644 --- a/CampusAppWP8/CampusAppW8.sln +++ b/CampusAppWP8/CampusAppW8.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWP8", "CampusAppWP8\CampusAppWP8.csproj", "{120B88CC-F3F0-4C5A-A3FD-C26E835338CC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampussAppWStore8", "CampussAppWStore8\CampussAppWStore8.csproj", "{E49420AA-3023-42EF-8255-67B1F5E52B43}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWStore8", "CampussAppWStore8\CampusAppWStore8.csproj", "{E49420AA-3023-42EF-8255-67B1F5E52B43}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CampusAppWPortalLib8", "CampusAppWPortalLib8\CampusAppWPortalLib8.csproj", "{67D80BE2-0FB7-44C8-A495-7D44FC2AC262}" EndProject diff --git a/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml b/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml index 8d4a1592..aa72c656 100644 --- a/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml +++ b/CampusAppWP8/CampusAppWP8/File/Campusmap/Offlinemap.xml @@ -50,7 +50,7 @@ Lehrgebäude Musikpädagogik - Informations, Kommunikations und Medienzentrum + Informations, Kommunikations und Medienzentrum (IKMZ) library @@ -81,7 +81,7 @@ Baustofflabor - Studentenwerk Frankfurt (Oder) + Studentenwerk Frankfurt (Oder) (SW) Zentralverwaltung Hubertstraße (ZVH) @@ -167,7 +167,7 @@ Garagenkomplex - Lehrgebäude 1C + Lehrgebäude 1C (LG1C) Lehrgebäude 3 @@ -210,7 +210,7 @@ entrance - Hauptgebäude + Hauptgebäude (HG) Zentralverwaltung diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs index ddc82665..deaa55c5 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs @@ -42,9 +42,21 @@ namespace CampusAppWP8.Pages.Campusmap protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); - MapCanvas.Children.Clear(); - this.AddPins(this.SearchPlaces("campus")); - this.ShowCurrentPositionDispatcher(); + if (e.NavigationMode == NavigationMode.New) + { + MapCanvas.Children.Clear(); + + string alias = "campus"; + bool scroll = true; + if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelMap_SearchTermAlias)) + { + alias = NavigationContext.QueryString[Constants.ParamModelMap_SearchTermAlias]; + scroll = false; + } + + this.AddPins(this.SearchPlaces(alias)); + this.ShowCurrentPositionDispatcher(scroll); + } } /// Button click method. @@ -68,9 +80,9 @@ namespace CampusAppWP8.Pages.Campusmap { return; } - + MapCanvas.Children.Clear(); - this.AddPins(this.SearchPlaces(query)); + this.AddPins(this.SearchPlaces(query)); } /// Searches for the first places. @@ -85,30 +97,35 @@ namespace CampusAppWP8.Pages.Campusmap /// Adds the pins. /// Stubbfel, 19.08.2013. /// The places. - private void AddPins(List places) + /// (Optional) the scroll. + private void AddPins(List places, bool scroll = true) { foreach (PlaceModel place in places) { GeoCoordinate coor = place.GeoRefPoint; if (coor != null) { - this.AddPin(coor.Longitude, coor.Latitude); + this.AddPin(coor.Longitude, coor.Latitude, scroll); } } } /// Add Pin to an certain position. /// Stubbfel, 19.08.2013. - /// longitude parameter. - /// latitude parameter. - private void AddPin(double x, double y) + /// longitude parameter. + /// latitude parameter. + /// (Optional) the scroll. + private void AddPin(double x, double y, bool scroll = true) { Point scrollPoint = this.map.GetScrollPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y))); MapCanvas.Children.Add(this.map.AddPinFromRefPoint(this.map.ConverToPixelPoint(this.map.ConverToMapPoint(x, y)))); MapScroller.UpdateLayout(); - MapScroller.ScrollToVerticalOffset(scrollPoint.Y); - MapScroller.ScrollToHorizontalOffset(scrollPoint.X); + if (scroll) + { + MapScroller.ScrollToVerticalOffset(scrollPoint.Y); + MapScroller.ScrollToHorizontalOffset(scrollPoint.X); + } // XPoint.Text = x.ToString(); // YPoint.Text = y.ToString(); @@ -125,43 +142,56 @@ namespace CampusAppWP8.Pages.Campusmap /// execute ShowCurrentPosition-Method via Dispatcher. /// Stubbfel, 19.08.2013. - private void ShowCurrentPositionDispatcher() + /// (Optional) the scroll. + private void ShowCurrentPositionDispatcher(bool scroll = true) { ProgressBar.Visibility = Visibility.Visible; - Thread thread = new Thread(new ThreadStart(this.ShowCurrentPosition)); + Thread thread = new Thread(delegate() { this.ShowCurrentPosition(scroll); }); thread.Start(); } /// Method add a pin on the at the position of the phone. /// Stubbfel, 19.08.2013. - private void ShowCurrentPosition() + /// (Optional) the scroll. + private void ShowCurrentPosition(bool scroll = true) { Utilities.DetermineAndStoreCurrentPositionForce(); if (this.Dispatcher != null) { - this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition())); + this.Dispatcher.BeginInvoke(new Action(() => this.SetPinToCurrentPosition(scroll))); } else { - this.SetPinToCurrentPosition(); + this.SetPinToCurrentPosition(scroll); } } /// Sets pin to current position. /// Stubbfel, 19.08.2013. - private void SetPinToCurrentPosition() + /// (Optional) the scroll. + private void SetPinToCurrentPosition(bool scroll = true) { string lat = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Lat); string log = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Long); + this.SetPinToPosition(lat, log, scroll); + } + + /// Sets pin to position. + /// Stubbfel, 27.08.2013. + /// The latitude. + /// The longitude. + /// (Optional) the scroll. + private void SetPinToPosition(string latitude, string longitude, bool scroll = true) + { double x; double y; - if (!double.TryParse(log, NumberStyles.Any, CultureInfo.InvariantCulture, out x) || !double.TryParse(lat, NumberStyles.Any, CultureInfo.InvariantCulture, out y)) + if (!double.TryParse(longitude, NumberStyles.Any, CultureInfo.InvariantCulture, out x) || !double.TryParse(latitude, NumberStyles.Any, CultureInfo.InvariantCulture, out y)) { return; } - this.AddPin(x, y); + this.AddPin(x, y, scroll); ProgressBar.Visibility = Visibility.Collapsed; } } diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs index e8d7a953..0de55340 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs +++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.Designer.cs @@ -519,6 +519,15 @@ namespace CampusAppWP8.Resources { } } + /// + /// Sucht eine lokalisierte Zeichenfolge, die SearchAlias ähnelt. + /// + public static string ParamModelMap_SearchTermAlias { + get { + return ResourceManager.GetString("ParamModelMap_SearchTermAlias", resourceCulture); + } + } + /// /// Sucht eine lokalisierte Zeichenfolge, die pivotindex ähnelt. /// diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx index 00beecb5..ef601ff0 100644 --- a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx +++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx @@ -432,4 +432,7 @@ OnlyWifi + + SearchAlias + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Settings.StyleCop b/CampusAppWP8/CampusAppWP8/Settings.StyleCop new file mode 100644 index 00000000..1b4199b4 --- /dev/null +++ b/CampusAppWP8/CampusAppWP8/Settings.StyleCop @@ -0,0 +1,7 @@ + + + + Stubbfel + + + \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs index e20930e2..19521cc9 100644 --- a/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs +++ b/CampusAppWP8/CampusAppWP8/Utility/Lui/Button/GoToMapButton.cs @@ -73,11 +73,14 @@ namespace CampusAppWP8.Utility.Lui.Button /// protected override void OnClick() { - MapsTask mapsTask = new MapsTask(); - mapsTask.Center = new GeoCoordinate(51.766788, 14.326681); - mapsTask.SearchTerm = this.SearchTerm as string; - mapsTask.ZoomLevel = 15; - mapsTask.Show(); + string urlString = Constants.PathCampusmap_Campusmap; + if (this.SearchTerm != null) + { + urlString += "?" + Constants.ParamModelMap_SearchTermAlias + "=" + this.SearchTerm; + } + Uri url = new Uri(urlString as string, UriKind.Relative); + Page page = App.RootFrame.Content as Page; + page.NavigationService.Navigate(url); } #endregion } diff --git a/CampusAppWP8/CampusAppWStore8/App.xaml b/CampusAppWP8/CampusAppWStore8/App.xaml deleted file mode 100644 index 3b7b41dc..00000000 --- a/CampusAppWP8/CampusAppWStore8/App.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/CampusAppWP8/CampusAppWStore8/App.xaml.cs b/CampusAppWP8/CampusAppWStore8/App.xaml.cs deleted file mode 100644 index ef95402d..00000000 --- a/CampusAppWP8/CampusAppWStore8/App.xaml.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Windows.ApplicationModel; -using Windows.ApplicationModel.Activation; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// Die Vorlage "Leere Anwendung" ist unter http://go.microsoft.com/fwlink/?LinkId=234227 dokumentiert. - -namespace CampusAppWStore8 -{ - /// - /// Stellt das anwendungsspezifische Verhalten bereit, um die Standardanwendungsklasse zu ergänzen. - /// - sealed partial class App : Application - { - /// - /// Initialisiert das Singletonanwendungsobjekt. Dies ist die erste Zeile von erstelltem Code - /// und daher das logische Äquivalent von main() bzw. WinMain() - /// - public App() - { - this.InitializeComponent(); - this.Suspending += OnSuspending; - } - - /// - /// Wird aufgerufen, wenn die Anwendung durch den Endbenutzer normal gestartet wird. Weitere Einstiegspunkte - /// werden verwendet, wenn die Anwendung zum Öffnen einer bestimmten Datei, zum Anzeigen - /// von Suchergebnissen usw. gestartet wird. - /// - /// Details über Startanforderung und -prozess. - protected override void OnLaunched(LaunchActivatedEventArgs args) - { - Frame rootFrame = Window.Current.Content as Frame; - - // App-Initialisierung nicht wiederholen, wenn das Fenster bereits Inhalte enthält. - // Nur sicherstellen, dass das Fenster aktiv ist. - if (rootFrame == null) - { - // Einen Rahmen erstellen, der als Navigationskontext fungiert und zum Parameter der ersten Seite navigieren - rootFrame = new Frame(); - - if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) - { - //TODO: Zustand von zuvor angehaltener Anwendung laden - } - - // Den Rahmen im aktuellen Fenster platzieren - Window.Current.Content = rootFrame; - } - - if (rootFrame.Content == null) - { - // Wenn der Navigationsstapel nicht wiederhergestellt wird, zur ersten Seite navigieren - // und die neue Seite konfigurieren, indem die erforderlichen Informationen als Navigationsparameter - // übergeben werden - if (!rootFrame.Navigate(typeof(MainPage), args.Arguments)) - { - throw new Exception("Failed to create initial page"); - } - } - // Sicherstellen, dass das aktuelle Fenster aktiv ist - Window.Current.Activate(); - } - - /// - /// Wird aufgerufen, wenn die Ausführung der Anwendung angehalten wird. Der Anwendungszustand wird gespeichert, - /// ohne zu wissen, ob die Anwendung beendet oder fortgesetzt wird und die Speicherinhalte dabei - /// unbeschädigt bleiben. - /// - /// Die Quelle der Anhalteanforderung. - /// Details zur Anhalteanforderung. - private void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - //TODO: Anwendungszustand speichern und alle Hintergrundaktivitäten beenden - deferral.Complete(); - } - } -} diff --git a/CampusAppWP8/CampusAppWStore8/Assets/Logo.png b/CampusAppWP8/CampusAppWStore8/Assets/Logo.png deleted file mode 100644 index e26771cb..00000000 Binary files a/CampusAppWP8/CampusAppWStore8/Assets/Logo.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWStore8/Assets/SmallLogo.png b/CampusAppWP8/CampusAppWStore8/Assets/SmallLogo.png deleted file mode 100644 index 1eb0d9d5..00000000 Binary files a/CampusAppWP8/CampusAppWStore8/Assets/SmallLogo.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWStore8/Assets/SplashScreen.png b/CampusAppWP8/CampusAppWStore8/Assets/SplashScreen.png deleted file mode 100644 index c951e031..00000000 Binary files a/CampusAppWP8/CampusAppWStore8/Assets/SplashScreen.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWStore8/Assets/StoreLogo.png b/CampusAppWP8/CampusAppWStore8/Assets/StoreLogo.png deleted file mode 100644 index dcb67271..00000000 Binary files a/CampusAppWP8/CampusAppWStore8/Assets/StoreLogo.png and /dev/null differ diff --git a/CampusAppWP8/CampusAppWStore8/CampusAppWStore8.csproj b/CampusAppWP8/CampusAppWStore8/CampusAppWStore8.csproj deleted file mode 100644 index f0653e0f..00000000 --- a/CampusAppWP8/CampusAppWStore8/CampusAppWStore8.csproj +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - AnyCPU - {88D81ECB-FF6A-4807-B23F-5DF9B790B7B3} - AppContainerExe - Properties - CampusAppWStore8 - CampusAppWStore8 - de-DE - 512 - {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - CampusAppWStore8_TemporaryKey.pfx - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE;NETFX_CORE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE;NETFX_CORE - prompt - 4 - - - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - ARM - false - prompt - true - - - bin\ARM\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - ARM - false - prompt - true - - - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x64 - false - prompt - true - - - bin\x64\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x64 - false - prompt - true - - - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE - ;2008 - full - x86 - false - prompt - true - - - bin\x86\Release\ - TRACE;NETFX_CORE - true - ;2008 - pdbonly - x86 - false - prompt - true - - - - - - - App.xaml - - - MainPage.xaml - - - - - - Designer - - - - - - - - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - 11.0 - - - - \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWStore8/CampusAppWStore8_TemporaryKey.pfx b/CampusAppWP8/CampusAppWStore8/CampusAppWStore8_TemporaryKey.pfx deleted file mode 100644 index 14ee2fec..00000000 Binary files a/CampusAppWP8/CampusAppWStore8/CampusAppWStore8_TemporaryKey.pfx and /dev/null differ diff --git a/CampusAppWP8/CampusAppWStore8/Common/StandardStyles.xaml b/CampusAppWP8/CampusAppWStore8/Common/StandardStyles.xaml deleted file mode 100644 index f89b4620..00000000 --- a/CampusAppWP8/CampusAppWStore8/Common/StandardStyles.xaml +++ /dev/null @@ -1,1829 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CampusAppWP8/CampusAppWStore8/MainPage.xaml b/CampusAppWP8/CampusAppWStore8/MainPage.xaml deleted file mode 100644 index a7ce9f6e..00000000 --- a/CampusAppWP8/CampusAppWStore8/MainPage.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/CampusAppWP8/CampusAppWStore8/MainPage.xaml.cs b/CampusAppWP8/CampusAppWStore8/MainPage.xaml.cs deleted file mode 100644 index 077f698c..00000000 --- a/CampusAppWP8/CampusAppWStore8/MainPage.xaml.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; - -// Die Elementvorlage "Leere Seite" ist unter http://go.microsoft.com/fwlink/?LinkId=234238 dokumentiert. - -namespace CampusAppWStore8 -{ - /// - /// Eine leere Seite, die eigenständig verwendet werden kann oder auf die innerhalb eines Rahmens navigiert werden kann. - /// - public sealed partial class MainPage : Page - { - public MainPage() - { - this.InitializeComponent(); - } - - /// - /// Wird aufgerufen, wenn diese Seite in einem Rahmen angezeigt werden soll. - /// - /// Ereignisdaten, die beschreiben, wie diese Seite erreicht wurde. Die - /// Parametereigenschaft wird normalerweise zum Konfigurieren der Seite verwendet. - protected override void OnNavigatedTo(NavigationEventArgs e) - { - } - } -} diff --git a/CampusAppWP8/CampusAppWStore8/Package.appxmanifest b/CampusAppWP8/CampusAppWStore8/Package.appxmanifest deleted file mode 100644 index 7ed76a39..00000000 --- a/CampusAppWP8/CampusAppWStore8/Package.appxmanifest +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - CampusAppWStore8 - stubbfel - Assets\StoreLogo.png - - - - 6.2.1 - 6.2.1 - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CampusAppWP8/CampusAppWStore8/Properties/AssemblyInfo.cs b/CampusAppWP8/CampusAppWStore8/Properties/AssemblyInfo.cs deleted file mode 100644 index 4f404c4e..00000000 --- a/CampusAppWP8/CampusAppWStore8/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Diese Attributwerte ändern, um die Informationen zu ändern, -// die einer Assembly zugeordnet sind. -[assembly: AssemblyTitle("CampusAppWStore8")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CampusAppWStore8")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Es können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern -// mithilfe von '*' wie unten dargestellt übernommen werden: -// [Assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: ComVisible(false)] \ No newline at end of file diff --git a/CampusAppWP8/CampussAppWStore8/CampussAppWStore8.csproj b/CampusAppWP8/CampussAppWStore8/CampusAppWStore8.csproj similarity index 100% rename from CampusAppWP8/CampussAppWStore8/CampussAppWStore8.csproj rename to CampusAppWP8/CampussAppWStore8/CampusAppWStore8.csproj