diff --git a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
index ac0bb7cd..257cb480 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml
@@ -9,6 +9,7 @@
xmlns:lui="clr-namespace:CampusAppWP8.Utility.Lui.Button"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
xmlns:header="clr-namespace:CampusAppWP8.Utility.Lui.Header"
+ xmlns:lu="clr-namespace:CampusAppWP8.Utility.Lui"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
@@ -22,22 +23,46 @@
+
-
+
+
-
-
+
+
+
-
-
+
\ 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 69fb12ef..3bee41eb 100644
--- a/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs
+++ b/CampusAppWP8/CampusAppWP8/Pages/Campusmap/RoomListPage.xaml.cs
@@ -62,6 +62,19 @@ namespace CampusAppWP8.Pages.Campusmap
public RoomListPage()
{
this.InitializeComponent();
+
+ ApplicationBarIconButton btnZoomIn = new ApplicationBarIconButton();
+ btnZoomIn.IconUri = new Uri(Icons.Info, UriKind.Relative);
+ btnZoomIn.Text = AppResources.ZoomIn;
+ btnZoomIn.Click += this.BtnZoomIn_Click;
+
+ ApplicationBarIconButton btnZoomOut = new ApplicationBarIconButton();
+ btnZoomOut.IconUri = new Uri(Icons.Info, UriKind.Relative);
+ btnZoomOut.Text = AppResources.ZoomOut;
+ btnZoomOut.Click += this.BtnZoomOut_Click;
+
+ this.ApplicationBar.Buttons.Add(btnZoomIn);
+ this.ApplicationBar.Buttons.Add(btnZoomOut);
}
#endregion
@@ -75,8 +88,12 @@ namespace CampusAppWP8.Pages.Campusmap
set
{
- this.selectedLayer = value;
- this.LayerTag.Text = value;
+ if (this.selectedLayer != value)
+ {
+ this.selectedLayer = value;
+ this.LayerTag.Text = value;
+ this.UpdateRoomList(value);
+ }
}
}
@@ -380,6 +397,10 @@ namespace CampusAppWP8.Pages.Campusmap
Canvas.SetZIndex(this.imgMap, 0);
}
+ /// Raises the system. event.
+ /// Fiedler, 18.11.2013.
+ /// Source of the event.
+ /// Event information to send to registered event handlers.
private void OnMenuItemClicked(object sender, System.EventArgs e)
{
if (this.SelectedLayer.Equals((sender as ApplicationBarMenuItem).Text) == false)
@@ -423,10 +444,9 @@ namespace CampusAppWP8.Pages.Campusmap
/// Event handler. Called by ZoomIn for tap events.
/// Fiedler, 15.11.2013.
/// Source of the event.
- /// Gesture event information.
- private void ZoomIn_Tap(object sender, System.Windows.Input.GestureEventArgs e)
+ /// Event information.
+ private void BtnZoomIn_Click(object sender, EventArgs e)
{
- //throw new NotImplementedException("TODO");
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX *= 1.5;
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY *= 1.5;
}
@@ -434,14 +454,63 @@ namespace CampusAppWP8.Pages.Campusmap
/// Event handler. Called by ZoomOut for tap events.
/// Fiedler, 15.11.2013.
/// Source of the event.
- /// Gesture event information.
- private void ZoomOut_Tap(object sender, System.Windows.Input.GestureEventArgs e)
+ /// Event information.
+ private void BtnZoomOut_Click(object sender, EventArgs e)
{
- //throw new NotImplementedException("TODO");
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleX /= 1.5;
(this.MapCanvas.RenderTransform as ScaleTransform).ScaleY /= 1.5;
}
+ /// Searches for the first room.
+ /// Fiedler, 18.11.2013.
+ /// Source of the event.
+ /// Event information.
+ private void SearchRoom(object sender, EventArgs e)
+ {
+ this.RoomPicker.Open();
+ }
+
+ /// Updates the room list described by level.
+ /// Fiedler, 18.11.2013.
+ /// The level.
+ private void UpdateRoomList(string level)
+ {
+ CampusBuildingLayerModel layer = this.building.Layers[level];
+ this.RoomPicker.Items.Clear();
+
+ foreach (PlaceModel room in layer.Rooms.Places)
+ {
+ if(room.GetInformationsValue(Constants.PisInformationName_Typ).Equals(Constants.PisInformationValue_Entrance) == false)
+ {
+ if (room.GetInformationsValue(Constants.PisInformationName_Room).Equals(room.GetInformationsValue(Constants.PisInformationName_Name)) == false)
+ {
+ string newStr = room.GetInformationsValue(Constants.PisInformationName_Room) + ", " + room.GetInformationsValue(Constants.PisInformationName_Name);
+ this.RoomPicker.Items.Add(newStr);
+ }
+ else
+ {
+ this.RoomPicker.Items.Add(room.GetInformationsValue(Constants.PisInformationName_Room));
+ }
+ }
+ }
+ }
+
#endregion
+
+ /// Event handler. Called by RoomPicker for selection changed events.
+ /// Fiedler, 18.11.2013.
+ /// Source of the event.
+ /// Selection changed event information.
+ private void RoomPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ MapPoint pos = new MapPoint();
+
+ pos.X = room.GeoRefPoint.Longitude;
+ pos.Y = room.GeoRefPoint.Latitude;
+ MapPoint roompoint = this.buildingMap.GetScrollPoint(this.buildingMap.ConverToPixelPoint(this.buildingMap.ConverToMapPoint(x, y)));
+ MapPoint viewPoint = roompoint - this.mappoint + this.offsetPoint;
+
+ MapCanvas.Children.Add(this.buildingMap.AddPin(pos, PinType.SearchPlace));
+ }
}
}
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
index 1defd00d..46d43bdd 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.Designer.cs
@@ -1553,5 +1553,23 @@ namespace CampusAppWP8.Resources {
return ResourceManager.GetString("When", resourceCulture);
}
}
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Zoom + ähnelt.
+ ///
+ public static string ZoomIn {
+ get {
+ return ResourceManager.GetString("ZoomIn", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Zoom - ähnelt.
+ ///
+ public static string ZoomOut {
+ get {
+ return ResourceManager.GetString("ZoomOut", resourceCulture);
+ }
+ }
}
}
diff --git a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
index 4d494990..37c797e4 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/AppResources.resx
@@ -617,4 +617,10 @@
Wochenplan
+
+ Zoom +
+
+
+ Zoom -
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
index a7a62d34..514a9671 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants.resx
@@ -609,4 +609,7 @@
http://www.tu-cottbus.de/campusapp-data/canteens.php?v=1
+
+ Zugangsbereich
+
\ No newline at end of file
diff --git a/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs b/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
index ea41e3aa..be6e354f 100644
--- a/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
+++ b/CampusAppWP8/CampusAppWP8/Resources/Constants1.Designer.cs
@@ -1239,6 +1239,15 @@ namespace CampusAppWP8.Resources {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Zugangsbereich ähnelt.
+ ///
+ public static string PisInformationValue_Entrance {
+ get {
+ return ResourceManager.GetString("PisInformationValue_Entrance", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Zeichenfolge, die pid ähnelt.
///