diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfo_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfo_159.png
index f95a93ca..5065137f 100644
Binary files a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfo_159.png and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfo_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfoacces_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfoacces_159.png
new file mode 100644
index 00000000..e7154a5e
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfoacces_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfowc_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfowc_159.png
new file mode 100644
index 00000000..d0885d65
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placeinfowc_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placelab_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placelab_159.png
new file mode 100644
index 00000000..39943f90
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placelab_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placesearchred_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placesearchred_159.png
new file mode 100644
index 00000000..ef79139b
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/DarkTheme/placesearchred_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfo_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfo_159.png
index f95a93ca..5065137f 100644
Binary files a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfo_159.png and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfo_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfoacces_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfoacces_159.png
new file mode 100644
index 00000000..e7154a5e
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfoacces_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfowc_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfowc_159.png
new file mode 100644
index 00000000..d0885d65
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placeinfowc_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placelab_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placelab_159.png
new file mode 100644
index 00000000..39943f90
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placelab_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placesearchred_159.png b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placesearchred_159.png
new file mode 100644
index 00000000..ef79139b
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Icons/LightTheme/placesearchred_159.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Maps/IKMZ.png b/CampusAppWP8/CampusAppWP8/Assets/Maps/IKMZ.png
new file mode 100644
index 00000000..a65e9b28
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Maps/IKMZ.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/Maps/MZG.png b/CampusAppWP8/CampusAppWP8/Assets/Maps/MZG.png
new file mode 100644
index 00000000..8e6f1d4f
Binary files /dev/null and b/CampusAppWP8/CampusAppWP8/Assets/Maps/MZG.png differ
diff --git a/CampusAppWP8/CampusAppWP8/Assets/campusmap.png b/CampusAppWP8/CampusAppWP8/Assets/Maps/campusmap.png
similarity index 100%
rename from CampusAppWP8/CampusAppWP8/Assets/campusmap.png
rename to CampusAppWP8/CampusAppWP8/Assets/Maps/campusmap.png
diff --git a/CampusAppWP8/CampusAppWP8/Assets/testmap.png b/CampusAppWP8/CampusAppWP8/Assets/testmap.png
deleted file mode 100644
index a2cdfad3..00000000
Binary files a/CampusAppWP8/CampusAppWP8/Assets/testmap.png and /dev/null differ
diff --git a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
index f2216b62..e9db4ecf 100644
--- a/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
+++ b/CampusAppWP8/CampusAppWP8/CampusAppWP8.csproj
@@ -113,12 +113,18 @@
+
+
+
+
+
+
@@ -427,7 +433,7 @@
PreserveNewest
-
+
@@ -446,7 +452,11 @@
+
+
+
+
@@ -487,7 +497,11 @@
+
+
+
+
@@ -505,7 +519,8 @@
-
+
+
PreserveNewest
@@ -524,6 +539,7 @@
+
Designer
@@ -572,6 +588,7 @@
CampusAppWPortalLib8
+
-
-
+
+
+
@@ -40,18 +41,16 @@
-
+
-
-
+
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
index 39877a04..3f8e5308 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/CampusMapPage.xaml.cs
@@ -27,6 +27,7 @@ namespace CampusAppWP8.Pages.Campusmap
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Windows.Networking.Proximity;
+ using System.Windows.Input;
/// Class for the campusMap page.
/// Stubbfel, 19.08.2013.
@@ -117,6 +118,8 @@ namespace CampusAppWP8.Pages.Campusmap
/// Event for loading places
///
public event LoadingPlace OnLoadingPlace;
+ private long ndefId;
+
#endregion
#region Method
@@ -139,8 +142,17 @@ namespace CampusAppWP8.Pages.Campusmap
if (NavigationContext.QueryString.ContainsKey(Constants.ParamModelMap_SearchTermAlias))
{
string alias = NavigationContext.QueryString[Constants.ParamModelMap_SearchTermAlias];
+
this.ShowPlacesByQueryAsSearchPin(alias);
scroll = false;
+ if (Utilities.IsRoomId(alias))
+ {
+ PlaceModel place = this.file.Model.GetPlaceById(alias);
+ if (place != null)
+ {
+ this.GoToRoomList(place.ParentId, place.PlaceId);
+ }
+ }
}
else
{
@@ -156,13 +168,38 @@ namespace CampusAppWP8.Pages.Campusmap
App.SaveToIsolatedStorage(Constants.CampusMapApp_QRCodeSearchResultStorageKey, null);
string searchPid = Wp8StringManager.FilterPlaceIdinQRResultString(qrcodeResult);
+ PlaceModel place = this.file.Model.GetPlaceById(searchPid);
+
if (searchPid != null)
{
- this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+
+ //this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+ if (place.ParentId.Equals(this.campusMap.CampusId))
+ {
+ this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+ }
+ else
+ {
+ this.GoToRoomList(place.ParentId, place.PlaceId);
+ }
}
}
+
+ ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
}
+ ///
+ /// Methods overrides the OnNavigatedFrom-Method
+ ///
+ /// some NavigationEventArgs
+ protected override void OnNavigatedFrom(NavigationEventArgs e)
+ {
+ this.device.StopSubscribingForMessage(ndefId);
+
+ base.OnNavigatedFrom(e);
+ }
+
+
#endregion
#region private
@@ -448,7 +485,8 @@ namespace CampusAppWP8.Pages.Campusmap
{
MessageBoxes.ShowMainModelInfoMessageBox(AppResources.ScarNfc_Search);
this.ProgressBar.Visibility = Visibility.Visible;
- long id = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
+ this.device.StopSubscribingForMessage(this.ndefId);
+ this.ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
}
///
@@ -481,16 +519,33 @@ namespace CampusAppWP8.Pages.Campusmap
// search for placeId
string nfcContent = ndef.GetContent();
string searchPid = Wp8StringManager.FilterPlaceIdinNFCResultString(nfcContent.Trim());
+ PlaceModel place = this.file.Model.GetPlaceById(searchPid);
+
if (searchPid != null)
{
// add pins to map
if (this.Dispatcher != null)
{
- this.Dispatcher.BeginInvoke(new Action(() => this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid)));
+ if (place.ParentId.Equals(this.campusMap.CampusId))
+ {
+ this.Dispatcher.BeginInvoke(new Action(() => this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid)));
+ }
+ else
+ {
+ this.Dispatcher.BeginInvoke(new Action(() => this.GoToRoomList(place.ParentId, place.PlaceId)));
+ }
}
else
{
- this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+ //this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+ if (place.ParentId.Equals(this.campusMap.CampusId))
+ {
+ this.ShowAllPlacesByPlaceIdAsSearchPin(searchPid);
+ }
+ else
+ {
+ this.GoToRoomList(place.ParentId, place.PlaceId);
+ }
}
}
else
@@ -514,6 +569,9 @@ namespace CampusAppWP8.Pages.Campusmap
{
this.ProgressBar.Visibility = Visibility.Collapsed;
}
+ ndefId = this.device.SubscribeForMessage(Constants.NCFMessageType_NDEF, this.NDEFHandler);
+
+
}
/// Searches for the first places.
@@ -651,7 +709,7 @@ namespace CampusAppWP8.Pages.Campusmap
{
string lat = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Lat);
string log = App.LoadFromAppState(Constants.GeoWatch_CurrentPosition_Long);
- if (lat == null || log == null ||(lat.Equals("0") && log.Equals("0")))
+ if (lat == null || log == null || (lat.Equals("0") && log.Equals("0")))
{
if (Settings.AppSetting.GeoWatchEnable)
{
@@ -692,6 +750,11 @@ namespace CampusAppWP8.Pages.Campusmap
/// List of places
private void ShowMapInfo(List places)
{
+ if (places == null)
+ {
+ return;
+ }
+
string msgText = string.Empty;
foreach (PlaceModel place in places)
{
@@ -733,16 +796,26 @@ namespace CampusAppWP8.Pages.Campusmap
MessageBoxResult msgResult = MessageBoxes.ShowPlaceInfoOkCancelMessageBox(AppResources.MsgBox_ShowRoomList);
if (msgResult.Equals(MessageBoxResult.OK))
{
- string urlString = Constants.PathCampusmap_RoomListPage;
- urlString += "?" + Constants.ParamBuildingId + "=" + place.PlaceId;
- Uri url = new Uri(urlString as string, UriKind.Relative);
- this.NavigationService.Navigate(url);
+ this.GoToRoomList(place.PlaceId);
return;
}
}
}
}
+ private void GoToRoomList(string buildingId, string roomId = null)
+ {
+ string urlString = Constants.PathCampusmap_RoomListPage;
+ urlString += "?" + Constants.ParamBuildingId + "=" + buildingId;
+ if (roomId != null)
+ {
+ urlString += "&" + Constants.ParamRoomId + "=" + roomId;
+ }
+ Uri url = new Uri(urlString as string, UriKind.Relative);
+ this.NavigationService.Navigate(url);
+ }
+
+
///
/// Method check if a certain place has some rooms
///
@@ -761,6 +834,16 @@ namespace CampusAppWP8.Pages.Campusmap
return false;
}
+
+ private void Button_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
+ {
+ if (e.Key == Key.Enter)
+ {
+ this.SearchByText(sender, e);
+ this.MapScroller.Focus();
+ }
+
+ }
#endregion
#endregion
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
index be326965..ca48717b 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
@@ -7,42 +7,54 @@
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"
- mc:Ignorable="d"
+ xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
+ xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
- SupportedOrientations="Portrait" Orientation="Portrait"
+ SupportedOrientations="Portrait" Orientation="Portrait"
+ mc:Ignorable="d"
shell:SystemTray.IsVisible="True">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs
index dc0cac40..9e77af84 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs
@@ -17,6 +17,13 @@ namespace CampusAppWP8.Pages.Campusmap
using CampusAppWP8.Resources;
using Microsoft.Phone.Controls;
using CampusAppWP8.Utility.Lui.MessageBoxes;
+ using CampusAppWP8.Model.Campusmap;
+ using System.Windows;
+ using System.Windows.Controls;
+ using CampusAppWP8.Utility;
+ using System.Windows.Input;
+ using System.Windows.Media;
+ using CampusAppWPortalLib8.Model.Utility;
///
/// Class of the RoomListPage
@@ -34,6 +41,14 @@ namespace CampusAppWP8.Pages.Campusmap
///
private CampusBuildingModel building;
+ /// Variable for the map model.
+ private BuildingMapModel buildingMap;
+
+ private bool pinchRun = false;
+ private Point mappoint;
+ private Point offsetPoint;
+ private ListPickerItemListModel layerListPicker;
+
#endregion
#region Constructor
@@ -85,23 +100,32 @@ namespace CampusAppWP8.Pages.Campusmap
{
if (this.placeFile.Model != null)
{
- this.SetupPivot();
+ this.SetupMap();
}
}
///
/// Method setup the PivotElement
///
- private void SetupPivot()
+ private void SetupMap()
{
if (NavigationContext.QueryString.ContainsKey(Constants.ParamBuildingId))
{
- this.building = new CampusBuildingModel(NavigationContext.QueryString[Constants.ParamBuildingId], this.placeFile.Model.Places.ToList());
+ this.setupCanvas(NavigationContext.QueryString[Constants.ParamBuildingId]);
+ this.createLayerListPicker();
if (this.building != null && this.building.Layers != null && this.building.Layers.Count > 0)
{
- this.SetCaptionsToRooms();
- this.RoomPivot.ItemsSource = this.GetSortedLayers(this.building);
+ if (NavigationContext.QueryString.ContainsKey(Constants.ParamRoomId))
+ {
+ string layerKey = this.building.GetLayerKey(NavigationContext.QueryString[Constants.ParamRoomId]);
+ if (layerKey != null)
+ {
+ this.Layer.SelectedIndex = this.layerListPicker.GetIndexOrDefault(layerKey);
+ this.showCurrentRoom(NavigationContext.QueryString[Constants.ParamRoomId]);
+ }
+ }
+ this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
}
else
{
@@ -112,44 +136,227 @@ namespace CampusAppWP8.Pages.Campusmap
{
MessageBoxes.ShowMainModelErrorMessageBox(AppResources.MsgBox_ErrorMainModelLoad);
}
-
+
}
- ///
- /// Method sorts the Layers
- ///
- /// building of the layers
- /// sorted Dictionary
- private Dictionary GetSortedLayers(CampusBuildingModel build)
+ private void showCurrentRoom(string placeId)
{
- Dictionary result = new Dictionary();
- foreach (CampusBuildingLayerModel layer in build.Layers.Values)
+
+ double x;
+ double y;
+
+ this.ClearMap(new List() { MapPinModel.InfoPlacePinString });
+
+ PlaceModel room = this.building.GetPlaceById(placeId);
+
+ x = room.GeoRefPoint.Longitude;
+ y = room.GeoRefPoint.Latitude;
+ Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
+ Point viewPoint = new Point(roompoint.X - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y);
+
+ MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, MapPinModel.PinType.InfoRedPlace, new List { room }));
+ }
+
+ private void ShowMapInfo(List places)
+ {
+ if (this.pinchRun)
{
- var sortRom = from place in layer.Rooms.Places
- orderby place.GetInformationsValue(Constants.PisInformationName_Typ), place.GetInformationsValue(Constants.PisInformationName_Name)
- select place;
- result.Add(layer.LayerId, new CampusBuildingLayerModel(layer.LayerId, sortRom.ToList()));
+ return;
+ }
+ string msgText = string.Empty;
+ if (places == null)
+ {
+ return;
+ }
+ foreach (PlaceModel place in places)
+ {
+ msgText += AppResources.PlaceLabel_Name + ": ";
+ msgText += place.GetInformationsValue(Constants.PisInformationName_Name);
+ msgText = Wp8StringManager.AddNewLine(msgText);
+
+ string type = place.GetInformationsValue(Constants.PisInformationName_Typ);
+ if (type != null)
+ {
+ msgText += AppResources.PlaceLabel_Type + ": ";
+ msgText += type;
+ msgText = Wp8StringManager.AddNewLine(msgText);
+ }
+
+ string shortDesc = place.GetInformationsValue(Constants.PisInformationName_ShortDesc);
+ if (shortDesc != null)
+ {
+ msgText += AppResources.PlaceLabel_ShortDesc + ": ";
+ msgText += shortDesc;
+ msgText = Wp8StringManager.AddNewLine(msgText);
+ }
+
+ string access = place.GetInformationsValue(Constants.PisInformationName_Accesbility);
+ if (access != null)
+ {
+ msgText += AppResources.PlaceLabel_Accessbility + ": ";
+ msgText += access;
+ msgText = Wp8StringManager.AddNewLine(msgText);
+ }
}
- return result;
+ MessageBoxes.ShowMainModelInfoMessageBox(msgText);
}
- ///
- /// Method set all rooms a formatted string , which will be show as buttonContent
- ///
- private void SetCaptionsToRooms()
+ private void MapCanvas_ManipulationDelta(object sender, System.Windows.Input.ManipulationDeltaEventArgs e)
{
- string name;
- string type;
- foreach (CampusBuildingLayerModel layer in this.building.Layers.Values)
+ PinchManipulation pinch = e.PinchManipulation;
+ if (pinch == null)
{
- foreach (PlaceModel place in layer.Rooms.Places)
+ return;
+ }
+
+ ScaleTransform scale = MapCanvas.RenderTransform as ScaleTransform;
+
+ if (scale == null)
+ {
+ return;
+ }
+
+ double scaleVal = pinch.CumulativeScale;
+ if (scaleVal < 1)
+ {
+
+ scaleVal = 1;
+ }
+ else if (scaleVal > 1.5)
+ {
+ scaleVal = 1.5;
+ }
+
+ scale.ScaleX = scaleVal;
+ scale.ScaleY = scaleVal;
+
+
+
+ var newCenter = e.PinchManipulation.Current.Center;
+ scale.CenterX = newCenter.X;
+ scale.CenterY = newCenter.Y;
+ }
+
+ private void MapCanvas_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
+ {
+ this.pinchRun = false;
+ }
+
+ private void MapCanvas_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
+ {
+ this.pinchRun = true;
+ }
+
+ private void createLayerListPicker()
+ {
+ layerListPicker = new ListPickerItemListModel();
+
+ foreach (string layername in this.building.Layers.Keys)
+ {
+ layerListPicker.AddItem(layername, layername);
+ }
+ this.Layer.ItemsSource = layerListPicker.List;
+ }
+
+ private void showLayerPlaces(string layerKey = null)
+ {
+ if (layerKey == null)
+ {
+ layerKey = this.building.Layers.Keys.First();
+ }
+
+ CampusBuildingLayerModel layer = this.building.Layers[layerKey];
+ double x;
+ double y;
+
+ this.ClearMap(new List() { MapPinModel.InfoPlacePinString });
+
+ foreach (PlaceModel room in layer.Rooms.Places)
+ {
+ x = room.GeoRefPoint.Longitude;
+ y = room.GeoRefPoint.Latitude;
+ Point roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
+ Point viewPoint = new Point(roompoint.X - mappoint.X + offsetPoint.X, roompoint.Y - mappoint.Y + offsetPoint.Y);
+
+ MapPinModel.PinType type;
+
+ switch (room.GetInformationsValue(Constants.PisInformationName_Typ))
{
- name = place.GetInformationsValue(Constants.PisInformationName_Name);
- type = place.GetInformationsValue(Constants.PisInformationName_Typ);
- if (name != null && type != null)
+ case "Labor":
+ type = MapPinModel.PinType.InfoLabPlace;
+ break;
+ case "Zugangsbereich":
+ type = MapPinModel.PinType.InfoAccesPlace;
+ break;
+ case "WC":
+ type = MapPinModel.PinType.InfoWcPlace;
+ break;
+ case "Regal":
+ continue;
+ default:
+ type = MapPinModel.PinType.InfoPlace;
+ break;
+
+ }
+ MapCanvas.Children.Add(this.buildingMap.AddPin(viewPoint, type, new List { room }));
+ }
+
+ // MapCanvas.Children.Add(this.buildingMap.AddPin(offsetPoint, MapPinModel.PinType.SearchPlace));
+ }
+
+ private void showLayerPlaces(int index = 0)
+ {
+ string layerKey = this.building.Layers.Keys.ElementAt(index);
+ this.showLayerPlaces(layerKey);
+ }
+
+ private void setupCanvas(string buildingId)
+ {
+ this.building = new CampusBuildingModel(buildingId, this.placeFile.Model.Places.ToList());
+
+ this.buildingMap = new BuildingMapModel(this.building.Building.PlaceId);
+ this.buildingMap.ShowMapInfos += new CBMainMapModel.MapInfos(this.ShowMapInfo);
+ this.Header.HeaderName = AppResources.CampusMapApp_RoomListTitle + " (" + this.building.Building.GetInformationsValue(Constants.PisInformationName_ShortName) + ")";
+
+ double y = this.building.Building.GeoRefPoint.Latitude;
+ double x = this.building.Building.GeoRefPoint.Longitude;
+ mappoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
+ offsetPoint = new Point(-this.buildingMap.MapImageOffsetX, -this.buildingMap.MapImageOffsetY);
+
+ this.MapCanvas.DataContext = buildingMap;
+
+ Canvas.SetLeft(this.imgMap, -1 * mappoint.X);
+ Canvas.SetTop(this.imgMap, -1 * mappoint.Y);
+ Canvas.SetZIndex(this.imgMap, 0);
+ }
+
+ private void Layer_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ this.showLayerPlaces(((ListPickerItemModel)this.Layer.SelectedItem).Value);
+ }
+
+ private void ClearMap(List removeTags = null)
+ {
+ if (removeTags == null)
+ {
+ MapCanvas.Children.Clear();
+ }
+ else
+ {
+ List childs = MapCanvas.Children.ToList();
+ foreach (UIElement child in childs)
+ {
+ Image childImg = child as Image;
+ if (childImg == null || childImg.Tag == null)
{
- place.Caption = name + " (" + type + ")";
+ continue;
+ }
+
+ string imgTag = childImg.Tag.ToString().Trim();
+ if (removeTags.Contains(imgTag))
+ {
+ MapCanvas.Children.Remove(child);
}
}
}
diff --git a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs
index 6681f537..2eb35a0c 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Person/PersonPage.xaml.cs
@@ -148,6 +148,7 @@ namespace CampusAppWP8.Pages.Person
if (e.Key == Key.Enter)
{
this.SendRequest(sender,e);
+ this.ResultBox.Focus();
}
}
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
index 7a1d96d7..fca0e004 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
@@ -123,6 +123,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Raumübersicht ähnelt.
+ ///
+ public static string CampusMapApp_RoomListTitle {
+ get {
+ return ResourceManager.GetString("CampusMapApp_RoomListTitle", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Info via NFC ähnelt.
///
@@ -285,6 +294,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Ebene ähnelt.
+ ///
+ public static string LayerListPicker_Label {
+ get {
+ return ResourceManager.GetString("LayerListPicker_Label", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Studiengang ähnelt.
///
@@ -420,6 +438,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Ebeneauswahl ähnelt.
+ ///
+ public static string ListPickerHeader_Layer {
+ get {
+ return ResourceManager.GetString("ListPickerHeader_Layer", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Campusauswahl ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
index 15345313..59e53447 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
@@ -439,11 +439,20 @@
Die Mensa ist heute geschlossen
-
+
Möchten Sie Weiter zur Lehstuhlübersicht?
Der angegebene Lehrstuhl konnte nicht gefunden werden.
+
+ Raumübersicht
+
+
+ Ebene
+
+
+ Ebeneauswahl
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
index 1f01edf8..4d8c6e79 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
@@ -382,7 +382,7 @@
File/Campusmap/Offlinemap.xml
- /Assets/campusmap.png
+ /Assets/Maps/campusmap.png
DevMode
@@ -558,4 +558,22 @@
name
+
+ File/Campusmap/BuildingsMaps.xml
+
+
+ InfoLabPin
+
+
+ ParamRoomId
+
+
+ InfoAccesPin
+
+
+ InfoRedPin
+
+
+ InfoWCPin
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
index 31810529..9a1a71e1 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
@@ -286,7 +286,16 @@ namespace CampusAppWP8.Resources {
}
///
- /// Sucht eine lokalisierte Zeichenfolge, die /Assets/campusmap.png ähnelt.
+ /// Sucht eine lokalisierte Zeichenfolge, die File/Campusmap/BuildingsMaps.xml ähnelt.
+ ///
+ public static string FileMap_BuildingsMap {
+ get {
+ return ResourceManager.GetString("FileMap_BuildingsMap", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die /Assets/Maps/campusmap.png ähnelt.
///
public static string FileMap_CBMainMap {
get {
@@ -717,6 +726,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die ParamRoomId ähnelt.
+ ///
+ public static string ParamRoomId {
+ get {
+ return ResourceManager.GetString("ParamRoomId", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die Url ähnelt.
///
@@ -1005,6 +1023,42 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die InfoAccesPin ähnelt.
+ ///
+ public static string PinType_InfoAccess {
+ get {
+ return ResourceManager.GetString("PinType_InfoAccess", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die InfoLabPin ähnelt.
+ ///
+ public static string PinType_InfoLab {
+ get {
+ return ResourceManager.GetString("PinType_InfoLab", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die InfoRedPin ähnelt.
+ ///
+ public static string PinType_InfoRed {
+ get {
+ return ResourceManager.GetString("PinType_InfoRed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die InfoWCPin ähnelt.
+ ///
+ public static string PinType_InfoWC {
+ get {
+ return ResourceManager.GetString("PinType_InfoWC", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die SearchPin ähnelt.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Icons.cs b/CampusAppWP8/CampusAppWP8/Resources/Icons.cs
index ede5416b..3519ed79 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Icons.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/Icons.cs
@@ -319,6 +319,50 @@ namespace CampusAppWP8.Resources
}
}
+ ///
+ /// Gets the uri string of the PlaceInfoAccess icon.
+ ///
+ public static string PlaceInfoAccess
+ {
+ get
+ {
+ return Themerize("placeinfoacces_159.png");
+ }
+ }
+
+ ///
+ /// Gets the uri string of the PlaceInfoWc icon.
+ ///
+ public static string PlaceInfoWc
+ {
+ get
+ {
+ return Themerize("placeinfowc_159.png");
+ }
+ }
+
+ ///
+ /// Gets the uri string of the PlaceLab icon.
+ ///
+ public static string PlaceLab
+ {
+ get
+ {
+ return Themerize("placelab_159.png");
+ }
+ }
+
+ ///
+ /// Gets the uri string of the PlaceRearchRed icon.
+ ///
+ public static string PlaceRearchRed
+ {
+ get
+ {
+ return Themerize("placesearchred_159.png");
+ }
+ }
+
///
/// Gets the uri string of the Practise icon.
///
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Icons.resx b/CampusAppWP8/CampusAppWP8/Resources/Icons.resx
index 509cad32..439fa92c 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Icons.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/Icons.resx
@@ -198,6 +198,18 @@
placeinfo_159.png
+
+ placeinfoacces_159.png
+
+
+ placeinfowc_159.png
+
+
+ placelab_159.png
+
+
+ placesearchred_159.png
+
practise_159.png
diff --git a/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs b/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs
index d786d7a8..306dcf2b 100644
--- a/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs
+++ b/CampusAppWP8/CampusAppWP8/Utility/Utilities.cs
@@ -360,6 +360,15 @@ namespace CampusAppWP8.Utility
}
}
+ public static bool IsRoomId(string placeId)
+ {
+ if (Wp8StringManager.IsDigitsOnly(placeId) && placeId.Length > 7)
+ {
+ return true;
+ }
+ return false;
+ }
+
#endregion
}
}
\ No newline at end of file